Skip to content

Conversation

@skrawcz
Copy link
Contributor

@skrawcz skrawcz commented Feb 9, 2025

Enables Hamilton to be installed in a WASM environment.
This just special cases the environment and doesn't import process pool executor
which isn't available in a WASM env.

Changes

  • import statements largely

How I tested this

  • locally

Notes

  • this should be SQUASH MERGED.
  • when this is merged and released can update tryhamilton.dev

Checklist

  • PR has an informative and human-readable title (this will be pulled into the release notes)
  • Changes are limited to a single goal (no scope creep)
  • Code passed the pre-commit check & code is left cleaner/nicer than when first encountered.
  • Any change in functionality is tested
  • New functions are documented (with a description, list of inputs, and expected output)
  • Placeholder code is flagged / future TODOs are captured in comments
  • Project documentation has been updated if adding/changing functionality.

@skrawcz skrawcz marked this pull request as ready for review February 9, 2025 07:05
@skrawcz skrawcz requested a review from elijahbenizzy February 9, 2025 07:05
Copy link
Contributor

@ellipsis-dev ellipsis-dev bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❌ Changes requested. Reviewed everything up to 4bc1bd2 in 1 minute and 47 seconds

More details
  • Looked at 20 lines of code in 1 files
  • Skipped 0 files when reviewing.
  • Skipped posting 3 drafted comments based on config settings.
1. hamilton/execution/executors.py:7
  • Draft comment:
    Consider adding an inline comment explaining why ProcessPoolExecutor is set to None for WASM. This improves clarity for future maintainers.
  • Reason this comment was not posted:
    Marked as duplicate.
2. hamilton/execution/executors.py:10
  • Draft comment:
    ProcessPoolExecutor is set to None in WASM, but MultiProcessingExecutor later uses it directly. Consider adding a safeguard in MultiProcessingExecutor (or a clear error message) to handle the case where ProcessPoolExecutor is None.
  • Reason this comment was not posted:
    Marked as duplicate.
3. hamilton/execution/executors.py:7
  • Draft comment:
    Add a comment here explaining that on WASM environments (emscripten, wasi) the ProcessPoolExecutor is disabled due to lack of support.
  • Reason this comment was not posted:
    Marked as duplicate.

Workflow ID: wflow_cNwJ4ePYMA77ad2i


Want Ellipsis to fix these issues? Tag @ellipsis-dev in a comment. You can customize Ellipsis with 👍 / 👎 feedback, review rules, user-specific overrides, quiet mode, and more.

Seeing if this enables try hamilton to run the latest
hamilton code.
this seems to work, but then it doesnt...
We don't want to import this in a WASM env. So we gate it
now.
We don't want this in general Hamilton.
@skrawcz skrawcz linked an issue Feb 11, 2025 that may be closed by this pull request
Copy link
Contributor

@elijahbenizzy elijahbenizzy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could have tests but I'm not worried for this change

@elijahbenizzy elijahbenizzy merged commit 5fc93c8 into main Feb 11, 2025
24 checks passed
@elijahbenizzy elijahbenizzy deleted the try-hamilton branch February 11, 2025 21:04
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.

Pyodide/Wasm Support

2 participants