Skip to content

Commit

Permalink
fix bug in download (#148)
Browse files Browse the repository at this point in the history
The order of `steps` returned by `wf.query_step_by_key` is not
guaranteed.

---------

Co-authored-by: Sikai Yao <yaosk@dp.tech>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
3 people committed Mar 16, 2023
1 parent 1d21697 commit 068cea9
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions dpgen2/utils/download_dpgen2_artifacts.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,9 +190,7 @@ def download_dpgen2_artifacts_by_def(
wf_info = wf.query()
wf_steps = [wf_info.get_step(key=kk)[0] for kk in step_keys]
# make step dict
step_dict = {}
for kk, ss in zip(step_keys, wf_steps):
step_dict[kk] = ss
step_dict = {wf_step.key: wf_step for wf_step in wf_steps}

# download all items
for ii in dld_items:
Expand Down

0 comments on commit 068cea9

Please sign in to comment.