Skip to content

Commit

Permalink
update dataset commands docstrings and params
Browse files Browse the repository at this point in the history
  • Loading branch information
hasan7n committed Dec 20, 2023
1 parent 1244d26 commit a05b65e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
31 changes: 19 additions & 12 deletions cli/medperf/commands/dataset/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,25 +42,30 @@ def submit(
data_prep_uid: int = typer.Option(
None, "--data_prep", "-p", help="UID of the desired preparation cube"
),
data_path: str = typer.Option(
..., "--data_path", "-d", help="Location of the data to be prepared"
),
data_path: str = typer.Option(..., "--data_path", "-d", help="Path to the data"),
labels_path: str = typer.Option(
..., "--labels_path", "-l", help="Labels folder location"
..., "--labels_path", "-l", help="Path to the labels"
),
metadata_path: str = typer.Option(
None, "--metadata_path", "-m", help="Metadata folder location"
None,
"--metadata_path",
"-m",
help="Metadata folder location (Might be required if the dataset is already prepared)",
),
name: str = typer.Option(
..., "--name", help="A human-readable name of the dataset"
),
name: str = typer.Option(..., "--name", help="Name of the dataset"),
description: str = typer.Option(
..., "--description", help="Description of the dataset"
None, "--description", help="A description of the dataset"
),
location: str = typer.Option(
..., "--location", help="Location or Institution the data belongs to"
None, "--location", help="Location or Institution the data belongs to"
),
approval: bool = typer.Option(False, "-y", help="Skip approval step"),
submit_as_prepared: bool = typer.Option(
False, "--submit-as-prepared", help="Assume the dataset is already prepared"
False,
"--submit-as-prepared",
help="Use this flag if the dataset is already prepared",
),
):
"""Submits a Dataset instance to the backend"""
Expand All @@ -85,7 +90,9 @@ def submit(
def prepare(
data_uid: str = typer.Option(..., "--data_uid", "-d", help="Dataset UID"),
approval: bool = typer.Option(
False, "-y", help="Skip report submission approval step"
False,
"-y",
help="Skip report submission approval step (In this case, it is assumed to be approved)",
),
):
"""Runs the Data preparation step for a raw dataset"""
Expand All @@ -99,10 +106,10 @@ def prepare(
def set_operational(
data_uid: str = typer.Option(..., "--data_uid", "-d", help="Dataset UID"),
approval: bool = typer.Option(
False, "-y", help="Skip report submission approval step"
False, "-y", help="Skip confirmation and statistics submission approval step"
),
):
"""Runs the Data preparation step for a raw dataset"""
"""Marks a dataset as Operational"""
ui = config.ui
DatasetSetOperational.run(data_uid, approved=approval)
ui.print("✅ Done!")
Expand Down
2 changes: 1 addition & 1 deletion cli/medperf/entities/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class Dataset(Entity, Uploadable, MedperfSchema, DeployableSchema):
"""

description: Optional[str] = Field(None, max_length=20)
location: str = Field(..., max_length=20)
location: Optional[str] = Field(None, max_length=20)
input_data_hash: str
generated_uid: str
data_preparation_mlcube: Union[int, str]
Expand Down

0 comments on commit a05b65e

Please sign in to comment.