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

Is it still possible to use the pypy solver? #70

Open
yichao-liang opened this issue Mar 28, 2021 · 1 comment
Open

Is it still possible to use the pypy solver? #70

yichao-liang opened this issue Mar 28, 2021 · 1 comment

Comments

@yichao-liang
Copy link

yichao-liang commented Mar 28, 2021

I'm trying to use the pypy solver on the list task but besides some typos in solveForTask_pypy, it seems it would try to import torch module in pypy, which seem not very easy to install at the moment... Is there any way to walk around this?

Many thanks!

@yichao-liang
Copy link
Author

The error message is as follows:

(python) Launching list(int) -> list(int) (149 tasks) w/ 1 CPUs. 0.000000 <= MDL < 1.500000. Timeout 10.000000.
(python) Launching list(int) -> list(bool) (18 tasks) w/ 1 CPUs. 0.000000 <= MDL < 1.500000. Timeout 10.000000.
(python) Launching list(int) -> int (31 tasks) w/ 1 CPUs. 0.000000 <= MDL < 1.500000. Timeout 10.000000.
(python) Launching list(int) -> bool (17 tasks) w/ 1 CPUs. 0.000000 <= MDL < 1.500000. Timeout 10.000000.
(python) Launching int -> int (1 tasks) w/ 1 CPUs. 0.000000 <= MDL < 1.500000. Timeout 10.000000.
(python) Launching int -> list(int) (1 tasks) w/ 1 CPUs. 0.000000 <= MDL < 1.500000. Timeout 10.000000.
Traceback (most recent call last):
Traceback (most recent call last):
  File "/home/yliang/ec/bin/../dreamcoder/../bin/compiledDriver.py", line 18, in <module>
    request = pickle.load(sys.stdin.buffer)
  File "/home/yliang/ec/bin/../dreamcoder/../bin/compiledDriver.py", line 18, in <module>
    request = pickle.load(sys.stdin.buffer)
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1571, in _load
    encoding=encoding, errors=errors).load()
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1070, in load
    dispatch[key[0]](self)
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1358, in load_global
    klass = self.find_class(module, name)
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1408, in find_class
    __import__(module, level=0)
  File "/home/yliang/ec/bin/../dreamcoder/__init__.py", line 29, in <module>
    from dreamcoder import dreamcoder
  File "/home/yliang/ec/bin/../dreamcoder/dreamcoder.py", line 7, in <module>
    from dreamcoder.recognition import *
  File "/home/yliang/ec/bin/../dreamcoder/recognition.py", line 9, in <module>
    import torch
ModuleNotFoundError: No module named 'torch'
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1571, in _load
    encoding=encoding, errors=errors).load()
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1070, in load
    dispatch[key[0]](self)
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1358, in load_global
    klass = self.find_class(module, name)
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1408, in find_class
    __import__(module, level=0)
  File "/home/yliang/ec/bin/../dreamcoder/__init__.py", line 29, in <module>
    from dreamcoder import dreamcoder
  File "/home/yliang/ec/bin/../dreamcoder/dreamcoder.py", line 7, in <module>
    from dreamcoder.recognition import *
  File "/home/yliang/ec/bin/../dreamcoder/recognition.py", line 9, in <module>
    import torch
ModuleNotFoundError: No module named 'torch'
PANIC! Exception in child worker: invalid load key, '>'.
Traceback (most recent call last):
  File "/home/yliang/ec/bin/../dreamcoder/enumeration.py", line 238, in _f
    r = f(*a, **k)
  File "/home/yliang/ec/bin/../dreamcoder/enumeration.py", line 358, in solveForTask_pypy
    lowerBound=lowerBound, upperBound=upperBound)
  File "/home/yliang/ec/bin/../dreamcoder/utilities.py", line 431, in callCompiled
    success, result = dill.load(p.stdout)
  File "/home/yliang/miniconda3/envs/sketch/lib/python3.7/site-packages/dill/_dill.py", line 278, in load
    return Unpickler(file, ignore=ignore, **kwds).load()
  File "/home/yliang/miniconda3/envs/sketch/lib/python3.7/site-packages/dill/_dill.py", line 481, in load
    obj = StockUnpickler.load(self)
_pickle.UnpicklingError: invalid load key, '>'.

