Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion mito_train/training/train_board_ocr.py
Original file line number Diff line number Diff line change
Expand Up @@ -510,7 +510,9 @@ def log_main(msg: str) -> None:
def main() -> None:
# Pull HF_TOKEN / WANDB_API_KEY / CF_* out of .env into os.environ before
# any HF or wandb call resolves credentials. No-op if .env is missing.
load_dotenv()
# override=True so devcontainer.json's ${localEnv:...} forwards that expand
# to an empty string on hosts without those vars don't win over .env.
load_dotenv(override=True)
p = argparse.ArgumentParser()
p.add_argument("--mode", choices=["smoke", "full"], default="smoke")
p.add_argument("--backbone", default="mobilenet_v3_small",
Expand Down
4 changes: 3 additions & 1 deletion mito_train/training/train_detector.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ def evaluate(model: nn.Module, loader: DataLoader, device: str) -> dict[str, flo
def main() -> None:
# Pull HF_TOKEN / WANDB_API_KEY / CF_* out of .env into os.environ before
# any wandb or HF call resolves credentials. No-op if .env is missing.
load_dotenv()
# override=True so devcontainer.json's ${localEnv:...} forwards that expand
# to an empty string on hosts without those vars don't win over .env.
load_dotenv(override=True)
p = argparse.ArgumentParser()
p.add_argument("--train-manifest", type=Path, default=Path("data/detector/train.jsonl"))
p.add_argument("--val-manifest", type=Path, default=Path("data/detector/val.jsonl"))
Expand Down
4 changes: 3 additions & 1 deletion mito_train/training/train_piece.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,9 @@ def run_manifest(args: argparse.Namespace) -> None:
def main() -> None:
# Pull WANDB_API_KEY / CF_* / HF_TOKEN out of .env into os.environ before
# any wandb or HF call resolves credentials. No-op if .env is missing.
load_dotenv()
# override=True so devcontainer.json's ${localEnv:...} forwards that expand
# to an empty string on hosts without those vars don't win over .env.
load_dotenv(override=True)
p = argparse.ArgumentParser()
p.add_argument("--mode", choices=["smoke", "manifest"], default="smoke")
# smoke-mode args
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "mito-train"
version = "0.3.1"
version = "0.3.2"
description = "ぴよ将棋OCR 3モデル (board-detector / piece-classifier / hand-classifier) の学習・ONNX出力"
requires-python = ">=3.11"
dependencies = [
Expand Down
2 changes: 1 addition & 1 deletion uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading