Skip to content
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

Forward-merge branch-24.06 into branch-24.08 #47

Merged
merged 1 commit into from
May 21, 2024
Merged

Conversation

rapids-bot[bot]
Copy link

@rapids-bot rapids-bot bot commented May 21, 2024

Forward-merge triggered by push to branch-24.06 that creates a PR to keep branch-24.08 up-to-date. If this PR is unable to be immediately merged due to conflicts, it will remain open for the team to manually merge. See forward-merger docs for more info.

Module loads via `python -m *` take a different code path than direct usage of the dask/distributed CLI. The finder is still run to get the spec, but instead of the loader's `[create|exec]_module` methods being called next the loader's `get_code` method is called to simply load the `__main__` module as a text file to be executed directly. To support this use case, this PR splits up the finder and the loader. The loader is now a SourceFileLoader that is instantiated once per file to be loaded, allowing it to support loading the text of that file on demand by command line invocations. In order for this to work, the spec needs to be properly configured before the finder's `find_spec` call returns. The `update_spec` function I had in place before was a bit of a hack. This PR replaces that with a call to `importlib.util.find_spec` on the real module to get the full spec right up front. This allowed me to do quite a bit of other simplification; since the spec is now correct up front, I removed `update_spec` entirely and converted the loaders from stateful classes that updated the spec on load to simple factories since the spec is already guaranteed to be correct. Finally, I added some new tests of the CLI, module usage, and the accessor module.

Closes #45 
Closes rapidsai/docker#668

Authors:
  - Vyas Ramasubramani (https://github.com/vyasr)

Approvers:
  - Richard (Rick) Zamora (https://github.com/rjzamora)

URL: #46
@rapids-bot rapids-bot bot requested review from vyasr and a team as code owners May 21, 2024 21:18
@GPUtester GPUtester merged commit 2d862cc into branch-24.08 May 21, 2024
Copy link
Author

rapids-bot bot commented May 21, 2024

SUCCESS - forward-merge complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants