fix governance reqs; allow for sandboxed jupyter notebooks for testing
This commit is contained in:
@@ -19,11 +19,11 @@ def test_dev_run_does_not_require_a_cohort_build(mlflow_tracking):
|
||||
|
||||
|
||||
def test_finish_registers_model_version_and_artifacts(mlflow_tracking, tmp_path):
|
||||
checkpoint = tmp_path / "model.onnx"
|
||||
checkpoint.write_bytes(b"fake-onnx-bytes")
|
||||
notes = tmp_path / "notas.json"
|
||||
notes.write_text("{}")
|
||||
|
||||
run = TrainingRun(domain="cacu", scenario="tamizaje", environment=Environment.DEV)
|
||||
run.log_artifact(ArtifactKind.ONNX_CHECKPOINT, checkpoint, metadata={"opset": 17})
|
||||
run.log_artifact(ArtifactKind.OTRO, notes, metadata={"origen": "prueba"})
|
||||
version = registry.register_run(run.finish(metrics={"auc": 0.81}))
|
||||
|
||||
mv = registry.get("cacu", "tamizaje", version)
|
||||
@@ -31,8 +31,8 @@ def test_finish_registers_model_version_and_artifacts(mlflow_tracking, tmp_path)
|
||||
metrics = registry.client.get_run(mv.run_id).data.metrics
|
||||
assert metrics["auc"] == 0.81
|
||||
|
||||
artifacts = [a.path for a in registry.client.list_artifacts(mv.run_id, path=ArtifactKind.ONNX_CHECKPOINT.value)]
|
||||
assert any(path.endswith("model.onnx") for path in artifacts)
|
||||
artifacts = [a.path for a in registry.client.list_artifacts(mv.run_id, path=ArtifactKind.OTRO.value)]
|
||||
assert any(path.endswith("notas.json") for path in artifacts)
|
||||
|
||||
|
||||
def test_read_only_repository_blocks_writes(cacu_db):
|
||||
|
||||
Reference in New Issue
Block a user