-
Notifications
You must be signed in to change notification settings - Fork 555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Core] make per-cloud catalog lookup parallel #4483
Changes from 10 commits
26e9067
c9a2ce3
fb6c8ac
3571b55
e8e13bb
dad3a65
0f21c7c
99a1edb
2ff4517
4619413
9bb757e
a9026db
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1293,9 +1293,12 @@ def _fill_in_launchable_resources( | |
if resources.cloud is not None else enabled_clouds) | ||
# If clouds provide hints, store them for later printing. | ||
hints: Dict[clouds.Cloud, str] = {} | ||
for cloud in clouds_list: | ||
feasible_resources = cloud.get_feasible_launchable_resources( | ||
resources, num_nodes=task.num_nodes) | ||
|
||
feasible_list = subprocess_utils.run_in_parallel( | ||
lambda cloud, r=resources, n=task.num_nodes: | ||
(cloud, cloud.get_feasible_launchable_resources(r, n)), | ||
clouds_list) | ||
for cloud, feasible_resources in feasible_list: | ||
Comment on lines
+1297
to
+1301
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. very minor nit: the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good catch, with this new knowledge, I personally still tend to loosen the behavior dependency on the |
||
if feasible_resources.hint is not None: | ||
hints[cloud] = feasible_resources.hint | ||
if len(feasible_resources.resources_list) > 0: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style nit: use kwargs for non-obvious argument meaning : )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!