Merge nucleic/fuzzy-dewy-urchin-hpvd into dev
This commit is contained in:
@@ -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
|
||||
```
|
||||
|
||||
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
|
||||
starts from the pinned ModernBERT base variant; neither command supplies a prior classifier
|
||||
checkpoint or continuation flag.
|
||||
|
||||
+5
-1
@@ -666,7 +666,11 @@ def build_parser() -> argparse.ArgumentParser:
|
||||
commands_parser = subparsers.add_parser(
|
||||
"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
|
||||
|
||||
|
||||
|
||||
@@ -131,6 +131,16 @@ class RebuildSolHighTests(unittest.TestCase):
|
||||
self.assertNotIn("--resume-from", 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):
|
||||
with tempfile.TemporaryDirectory() as directory:
|
||||
root = Path(directory)
|
||||
|
||||
Reference in New Issue
Block a user