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] onnxscript installed by 'pip install -e .' does not work outside of project root directory #1327

Open
BowenBao opened this issue Apr 1, 2024 · 0 comments
Labels
bug Something isn't working contribution welcome We welcome code contributions for this topic: build

Comments

@BowenBao
Copy link
Contributor

BowenBao commented Apr 1, 2024

Repro:

pip install -e .

Under project root directory:

python
>>> import onnxscript
>>> dir(onnxscript)
['BFLOAT16', 'BOOL', 'COMPLEX128', 'COMPLEX64', 'DOUBLE', 'FLOAT', 'FLOAT16', 'FLOAT8E4M3FN', 'FLOAT8E4M3FNUZ', 'FLOAT8E5M2', 'FLOAT8E5M2FNUZ', 'INT16', 'INT32', 'INT64', 'INT8', 'OnnxFunction', 'STRING', 'TracedOnnxFunction', 'UINT16', 'UINT32', 'UINT64', 'UINT8', '__all__', '__builtins__', '__cached__', '__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__', '__version__', '_internal', 'backend', 'converter', 'export_onnx_lib', 'external_tensor', 'graph', 'importlib', 'irbuilder', 'main', 'onnx_opset', 'onnx_types', 'opset1', 'opset10', 'opset11', 'opset12', 'opset13', 'opset14', 'opset15', 'opset16', 'opset17', 'opset18', 'opset19', 'opset2', 'opset3', 'opset4', 'opset5', 'opset6', 'opset7', 'opset8', 'opset9', 'opset_ai_onnx_ml1', 'opset_ai_onnx_ml2', 'opset_ai_onnx_ml3', 'proto2python', 'script', 'sourceinfo', 'tensor', 'type_annotation', 'values']
>>>

Now go to any other directory

cd tests
python
>>> import onnxscript
>>> dir(onnxscript)
['__doc__', '__file__', '__loader__', '__name__', '__package__', '__path__', '__spec__']
>>>

Installing onnxscript with python setup.py develop does not exhibit this issue.

@justinchuby justinchuby added bug Something isn't working topic: build contribution welcome We welcome code contributions for this labels Apr 1, 2024
BowenBao added a commit that referenced this issue Apr 2, 2024
…RGE] Fix and enable all new tests"


- Somewhat unrelated: moved "tests" folder out of "onnxscript".
- Updated import paths in copied code.
- Updated testdata lookup path due to relative path changes.
- Discovered an issue with installing via "pip install -e .". #1327
- Fixed a few issues of code under "ir" that doesn't work under python 3.8, or onnx w/ ir_version < 10.

All CI tests except for linter are expected to pass.

[ghstack-poisoned]
BowenBao added a commit that referenced this issue Apr 2, 2024
…e all new tests"


- Somewhat unrelated: moved "tests" folder out of "onnxscript".
- Updated import paths in copied code.
- Updated testdata lookup path due to relative path changes.
- Discovered an issue with installing via "pip install -e .". #1327
- Fixed a few issues of code under "ir" that doesn't work under python 3.8, or onnx w/ ir_version < 10.

All CI tests except for linter are expected to pass.

[ghstack-poisoned]
BowenBao added a commit that referenced this issue Apr 2, 2024
…O NOT MERGE] Fix and enable all new tests"


- Somewhat unrelated: moved "tests" folder out of "onnxscript".
- Updated import paths in copied code.
- Updated testdata lookup path due to relative path changes.
- Discovered an issue with installing via "pip install -e .". #1327
- Fixed a few issues of code under "ir" that doesn't work under python 3.8, or onnx w/ ir_version < 10.

All CI tests except for linter are expected to pass.

[ghstack-poisoned]
BowenBao added a commit that referenced this issue Apr 2, 2024
… and enable all new tests"


- Somewhat unrelated: moved "tests" folder out of "onnxscript".
- Updated import paths in copied code.
- Updated testdata lookup path due to relative path changes.
- Discovered an issue with installing via "pip install -e .". #1327
- Fixed a few issues of code under "ir" that doesn't work under python 3.8, or onnx w/ ir_version < 10.

All CI tests except for linter are expected to pass.

[ghstack-poisoned]
BowenBao added a commit that referenced this issue Apr 2, 2024
…ll new tests"


- Somewhat unrelated: moved "tests" folder out of "onnxscript".
- Updated import paths in copied code.
- Updated testdata lookup path due to relative path changes.
- Discovered an issue with installing via "pip install -e .". #1327
- Fixed a few issues of code under "ir" that doesn't work under python 3.8, or onnx w/ ir_version < 10.

All CI tests except for linter are expected to pass.

[ghstack-poisoned]
BowenBao added a commit that referenced this issue Apr 2, 2024
- Somewhat unrelated: moved "tests" folder out of "onnxscript".
- Updated import paths in copied code.
- Updated testdata lookup path due to relative path changes.
- Discovered an issue with installing via "pip install -e .". #1327
- Fixed a few issues of code under "ir" that doesn't work under python 3.8, or onnx w/ ir_version < 10.

All CI tests except for linter are expected to pass.

[ghstack-poisoned]
BowenBao added a commit that referenced this issue Apr 3, 2024
…GE] Fix and enable all new tests"


- Somewhat unrelated: moved "tests" folder out of "onnxscript".
- Updated import paths in copied code.
- Updated testdata lookup path due to relative path changes.
- Discovered an issue with installing via "pip install -e .". #1327
- Fixed a few issues of code under "ir" that doesn't work under python 3.8, or onnx w/ ir_version < 10.

All CI tests except for linter are expected to pass.

[ghstack-poisoned]
BowenBao added a commit that referenced this issue Apr 3, 2024
…le all new tests"


- Somewhat unrelated: moved "tests" folder out of "onnxscript".
- Updated import paths in copied code.
- Updated testdata lookup path due to relative path changes.
- Discovered an issue with installing via "pip install -e .". #1327
- Fixed a few issues of code under "ir" that doesn't work under python 3.8, or onnx w/ ir_version < 10.

All CI tests except for linter are expected to pass.

[ghstack-poisoned]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working contribution welcome We welcome code contributions for this topic: build
Projects
None yet
Development

No branches or pull requests

2 participants