diff --git a/dpgen2/utils/download_dpgen2_artifacts.py b/dpgen2/utils/download_dpgen2_artifacts.py index b5f69153..8ab4cb61 100644 --- a/dpgen2/utils/download_dpgen2_artifacts.py +++ b/dpgen2/utils/download_dpgen2_artifacts.py @@ -359,9 +359,9 @@ def _dl_step_item( [step_key, io, name] = item.split(global_step_def_split) pref = _item_path(prefix, item) if io in ["input"]: - target = step.inputs.artifacts[name] + target = step.inputs.artifacts.get(name) elif io in ["output"]: - target = step.outputs.artifacts[name] + target = step.outputs.artifacts.get(name) else: raise RuntimeError("unknown io style {io}") try: diff --git a/tests/utils/test_dl_dpgen2_arti.py b/tests/utils/test_dl_dpgen2_arti.py index c1166678..a9f251ac 100644 --- a/tests/utils/test_dl_dpgen2_arti.py +++ b/tests/utils/test_dl_dpgen2_arti.py @@ -28,6 +28,9 @@ class MockedArti: + def get(self, key): + return self.__getitem__(key) + def __getitem__( self, key, diff --git a/tests/utils/test_dl_dpgen2_arti_by_def.py b/tests/utils/test_dl_dpgen2_arti_by_def.py index 91d35e93..e6a30a32 100644 --- a/tests/utils/test_dl_dpgen2_arti_by_def.py +++ b/tests/utils/test_dl_dpgen2_arti_by_def.py @@ -30,6 +30,9 @@ class MockedArti: + def get(self, key): + return self.__getitem__(key) + def __getitem__( self, key,