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

[BUG]: No module named 'superduperdb.container' #1288

Closed
frozenmafia opened this issue Nov 13, 2023 · 5 comments
Closed

[BUG]: No module named 'superduperdb.container' #1288

frozenmafia opened this issue Nov 13, 2023 · 5 comments

Comments

@frozenmafia
Copy link
Contributor

Contact Details [Optional]

[email protected]

System Information

{
  "cfg": {
    "data_backend": "mongodb://localhost:27017",
    "vector_search": "in_memory",
    "artifact_store": null,
    "metadata_store": null,
    "cluster": {
      "distributed": false,
      "deserializers": [],
      "serializers": [],
      "dask_scheduler": "tcp://localhost:8786",
      "local": true,
      "backfill_batch_size": 100
    },
    "apis": {
      "retry": {
        "stop_after_attempt": 2,
        "wait_max": 10.0,
        "wait_min": 4.0,
        "wait_multiplier": 1.0
      }
    },
    "logging": {
      "level": "INFO",
      "type": "SYSTEM",
      "kwargs": {}
    },
    "server": {
      "host": "127.0.0.1",
      "port": 3223,
      "protocol": "http"
    },
    "downloads": {
      "hybrid": false,
      "root": "data/downloads"
    },
    "fold_probability": 0.05
  },
  "cwd": "/home/luffy",
  "freeze": [
    "aiohttp==3.8.6",
    "aiosignal==1.3.1",
    "annotated-types==0.6.0",
    "anyio==4.0.0",
    "appdirs==1.4.4",
    "apturl==0.5.2",
    "argcomplete==1.8.1",
    "argon2-cffi==23.1.0",
    "argon2-cffi-bindings==21.2.0",
    "arrow==1.3.0",
    "asttokens==2.4.1",
    "async-lru==2.0.4",
    "async-timeout==4.0.3",
    "atpublic==4.0",
    "attrs==23.1.0",
    "Babel==2.13.1",
    "bcrypt==3.2.0",
    "beautifulsoup4==4.10.0",
    "beniget==0.4.1",
    "bidict==0.22.1",
    "bleach==6.1.0",
    "blinker==1.7.0",
    "boto3==1.28.84",
    "botocore==1.31.84",
    "Brlapi==0.8.3",
    "Brotli==1.0.9",
    "cachetools==5.3.2",
    "catkin-pkg-modules==1.0.0",
    "certifi==2020.6.20",
    "cffi==1.16.0",
    "chardet==4.0.0",
    "charset-normalizer==3.3.2",
    "click==8.1.7",
    "cloudpickle==3.0.0",
    "colcon-argcomplete==0.3.3",
    "colcon-bash==0.5.0",
    "colcon-cd==0.1.1",
    "colcon-cmake==0.2.28",
    "colcon-common-extensions==0.3.0",
    "colcon-core==0.15.0",
    "colcon-defaults==0.2.8",
    "colcon-devtools==0.2.4",
    "colcon-installed-package-information==0.1.0",
    "colcon-library-path==0.2.1",
    "colcon-metadata==0.2.5",
    "colcon-notification==0.2.15",
    "colcon-output==0.2.13",
    "colcon-override-check==0.0.1",
    "colcon-package-information==0.3.3",
    "colcon-package-selection==0.2.10",
    "colcon-parallel-executor==0.3.0",
    "colcon-pkg-config==0.1.0",
    "colcon-powershell==0.4.0",
    "colcon-python-setup-py==0.2.8",
    "colcon-recursive-crawl==0.2.3",
    "colcon-ros==0.4.1",
    "colcon-test-result==0.3.8",
    "colcon-zsh==0.5.0",
    "colorama==0.4.4",
    "comm==0.2.0",
    "command-not-found==0.3",
    "configobj==5.0.6",
    "cov-core==1.15.0",
    "coverage==6.2",
    "cryptography==3.4.8",
    "cupshelpers==1.0",
    "cycler==0.11.0",
    "dask==2023.11.0",
    "dbus-python==1.2.18",
    "debugpy==1.8.0",
    "decorator==4.4.2",
    "defer==1.0.6",
    "defusedxml==0.7.1",
    "dill==0.3.7",
    "distlib==0.3.7",
    "distributed==2023.11.0",
    "distro==1.7.0",
    "distro-info==1.1+ubuntu0.1",
    "dnspython==2.4.2",
    "docutils==0.17.1",
    "duckdb==0.9.1",
    "duckdb-engine==0.9.2",
    "duplicity==0.8.21",
    "empy==3.3.4",
    "exceptiongroup==1.1.3",
    "executing==2.0.1",
    "fasteners==0.14.1",
    "fastjsonschema==2.18.1",
    "fil==1.3.0",
    "filelock==3.13.0",
    "flake8==4.0.1",
    "Flask==3.0.0",
    "Flask-Cors==4.0.0",
    "Flask-HTTPAuth==4.8.0",
    "fonttools==4.29.1",
    "fqdn==1.5.1",
    "frozenlist==1.4.0",
    "fs==2.4.12",
    "fsspec==2023.6.0",
    "future==0.18.2",
    "gast==0.5.2",
    "gcsfs==2023.6.0",
    "google-api-core==2.14.0",
    "google-auth==2.23.4",
    "google-auth-oauthlib==1.1.0",
    "google-cloud-core==2.3.3",
    "google-cloud-storage==2.13.0",
    "google-crc32c==1.5.0",
    "google-resumable-media==2.6.0",
    "googleapis-common-protos==1.61.0",
    "greenlet==3.0.1",
    "html5lib==1.1",
    "httplib2==0.20.2",
    "humanize==4.8.0",
    "ibis-framework==7.0.0",
    "idna==3.3",
    "importlib-metadata==6.8.0",
    "importlib-resources==6.1.1",
    "iniconfig==1.1.1",
    "ipykernel==6.26.0",
    "ipython==8.17.2",
    "ipython_genutils==0.2.0",
    "ipywidgets==8.1.1",
    "isoduration==20.11.0",
    "itsdangerous==2.1.2",
    "jedi==0.19.1",
    "jeepney==0.7.1",
    "Jinja2==3.1.2",
    "jmespath==1.0.1",
    "joblib==1.3.2",
    "json5==0.9.14",
    "jsonpointer==2.4",
    "jsonschema==4.19.2",
    "jsonschema-specifications==2023.7.1",
    "jupyter==1.0.0",
    "jupyter-console==6.6.3",
    "jupyter-events==0.9.0",
    "jupyter-lsp==2.2.0",
    "jupyter_client==8.6.0",
    "jupyter_core==5.5.0",
    "jupyter_server==2.10.0",
    "jupyter_server_terminals==0.4.4",
    "jupyterlab==4.0.8",
    "jupyterlab-pygments==0.2.2",
    "jupyterlab-widgets==3.0.9",
    "jupyterlab_server==2.25.1",
    "keyring==23.5.0",
    "kiwisolver==1.3.2",
    "language-selector==0.1",
    "lark==1.1.1",
    "launchpadlib==1.10.16",
    "lazr.restfulclient==0.14.4",
    "lazr.uri==1.0.6",
    "locket==1.0.0",
    "lockfile==0.12.2",
    "loguru==0.7.2",
    "loki-logger-handler==0.1.1",
    "louis==3.20.0",
    "lxml==4.8.0",
    "lz4==3.1.3+dfsg",
    "macaroonbakery==1.3.1",
    "Mako==1.1.3",
    "markdown-it-py==3.0.0",
    "MarkupSafe==2.1.3",
    "matplotlib==3.5.1",
    "matplotlib-inline==0.1.6",
    "mccabe==0.6.1",
    "mdurl==0.1.2",
    "mistune==3.0.2",
    "mongomock==4.1.2",
    "monotonic==1.6",
    "more-itertools==8.10.0",
    "mpi4py==3.1.3",
    "mpmath==0.0.0",
    "msgpack==1.0.7",
    "multidict==6.0.4",
    "multipledispatch==1.0.0",
    "nbclient==0.9.0",
    "nbconvert==7.11.0",
    "nbformat==5.9.2",
    "nest-asyncio==1.5.8",
    "netifaces==0.11.0",
    "networkx==3.2.1",
    "nose2==0.9.2",
    "notebook==7.0.6",
    "notebook_shim==0.2.3",
    "notify2==0.3",
    "numpy==1.26.2",
    "oauthlib==3.2.0",
    "olefile==0.46",
    "overrides==7.4.0",
    "packaging==21.3",
    "pandas==2.1.3",
    "pandocfilters==1.5.0",
    "paramiko==2.9.3",
    "parso==0.8.3",
    "parsy==2.1",
    "partd==1.4.1",
    "pexpect==4.8.0",
    "Pillow==10.1.0",
    "pins==0.8.3",
    "pip==22.0.2",
    "platformdirs==3.11.0",
    "pluggy==0.13.0",
    "ply==3.11",
    "prometheus-client==0.18.0",
    "prompt-toolkit==3.0.40",
    "protobuf==4.25.0",
    "psutil==5.9.0",
    "ptyprocess==0.7.0",
    "pure-eval==0.2.2",
    "py==1.10.0",
    "pyarrow==13.0.0",
    "pyasn1==0.5.0",
    "pyasn1-modules==0.3.0",
    "pycairo==1.20.1",
    "pycodestyle==2.8.0",
    "pycparser==2.21",
    "pycups==2.0.1",
    "pydantic==2.5.0",
    "pydantic_core==2.14.1",
    "pydocstyle==6.1.1",
    "pydot==1.4.2",
    "pyflakes==2.4.0",
    "Pygments==2.16.1",
    "PyGObject==3.42.1",
    "PyJWT==2.3.0",
    "pylance==0.8.14",
    "pymacaroons==0.13.0",
    "pymongo==4.6.0",
    "PyNaCl==1.5.0",
    "pyparsing==2.4.7",
    "PyQt5==5.15.6",
    "PyQt5-sip==12.9.1",
    "pyRFC3339==1.1",
    "pytest==6.2.5",
    "pytest-cov==3.0.0",
    "python-apt==2.4.0+ubuntu2",
    "python-dateutil==2.8.2",
    "python-debian==0.1.43+ubuntu1.1",
    "python-json-logger==2.0.7",
    "pythran==0.10.0",
    "pytz==2023.3.post1",
    "pyxdg==0.27",
    "PyYAML==5.4.1",
    "pyzmq==25.1.1",
    "qtconsole==5.5.0",
    "QtPy==2.4.1",
    "readerwriterlock==1.0.9",
    "referencing==0.30.2",
    "regex==2023.10.3",
    "reportlab==3.6.8",
    "requests==2.31.0",
    "requests-oauthlib==1.3.1",
    "rfc3339-validator==0.1.4",
    "rfc3986-validator==0.1.1",
    "rich==13.6.0",
    "roman==3.3",
    "rosdistro-modules==0.9.0",
    "rospkg-modules==1.5.0",
    "rpds-py==0.12.0",
    "rsa==4.9",
    "s3transfer==0.7.0",
    "safer==4.10.1",
    "scikit-learn==1.3.2",
    "scipy==1.8.0",
    "SecretStorage==3.3.1",
    "semver==3.0.2",
    "Send2Trash==1.8.2",
    "sentinels==1.0.0",
    "setuptools==58.2.0",
    "six==1.16.0",
    "sniffio==1.3.0",
    "snowballstemmer==2.2.0",
    "sortedcontainers==2.4.0",
    "soupsieve==2.3.1",
    "SQLAlchemy==2.0.23",
    "sqlalchemy-views==0.3.2",
    "sqlglot==18.17.0",
    "stack-data==0.6.3",
    "superduperdb==0.0.16",
    "sympy==1.9",
    "systemd-python==234",
    "tblib==3.0.0",
    "tenacity==8.2.3",
    "terminado==0.18.0",
    "terminator==2.1.1",
    "threadpoolctl==3.2.0",
    "tinycss2==1.2.1",
    "toml==0.10.2",
    "tomli==2.0.1",
    "toolz==0.12.0",
    "tornado==6.3.3",
    "tqdm==4.66.1",
    "traitlets==5.13.0",
    "typer==0.9.0",
    "types-python-dateutil==2.8.19.14",
    "typing_extensions==4.8.0",
    "tzdata==2023.3",
    "ubuntu-advantage-tools==8001",
    "ubuntu-drivers-common==0.0.0",
    "ufoLib2==0.13.1",
    "ufw==0.36.1",
    "unattended-upgrades==0.1",
    "unicodedata2==14.0.0",
    "uri-template==1.3.0",
    "urllib3==1.26.5",
    "usb-creator==0.3.7",
    "virtualenv==20.24.6",
    "wadllib==1.3.6",
    "wcwidth==0.2.9",
    "webcolors==1.13",
    "webencodings==0.5.1",
    "websocket-client==1.6.4",
    "Werkzeug==3.0.1",
    "wheel==0.37.1",
    "widgetsnbextension==4.0.9",
    "xdg==5",
    "xkit==0.0.0",
    "xxhash==3.4.1",
    "yarl==1.9.2",
    "zict==3.0.0",
    "zipp==1.0.0"
  ],
  "hostname": "predator",
  "os_uname": [
    "Linux",
    "predator",
    "6.2.0-36-generic",
    "#37~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Mon Oct  9 15:34:04 UTC 2",
    "x86_64"
  ],
  "package_versions": {},
  "platform": {
    "platform": "Linux-6.2.0-36-generic-x86_64-with-glibc2.35",
    "python_version": "3.10.12"
  },
  "startup_time": "2023-11-14 01:07:06.473903",
  "superduper_db_root": "/home/luffy/.local/lib/python3.10/site-packages",
  "sys": {
    "argv": [
      "/home/luffy/.local/lib/python3.10/site-packages/superduperdb/__main__.py",
      "info"
    ],
    "path": [
      "/home/luffy",
      "/usr/lib/python310.zip",
      "/usr/lib/python3.10",
      "/usr/lib/python3.10/lib-dynload",
      "/home/luffy/.local/lib/python3.10/site-packages",
      "/usr/local/lib/python3.10/dist-packages",
      "/usr/lib/python3/dist-packages"
    ]
  }
}

