-
Notifications
You must be signed in to change notification settings - Fork 2
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
Use the pympipool executor #77
Conversation
Per the current API
We can change the standard to pympipool once its next version is live
For now, of course we still want all the infrastructure on hand to specify how to create them instead, but now that they're on the creator we don't really need this `True` business
This is the cause of failure for a couple of these. Might be those awkward expectations |
Ah, perhaps it runs in the notebook because it recognizes that things are being defined in |
# Conflicts: # .binder/environment.yml # .ci_support/environment.yml # docs/environment.yml # setup.py
Ok, failures are from referencing objects defined in the same file but different scopes, such that the executor thinks it's something that should be available by reference but really it still needs to be pickled by value. Cf. this issue over on I can get around this by modifying the existing tests so they never have this same-file-different-scope problem, but I don't want some user/node dev to run into this problem later so let's see if it can be intelligently fixed upstream before giving up. |
The pympipool executor complains about receiving 'self' twice
This check just had a holdover from when the executor attribute was a bool
Is there an equivalent explanation for the coverage tests? Yes, it similarly runs the central reusable workflow with its default value of To test this hypothesis, let's make sure |
That did nothing, I'm getting the exact same |
I am curious if this will play more nicely with pympipool.backend.serial
The path is as expected. Maybe the path needs to be added in another process too? I am now trying just manually using a |
Ok, it looks like the ======================================================================
ERROR: test_creator_access_and_registration (test_composite.TestComposite.test_creator_access_and_registration)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/share/miniconda3/envs/test/lib/python3.11/site-packages/pyiron_workflow/interfaces.py", line 205, in _verify_identifier
module = import_module(package_identifier)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/miniconda3/envs/test/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'static'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/runner/work/pyiron_workflow/pyiron_workflow/tests/unit/test_composite.py", line 71, in test_creator_access_and_registration
self.comp.register("demo", "static.demo_nodes")
File "/usr/share/miniconda3/envs/test/lib/python3.11/site-packages/pyiron_workflow/composite.py", line 517, in register
cls.create.register(domain=domain, package_identifier=package_identifier)
File "/usr/share/miniconda3/envs/test/lib/python3.11/site-packages/pyiron_workflow/interfaces.py", line 163, in register
self._verify_identifier(package_identifier)
File "/usr/share/miniconda3/envs/test/lib/python3.11/site-packages/pyiron_workflow/interfaces.py", line 212, in _verify_identifier
raise ValueError(
ValueError: The package identifier is static.demo_nodes is not valid. Please ensure it is an importable module with a list of Node objects stored in the variable `nodes`.
======================================================================
ERROR: test_registration (test_interfaces.TestCreator.test_registration)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/share/miniconda3/envs/test/lib/python3.11/site-packages/pyiron_workflow/interfaces.py", line 205, in _verify_identifier
module = import_module(package_identifier)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/share/miniconda3/envs/test/lib/python3.11/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1126, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 1204, in _gcd_import
File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
File "<frozen importlib._bootstrap>", line 1140, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'static'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/runner/work/pyiron_workflow/pyiron_workflow/tests/unit/test_interfaces.py", line 27, in test_registration
self.creator.register("demo", "static.demo_nodes")
File "/usr/share/miniconda3/envs/test/lib/python3.11/site-packages/pyiron_workflow/interfaces.py", line 163, in register
self._verify_identifier(package_identifier)
File "/usr/share/miniconda3/envs/test/lib/python3.11/site-packages/pyiron_workflow/interfaces.py", line 212, in _verify_identifier
raise ValueError(
ValueError: The package identifier is static.demo_nodes is not valid. Please ensure it is an importable module with a list of Node objects stored in the variable `nodes`.
---------------------------------------------------------------------- So it looks like the problem is that |
Dammit, I can't invoke the reusable workflow as a step. That means, and the docs explicitly point this case out, that I can't modify the If this problem can't be fixed directly in
|
They can't be used from steps [per docs](https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations)
So that CI will actually fail instead of dangling indefinitely
Per pympipool #239, I'm trying to modify the centralized CI to allow the python path to be expanded. Targeting the branch seems to have failed and push-pull didn't even run:
Ahaaaa, because I have a typo in "pythonpath" |
Perfect! Worked for all three OSs. I updated the upstream branch to also apply the same trick for the coverage job, which is still hanging. |
Note that once everything is settled, the workflow tags will need to be reset to main or a release. |
This will need to be updated to point at a correct tag at the end of the day
Pull Request Test Coverage Report for Build 7052576125
💛 - Coveralls |
Coverage summary from CodacySee diff coverage on Codacy
Coverage variation details
Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: Diff coverage details
Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: See your quality gate settings Change summary preferences |
In anticipation of the new python path features being merged
Closes #75
Replaces
Node.executor = True/False
with providing actual executor instances (while keeping infrastructure support for instead instructing how to build an executor in the future, for nesting/reconnection/submitters).The only big catch right now is that the tests hang on my local machine with the pympipool executor (while they run fine for the built-in and much simpler/weaker
CloudpickleProcessPoolExecutor
). This happens whenever a macro/workflow with children is the one getting an executor -- all the tests where function nodes have an executor work totally fine with both executors. Since this might be related to pympipool tests hanging on mac, I'm just going to naively push this PR and see if the tests pass OK on linux and windows. Additionally, the hanging tests work totally fine when run in a jupyter notebook -- so I'm optimistic this is something that can be overcome, I just need more data to figure out how.TODO:
executor = True
Go look atI'm shoving this to "outside scope" for this PR, getting the PyMPI executor working is enough for nowpympipool
for how the flux and slurm guys get tested and try to do something similar here