Traceback (most recent call last):
  File "bin/list.py", line 19, in <module>
    main(args)
  File "/home/yliang/ec/bin/../dreamcoder/domains/list/main.py", line 412, in main
    explorationCompression(baseGrammar, train, testingTasks=test, **args)
  File "/home/yliang/ec/bin/../dreamcoder/dreamcoder.py", line 133, in explorationCompression
    for r in ecIterator(*arguments, **keywords):
  File "/home/yliang/ec/bin/../dreamcoder/dreamcoder.py", line 412, in ecIterator
    evaluationTimeout=evaluationTimeout)
  File "/home/yliang/ec/bin/../dreamcoder/dreamcoder.py", line 561, in default_wake_generative
    evaluationTimeout=evaluationTimeout)
  File "/home/yliang/ec/bin/../dreamcoder/enumeration.py", line 186, in multicoreEnumeration
    assert False
AssertionError
Traceback (most recent call last):
  File "/home/yliang/ec/bin/../dreamcoder/../bin/compiledDriver.py", line 18, in <module>
    request = pickle.load(sys.stdin.buffer)
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1571, in _load
    encoding=encoding, errors=errors).load()
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1070, in load
    dispatch[key[0]](self)
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1358, in load_global
    klass = self.find_class(module, name)
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1408, in find_class
    __import__(module, level=0)
  File "/home/yliang/ec/bin/../dreamcoder/__init__.py", line 29, in <module>
    from dreamcoder import dreamcoder
  File "/home/yliang/ec/bin/../dreamcoder/dreamcoder.py", line 7, in <module>
    from dreamcoder.recognition import *
  File "/home/yliang/ec/bin/../dreamcoder/recognition.py", line 9, in <module>
    import torch
ModuleNotFoundError: No module named 'torch'
Traceback (most recent call last):
  File "/home/yliang/ec/bin/../dreamcoder/../bin/compiledDriver.py", line 18, in <module>
    request = pickle.load(sys.stdin.buffer)
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1571, in _load
    encoding=encoding, errors=errors).load()
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1070, in load
    dispatch[key[0]](self)
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1358, in load_global
    klass = self.find_class(module, name)
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1408, in find_class
    __import__(module, level=0)
  File "/home/yliang/ec/bin/../dreamcoder/__init__.py", line 29, in <module>
    from dreamcoder import dreamcoder
  File "/home/yliang/ec/bin/../dreamcoder/dreamcoder.py", line 7, in <module>
    from dreamcoder.recognition import *
  File "/home/yliang/ec/bin/../dreamcoder/recognition.py", line 9, in <module>
    import torch
ModuleNotFoundError: No module named 'torch'
Traceback (most recent call last):
  File "/home/yliang/ec/bin/../dreamcoder/../bin/compiledDriver.py", line 18, in <module>
    request = pickle.load(sys.stdin.buffer)
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1571, in _load
    encoding=encoding, errors=errors).load()
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1070, in load
    dispatch[key[0]](self)
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1358, in load_global
    klass = self.find_class(module, name)
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1408, in find_class
    __import__(module, level=0)
  File "/home/yliang/ec/bin/../dreamcoder/__init__.py", line 29, in <module>
    from dreamcoder import dreamcoder
  File "/home/yliang/ec/bin/../dreamcoder/dreamcoder.py", line 7, in <module>
    from dreamcoder.recognition import *
  File "/home/yliang/ec/bin/../dreamcoder/recognition.py", line 9, in <module>
    import torch
ModuleNotFoundError: No module named 'torch'
Traceback (most recent call last):
  File "/home/yliang/ec/bin/../dreamcoder/../bin/compiledDriver.py", line 18, in <module>
    request = pickle.load(sys.stdin.buffer)
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1571, in _load
    encoding=encoding, errors=errors).load()
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1070, in load
    dispatch[key[0]](self)
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1358, in load_global
    klass = self.find_class(module, name)
  File "/home/yliang/miniconda3/envs/sketch/lib-python/3/pickle.py", line 1408, in find_class
    __import__(module, level=0)
  File "/home/yliang/ec/bin/../dreamcoder/__init__.py", line 29, in <module>
    from dreamcoder import dreamcoder
  File "/home/yliang/ec/bin/../dreamcoder/dreamcoder.py", line 7, in <module>
    from dreamcoder.recognition import *
  File "/home/yliang/ec/bin/../dreamcoder/recognition.py", line 9, in <module>
    import torch
ModuleNotFoundError: No module named 'torch'

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

No branches or pull requests

1 participant