What happened?

I was going through documentation .Over here I found error. It was unable to find the superduperdb.container

Steps to reproduce

1.Try accessing superduberdb.container

from superduperdb.container.document import Document as D

Relevant log output

ModuleNotFoundError                       Traceback (most recent call last)
Cell In[12], line 3
      1 import numpy as np
      2 from mongomock import MongoClient
----> 3 from superduperdb.container.document import Document as D
      4 from superduperdb.ext.numpy.array import array
      5 from superduperdb.db.mongodb.query import Collection

ModuleNotFoundError: No module named 'superduperdb.container'
@fnikolai
Copy link
Collaborator

duplicate of #1278

@anitaokoh
Copy link
Contributor

Hey @frozenmafia, I believe the module has been shortened to

from superduperdb import Document

See if that works

@frozenmafia
Copy link
Contributor Author

@fnikolai @anitaokoh I have found the correct way to import them. I want to correct the document . Can you please provide me a link where I shall make changes?

@frozenmafia
Copy link
Contributor Author

@anitaokoh Thanks . There are more error in this piece of code.

Here what I found.
collection = Collection(name='docs')
This causes

---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
Cell In[34], line 9
      6 import superduperdb as s
      8 db = s.superduper(MongoClient().documents)
----> 9 collection = Collection(name='docs')
     11 a = array('float64', shape=(32,))
     13 db.execute(
     14     collection.insert_many([
     15         D({'x': a(np.random.randn(32))})
     16         for _ in range(100)
     17     ], encoders=(a,))
     18 )

TypeError: Collection.__init__() got an unexpected keyword argument 'name'

I think the correct way to do this is
collection = Collection('documents')

Executing this way shows no error.
Then I get error in Collections.insert_many

db = s.superduper(MongoClient().documents)
collection = Collection('documents')

a = array('float64', shape=(32,))

db.execute(
    collection.insert_many([
        D({'x': a(np.random.randn(32))})
        for _ in range(100)
    ], encoders=(a,))
)

I get the following error

TypeError: Collection.insert_many() got an unexpected keyword argument 'encoders'

Can you please guide me how to fix it?
Do I need to create new issue for all these three error?

@frozenmafia
Copy link
Contributor Author

@anitaokoh I have corrected document . Here is the link to pull request pull request.

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

4 participants