diff --git a/cli/cli_tests.sh b/cli/cli_tests.sh index e1e2d0041..7bdbc79d7 100755 --- a/cli/cli_tests.sh +++ b/cli/cli_tests.sh @@ -95,27 +95,27 @@ echo "=====================================" echo "Submit cubes" echo "=====================================" -medperf mlcube submit --name prep -m $PREP_MLCUBE -p $PREP_PARAMS +medperf mlcube submit --name prep -m $PREP_MLCUBE -p $PREP_PARAMS --operational checkFailed "Prep submission failed" PREP_UID=$(medperf mlcube ls | tail -n 1 | tr -s ' ' | cut -d ' ' -f 2) -medperf mlcube submit --name model1 -m $MODEL_MLCUBE -p $MODEL1_PARAMS -a $MODEL_ADD +medperf mlcube submit --name model1 -m $MODEL_MLCUBE -p $MODEL1_PARAMS -a $MODEL_ADD --operational checkFailed "Model1 submission failed" MODEL1_UID=$(medperf mlcube ls | tail -n 1 | tr -s ' ' | cut -d ' ' -f 2) -medperf mlcube submit --name model2 -m $MODEL_MLCUBE -p $MODEL2_PARAMS -a $MODEL_ADD +medperf mlcube submit --name model2 -m $MODEL_MLCUBE -p $MODEL2_PARAMS -a $MODEL_ADD --operational checkFailed "Model2 submission failed" MODEL2_UID=$(medperf mlcube ls | tail -n 1 | tr -s ' ' | cut -d ' ' -f 2) -medperf mlcube submit --name model3 -m $MODEL_WITH_SINGULARITY -p $MODEL3_PARAMS -a $MODEL_ADD -i $MODEL_SING_IMAGE +medperf mlcube submit --name model3 -m $MODEL_WITH_SINGULARITY -p $MODEL3_PARAMS -a $MODEL_ADD -i $MODEL_SING_IMAGE --operational checkFailed "Model3 submission failed" MODEL3_UID=$(medperf mlcube ls | tail -n 1 | tr -s ' ' | cut -d ' ' -f 2) -medperf mlcube submit --name model-fail -m $FAILING_MODEL_MLCUBE -p $MODEL4_PARAMS -a $MODEL_ADD +medperf mlcube submit --name model-fail -m $FAILING_MODEL_MLCUBE -p $MODEL4_PARAMS -a $MODEL_ADD --operational checkFailed "failing model submission failed" FAILING_MODEL_UID=$(medperf mlcube ls | tail -n 1 | tr -s ' ' | cut -d ' ' -f 2) -medperf mlcube submit --name metrics -m $METRIC_MLCUBE -p $METRIC_PARAMS +medperf mlcube submit --name metrics -m $METRIC_MLCUBE -p $METRIC_PARAMS --operational checkFailed "Metrics submission failed" METRICS_UID=$(medperf mlcube ls | tail -n 1 | tr -s ' ' | cut -d ' ' -f 2) ########################################################## diff --git a/cli/medperf/commands/mlcube/mlcube.py b/cli/medperf/commands/mlcube/mlcube.py index e5b0253ee..4c365e574 100644 --- a/cli/medperf/commands/mlcube/mlcube.py +++ b/cli/medperf/commands/mlcube/mlcube.py @@ -85,6 +85,11 @@ def submit( help="Identifier to download the image file. See the description above", ), image_hash: str = typer.Option("", "--image-hash", help="hash of image file"), + operational: bool = typer.Option( + False, + "--operational", + help="Submit the MLCube as OPERATIONAL", + ), ): """Submits a new cube to the platform.\n The following assets:\n @@ -110,6 +115,7 @@ def submit( "image_tarball_hash": image_hash, "additional_files_tarball_url": additional_file, "additional_files_tarball_hash": additional_hash, + "state": "OPERATION" if operational else "DEVELOPMENT", } SubmitCube.run(mlcube_info) config.ui.print("✅ Done!") diff --git a/cli/medperf/entities/schemas.py b/cli/medperf/entities/schemas.py index ca1db3ad2..0e7a54291 100644 --- a/cli/medperf/entities/schemas.py +++ b/cli/medperf/entities/schemas.py @@ -91,8 +91,7 @@ def name_max_length(cls, v, *, values, **kwargs): class DeployableSchema(BaseModel): - # TODO: This must change after allowing edits - state: str = "OPERATION" + state: str = "DEVELOPMENT" class ApprovableSchema(BaseModel):