Open anshulcgm opened 1 year ago
After deleting the codespace and just setting up another one, I run into this error prompt when I try to get the tests working:
> /bin/python3 ~/.vscode-remote/extensions/ms-python.python-2022.20.2/pythonFiles/testing_tools/run_adapter.py discover pytest -- --rootdir . -s --cache-clear ivy_tests
cwd: .
[ERROR 2023-1-2 1:58:10.82]: Error discovering pytest tests:
n [Error]: 2023-02-02 01:58:06.493123: W tensorflow/stream_executor/platform/default/dso_loader.cc:64] Could not load dynamic library 'libcudart.so.11.0'; dlerror: libcudart.so.11.0: cannot open shared object file: No such file or directory
WARNING:absl:No GPU/TPU found, falling back to CPU. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)
ImportError while loading conftest '/workspaces/ivy/ivy_tests/test_array_api/conftest.py'.
ivy_tests/test_array_api/conftest.py:10: in <module>
from reporting import pytest_metadata, pytest_json_modifyreport, add_extra_json_metadata # noqa
ivy_tests/test_array_api/reporting.py:1: in <module>
from array_api_tests.dtype_helpers import dtype_to_name
ivy_tests/test_array_api/array_api_tests/dtype_helpers.py:183: in <module>
if dtype_nbits[default_int] == 32:
ivy_tests/test_array_api/array_api_tests/dtype_helpers.py:71: in __getitem__
raise KeyError(f"{key!r} not found")
E KeyError: "'int32' not found"
at ChildProcess.<anonymous> (/root/.vscode-remote/extensions/ms-python.python-2022.20.2/out/client/extension.js:2:245886)
at Object.onceWrapper (node:events:646:26)
at ChildProcess.emit (node:events:526:28)
at maybeClose (node:internal/child_process:1092:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:302:5)
Hi, just following up about this, I have written some code that I want to contribute but I want to make sure I can test it beforehand.
Hey @anshulcgm Feel free to open a PR for this
Hello @anshulcgm , I got this issue as well, but found out it as because I did not complete the third step.
- Configure the _array_module.py file in the array_api_tests to be set to one of the supported frameworks.
The image was a bit unclear, but it was changing from
# old
array_module = None
# new
import ivy as array_module
array_module.set_backend('numpy')
Bug Explanation
I was following the docs at https://lets-unify.ai/ivy/contributing/setting_up.html#setting-up and when trying to setup the tests with codespace, I get the following error output:
Steps to Reproduce Bug
Following the steps at https://lets-unify.ai/ivy/contributing/setting_up.html#github-codespaces. I didn't setup any virtual environments beforehand or do any docker setup, I an not sure if this is contributing to the issue.
Environment
GitHub codespaces on Visual Studio Code
Ivy Version
fc7e267 (latest master hash as of 2/1/2023)
Backend
Device
No response