Skip to content

Commit

Permalink
Fix storage path. Add status to list
Browse files Browse the repository at this point in the history
  • Loading branch information
aristizabal95 committed Dec 12, 2023
1 parent d2bd67f commit ce91153
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions scripts/monitor-dset.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def update_summary(self, report: dict):

widgets = []
for name, val in status_percents.items():
wname = Label(name)
wname = Label(name.capitalize().replace("_", " "))
wpbar = ProgressBar(total=1, show_eta=False)
wpbar.advance(val)
widget = Center(wname, wpbar, classes="pbar")
Expand Down Expand Up @@ -440,7 +440,14 @@ def update_list(self, report: dict):

widgets = []
for subject in subjects:
widget = ListItem(Label(subject))
if subject == "SUMMARY":
widget = ListItem(Label(f"{subject}"))
else:
status = report_df.loc[subject]["status_name"]
widget = ListItem(
Label(subject),
Label(status.capitalize().replace("_", " "), classes="subtitle")
)
if subject in self.highlight:
widget.set_class(True, "highlight")
widgets.append(widget)
Expand Down Expand Up @@ -838,16 +845,15 @@ def action_respond(self, answer: str):


def main(
name: str = Argument(..., help=NAME_HELP),
mlcube_uid: int = Argument(..., help=MLCUBE_HELP),
dataset_uid: str = Argument(..., help=NAME_HELP),
stages_path: str = Option(DEFAULT_STAGES_PATH, help=STAGES_HELP),
output_path: str = Option(None, "-o", "--out", help="CSV file to store report in"),
):
config_p = read_config()
set_custom_config(config_p.active_profile)

staging_path = storage_path(config.staging_data_storage)
dset_path = os.path.join(staging_path, f"{name}_{mlcube_uid}")
dsets_path = storage_path(config.data_storage)
dset_path = os.path.join(dsets_path, dataset_uid)

if not os.path.exists(dset_path):
print(
Expand Down

0 comments on commit ce91153

Please sign in to comment.