Skip to content

Commit

Permalink
mlcubes in development by default
Browse files Browse the repository at this point in the history
  • Loading branch information
hasan7n committed Dec 11, 2023
1 parent eb0aaa4 commit 4fc0af9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
12 changes: 6 additions & 6 deletions cli/cli_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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)
##########################################################
Expand Down
6 changes: 6 additions & 0 deletions cli/medperf/commands/mlcube/mlcube.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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!")
Expand Down
3 changes: 1 addition & 2 deletions cli/medperf/entities/schemas.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down

0 comments on commit 4fc0af9

Please sign in to comment.