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

RuntimeError: Runtime hasn't been created! #315

Open
yorek opened this issue May 4, 2024 · 4 comments
Open

RuntimeError: Runtime hasn't been created! #315

yorek opened this issue May 4, 2024 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@yorek
Copy link
Contributor

yorek commented May 4, 2024

I'm trying to set up a development environment locally, following the Build on your own step, so I have cloned the repo and then I

  1. Create a Python 3.11 (also tried with 3.12) virtual environment: python3.11 -m venv .venv
  2. Activate the virtual environment . ./.venv/bin/activate
  3. run pip install -e '.[test]'
  4. run python -m vectordb_bench

And as soon as I try to run the test using, say, Milvus, I get the following error:

RuntimeError: Runtime hasn't been created!

Here's the details:

2024-05-03 19:00:25,600 | INFO: generated uuid for the tasks: dbf85963f0b44f278cb823e979231795 (interface.py:69) (26828)
2024-05-03 19:00:25,868 | INFO | DB             | CaseType     Dataset               Filter | task_label (task_runner.py:288)
2024-05-03 19:00:25,868 | INFO | -----------    | ------------ -------------------- ------- | -------    (task_runner.py:288)
2024-05-03 19:00:25,868 | INFO | Milvus         | Performance  Cohere-MEDIUM-1M        None | 2024050319 (task_runner.py:288)
2024-05-03 19:00:25,869 | INFO: task submitted: id=dbf85963f0b44f278cb823e979231795, 2024050319, case number: 1 (interface.py:235) (26828)
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/lib/python3.11/multiprocessing/spawn.py", line 122, in spawn_main
    exitcode = _main(fd, parent_sentinel)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/multiprocessing/spawn.py", line 131, in _main
    prepare(preparation_data)
  File "/usr/lib/python3.11/multiprocessing/spawn.py", line 246, in prepare
    _fixup_main_from_path(data['init_main_from_path'])
  File "/usr/lib/python3.11/multiprocessing/spawn.py", line 297, in _fixup_main_from_path
    main_content = runpy.run_path(main_path,
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<frozen runpy>", line 291, in run_path
  File "<frozen runpy>", line 98, in _run_module_code
  File "<frozen runpy>", line 88, in _run_code
  File "/mnt/wsl/WSL2Work/_git/VectorDBBenchZilliz/vectordb_bench/frontend/pages/run_test.py", line 2, in <module>
    from vectordb_bench.frontend.components.run_test.autoRefresh import autoRefresh
  File "/mnt/wsl/WSL2Work/_git/VectorDBBenchZilliz/vectordb_bench/frontend/components/run_test/autoRefresh.py", line 1, in <module>
    from streamlit_autorefresh import st_autorefresh
  File "/mnt/wsl/WSL2Work/_git/VectorDBBenchZilliz/.venv/lib/python3.11/site-packages/streamlit_autorefresh/__init__.py", line 38, in <module>
    _component_func = components.declare_component("st_autorefresh", path=build_dir)
                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/mnt/wsl/WSL2Work/_git/VectorDBBenchZilliz/.venv/lib/python3.11/site-packages/streamlit/components/v1/component_registry.py", line 87, in declare_component
    get_instance().component_registry.register_component(component)
    ^^^^^^^^^^^^^^
  File "/mnt/wsl/WSL2Work/_git/VectorDBBenchZilliz/.venv/lib/python3.11/site-packages/streamlit/runtime/__init__.py", line 28, in get_instance
    return Runtime.instance()
           ^^^^^^^^^^^^^^^^^^
  File "/mnt/wsl/WSL2Work/_git/VectorDBBenchZilliz/.venv/lib/python3.11/site-packages/streamlit/runtime/runtime.py", line 163, in instance
    raise RuntimeError("Runtime hasn't been created!")
RuntimeError: Runtime hasn't been created!

Is anyone having the same problem? The problem started to appear as soon as I updated streamlit to the latest version, apparently.

@yorek
Copy link
Contributor Author

yorek commented May 4, 2024

Ok course as I was writing I realized about the update I did to the latest version of streamlit, and that is actually the problem. Pinning the version to 1.31.1 solve the issue. I have create a PR for a temporary fix

yorek added a commit to yorek/VectorDBBench that referenced this issue May 4, 2024
@zahidirfan
Copy link

@yorek : I still get the same error even after downgrading streamlit to 1.31.1

@yorek
Copy link
Contributor Author

yorek commented May 6, 2024

Make sure to remove the pip cache, delete any existing virtual environment (or use a new one), and make sure you do not update streamlit when it asks you to do so.

@XuanYang-cn
Copy link
Collaborator

/assign

@XuanYang-cn XuanYang-cn self-assigned this May 7, 2024
@XuanYang-cn XuanYang-cn added the bug Something isn't working label May 7, 2024
XuanYang-cn added a commit to XuanYang-cn/VectorDBBench that referenced this issue May 15, 2024
See also: zilliztech#315, streamlit/streamlit#8606

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
alwayslove2013 pushed a commit that referenced this issue May 16, 2024
See also: #315, streamlit/streamlit#8606

Signed-off-by: yangxuan <xuan.yang@zilliz.com>
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

3 participants