8000 ImportError: cannot import name 'split_complex_to_pairs' from 'onnx.helper' · Issue #6962 · onnx/onnx · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

ImportError: cannot import name 'split_complex_to_pairs' from 'onnx.helper' #6962

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
KoalaQin opened this issue May 14, 2025 · 4 comments
Closed
Labels

Comments

@KoalaQin
Copy link

Hi,

I ran into this error while installing the latest release 1.18.0:

Traceback (most recent call last):
  File "/home/jupyter/packages/gnomad_qc/v5/sample_qc/hard_filters.py", line 7, in <module>
    from gnomad.resources.grch38.reference_data import telomeres_and_centromeres
  File "/home/jupyter/packages/gnomad/resources/grch38/__init__.py", line 3, in <module>
    from .gnomad import *
  File "/home/jupyter/packages/gnomad/resources/grch38/gnomad.py", line 15, in <module>
    from gnomad.sample_qc.ancestry import POP_NAMES
  File "/home/jupyter/packages/gnomad/sample_qc/ancestry.py", line 13, in <module>
    from skl2onnx import convert_sklearn
  File "/home/jupyter/.local/lib/python3.10/site-packages/skl2onnx/__init__.py", line 16, in <module>
    from .convert import convert_sklearn, to_onnx, wrap_as_onnx_mixin
  File "/home/jupyter/.local/lib/python3.10/site-packages/skl2onnx/convert.py", line 8, in <module>
    from .proto import get_latest_tested_opset_version
  File "/home/jupyter/.local/lib/python3.10/site-packages/skl2onnx/proto/__init__.py", line 22, in <module>
    from onnx.helper import split_complex_to_pairs
ImportError: cannot import name 'split_complex_to_pairs' from 'onnx.helper' (/home/jupyter/.local/lib/python3.10/site-packages/onnx/helper.py)

I rolled back to use 1.17.0 and it works, not sure if I should report it here.

@andife
Copy link
Member
andife commented May 14, 2025

def _split_complex_to_pairs(ca: Sequence[np.complex64]) -> Sequence[int]:
it's now an internal function

@justinchuby @ramkrishna2910

Should be added to the release notes

@KoalaQin
Copy link
Author
KoalaQin commented May 14, 2025

Thank you! So skl2onnx needs to have a new release? I created an issue in that repo: onnx/sklearn-onnx#1180.
Sorry, I just realized that you guys are probably in the same group.

@justinchuby
Copy link
Contributor

onnx/onnx/helper.py

Line 361 in 9d7ca12

def _split_complex_to_pairs(ca: Sequence[np.complex64]) -> Sequence[int]:
it's now an internal function
@justinchuby @ramkrishna2910

Should be added to the release notes

Thanks. I updated the release notes. Will create some PRs today.

@justinchuby
Copy link
Contributor

The respective projects should be releasing a new version soon.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants
0