diff --git a/mito_train/training/train_board_ocr.py b/mito_train/training/train_board_ocr.py index 07b8385..5f9539f 100644 --- a/mito_train/training/train_board_ocr.py +++ b/mito_train/training/train_board_ocr.py @@ -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", diff --git a/mito_train/training/train_detector.py b/mito_train/training/train_detector.py index cd0d953..c539c14 100644 --- a/mito_train/training/train_detector.py +++ b/mito_train/training/train_detector.py @@ -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")) diff --git a/mito_train/training/train_piece.py b/mito_train/training/train_piece.py index dd6a5b7..a94013e 100644 --- a/mito_train/training/train_piece.py +++ b/mito_train/training/train_piece.py @@ -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 diff --git a/pyproject.toml b/pyproject.toml index 054dfcf..682df05 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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 = [ diff --git a/uv.lock b/uv.lock index ac793db..1b87464 100644 --- a/uv.lock +++ b/uv.lock @@ -1119,7 +1119,7 @@ wheels = [ [[package]] name = "mito-train" -version = "0.3.1" +version = "0.3.2" source = { editable = "." } dependencies = [ { name = "albumentations" },