Merge nucleic/fuzzy-dewy-urchin-hpvd into dev

This commit is contained in:
2026-08-02 16:31:06 -07:00
parent 8f5acb7755
commit f89561b6a8
3 changed files with 19 additions and 1 deletions
+4
View File
@@ -77,6 +77,10 @@ Print the two clean, from-pretrained-base training commands after promotion:
"$PY" ml/purpose-classifier/rebuild_sol_high.py train-commands "$PY" ml/purpose-classifier/rebuild_sol_high.py train-commands
``` ```
By default the generated commands use the Python interpreter that invoked
`rebuild_sol_high.py`, so running this from an activated virtual environment emits that
environment's concrete Python path. Pass `--python <path>` only to override it.
The purpose-lite command starts from the pinned MiniLM revision. The purpose-deep command The purpose-lite command starts from the pinned MiniLM revision. The purpose-deep command
starts from the pinned ModernBERT base variant; neither command supplies a prior classifier starts from the pinned ModernBERT base variant; neither command supplies a prior classifier
checkpoint or continuation flag. checkpoint or continuation flag.
+5 -1
View File
@@ -666,7 +666,11 @@ def build_parser() -> argparse.ArgumentParser:
commands_parser = subparsers.add_parser( commands_parser = subparsers.add_parser(
"train-commands", help="print clean from-base training commands" "train-commands", help="print clean from-base training commands"
) )
commands_parser.add_argument("--python", default="$PY") commands_parser.add_argument(
"--python",
default=sys.executable,
help="Python interpreter to print in each command (default: this interpreter)",
)
return parser return parser
+10
View File
@@ -131,6 +131,16 @@ class RebuildSolHighTests(unittest.TestCase):
self.assertNotIn("--resume-from", commands) self.assertNotIn("--resume-from", commands)
self.assertNotIn("--model ", commands) self.assertNotIn("--model ", commands)
def test_training_commands_default_to_invoking_interpreter(self):
args = rebuild_sol_high.build_parser().parse_args(["train-commands"])
self.assertEqual(args.python, sys.executable)
self.assertTrue(
rebuild_sol_high.train_commands(args.python).startswith(
f'"{sys.executable}" ml/purpose-classifier/train.py'
)
)
def test_complete_stage_promotes_public_and_combined_datasets(self): def test_complete_stage_promotes_public_and_combined_datasets(self):
with tempfile.TemporaryDirectory() as directory: with tempfile.TemporaryDirectory() as directory:
root = Path(directory) root = Path(directory)