Skip to content

[Bug] Cannot import container_abcs when using torch nightly #686

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

Closed
feynmanliang opened this issue Feb 16, 2021 · 2 comments
Closed

[Bug] Cannot import container_abcs when using torch nightly #686

feynmanliang opened this issue Feb 16, 2021 · 2 comments
Labels
bug Something isn't working

Comments

@feynmanliang
Copy link

🐛 Bug

See pytorch/pytorch@58eb233#diff-b3c160475f0fbe8ad50310f92d3534172ba98203387a962b7dc8f4a23b15cf4dL35 and NVIDIA/apex#1049

To reproduce

https://app.circleci.com/pipelines/github/facebookincubator/beanmachine/2334/workflows/e44dbeaf-6750-4966-b020-7ecddcf55c27/jobs/5701

** Stack trace/error message **

Traceback:
../.local/lib/python3.7/site-packages/_pytest/python.py:581: in _importtestmodule
    mod = import_path(self.fspath, mode=importmode, root=self.config.rootpath)
../.local/lib/python3.7/site-packages/_pytest/pathlib.py:511: in import_path
    spec.loader.exec_module(mod)  # type: ignore[union-attr]
../.local/lib/python3.7/site-packages/_pytest/assertion/rewrite.py:169: in exec_module
    exec(co, module.__dict__)
src/beanmachine/ppl/experimental/tests/gp/inference_test.py:12: in <module>
    from beanmachine.ppl.experimental.gp.models import SimpleGP
../.local/lib/python3.7/site-packages/beanmachine/ppl/experimental/gp/models.py:5: in <module>
    from botorch.models.gpytorch import GPyTorchModel
../.local/lib/python3.7/site-packages/botorch/__init__.py:7: in <module>
    from botorch import (
../.local/lib/python3.7/site-packages/botorch/acquisition/__init__.py:26: in <module>
    from botorch.acquisition.knowledge_gradient import (
../.local/lib/python3.7/site-packages/botorch/acquisition/knowledge_gradient.py:40: in <module>
    from botorch.acquisition.monte_carlo import MCAcquisitionFunction, qSimpleRegret
../.local/lib/python3.7/site-packages/botorch/acquisition/monte_carlo.py:30: in <module>
    from botorch.acquisition.utils import prune_inferior_points
../.local/lib/python3.7/site-packages/botorch/acquisition/utils.py:19: in <module>
    from botorch.acquisition import analytic, multi_objective
../.local/lib/python3.7/site-packages/botorch/acquisition/multi_objective/__init__.py:11: in <module>
    from botorch.acquisition.multi_objective.monte_carlo import (
../.local/lib/python3.7/site-packages/botorch/acquisition/multi_objective/monte_carlo.py:36: in <module>
    from botorch.utils.torch import BufferDict
../.local/lib/python3.7/site-packages/botorch/utils/torch.py:14: in <module>
    from torch._six import container_abcs
E   ImportError: cannot import name 'container_abcs' from 'torch._six' (/home/circleci/.local/lib/python3.7/site-packages/torch/_six.py)

Expected Behavior

Either a dependency error (i.e. capping the torch version in https://github.com/pytorch/botorch/blob/master/setup.py#L78), or no error at all.

@feynmanliang feynmanliang added the bug Something isn't working label Feb 16, 2021
@Balandat
Copy link
Contributor

This is already fixed on master, will be in the next release.

@feynmanliang
Copy link
Author

Should've searched first, my bad... Thanks for clarifying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants