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

Not working with current stable Covalent #92

Open
kessler-frost opened this issue Nov 7, 2023 · 0 comments · May be fixed by #93
Open

Not working with current stable Covalent #92

kessler-frost opened this issue Nov 7, 2023 · 0 comments · May be fixed by #93

Comments

@kessler-frost
Copy link
Member

Covalent version: 0.220.0.post2
Python: 3.8

Following error is thrown:

[ERROR] OSError: [Errno 38] Function not implemented
Traceback (most recent call last):
  File "/var/task/exec.py", line 58, in handler
    raise ex
  File "/var/task/exec.py", line 44, in handler
    function, args, kwargs = pickle.load(f)
  File "/var/task/covalent/__init__.py", line 22, in <module>
    from . import executor, leptons  # nopycln: import
  File "/var/task/covalent/executor/__init__.py", line 34, in <module>
    from ..quantum import QCluster, Simulator
  File "/var/task/covalent/quantum/__init__.py", line 17, in <module>
    from .qcluster import QCluster, Simulator
  File "/var/task/covalent/quantum/qcluster/__init__.py", line 21, in <module>
    from .clusters import QCluster
  File "/var/task/covalent/quantum/qcluster/clusters.py", line 21, in <module>
    from .base import AsyncBaseQCluster, BaseQExecutor
  File "/var/task/covalent/quantum/qcluster/base.py", line 22, in <module>
    from mpire.async_result import AsyncResult
  File "/var/task/mpire/__init__.py", line 3, in <module>
    from mpire.pool import WorkerPool
  File "/var/task/mpire/pool.py", line 17, in <module>
    from mpire.async_result import (AsyncResult, AsyncResultType, AsyncResultWithExceptionGetter,
  File "/var/task/mpire/async_result.py", line 7, in <module>
    from mpire.comms import EXIT_FUNC, INIT_FUNC
  File "/var/task/mpire/comms.py", line 10, in <module>
    from mpire.params import WorkerMapParams
  File "/var/task/mpire/params.py", line 13, in <module>
    from mpire.tqdm_utils import get_tqdm
  File "/var/task/mpire/tqdm_utils.py", line 102, in <module>
    class TqdmManager:
  File "/var/task/mpire/tqdm_utils.py", line 104, in TqdmManager
    LOCK = Lock()
  File "/usr/local/lib/python3.8/multiprocessing/context.py", line 68, in Lock
    return Lock(ctx=self.get_context())
  File "/usr/local/lib/python3.8/multiprocessing/synchronize.py", line 162, in __init__
    SemLock.__init__(self, SEMAPHORE, 1, 1, ctx=ctx)
  File "/usr/local/lib/python3.8/multiprocessing/synchronize.py", line 57, in __init__
    sl = self._semlock = _multiprocessing.SemLock(

This is because mpire does this at import time. Thus even patching or overloading the sys.modules doesn't work. Ideally, it would be better if we don't need to update the core covalent because of this AWS Lambda specific error and only modifying this plugin is sufficient somehow.

@kessler-frost kessler-frost linked a pull request Nov 7, 2023 that will close this issue
3 tasks
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 a pull request may close this issue.

1 participant