Skip to content

Commit

Permalink
fix: return idx_int
Browse files Browse the repository at this point in the history
Signed-off-by: Hayato Mizushima <[email protected]>
  • Loading branch information
hayato-m126 committed Sep 9, 2024
1 parent 69a6a96 commit 1e7eba0
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,8 @@ def get_dataset_index(idx_str: str, dataset_length: int) -> int | str:
return f"dataset_index {idx_int} not in index range"
except ValueError:
return f"cannot parser dataset_index {idx_str}"
else:
return idx_int


def extract_index_from_id(t4_dataset_id: str, datasets: list[dict]) -> int | str:
Expand Down Expand Up @@ -170,7 +172,7 @@ def ensure_arg_compatibility(context: LaunchContext) -> list:
dataset_index = extract_index_from_id(conf["t4_dataset_id"], datasets)
else:
dataset_index = get_dataset_index(conf["dataset_index"], len(datasets))
if isinstance(dataset_index, str):
if isinstance(dataset_dir, str):
return [LogInfo(msg=dataset_index)]

for k, v in datasets[dataset_index].items():
Expand Down

0 comments on commit 1e7eba0

Please sign in to comment.