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

AttributeError: 'HigherOrderOperator' object has no attribute 'py_functionalize_impl' #1663

Closed
AlexRibard opened this issue Jan 21, 2024 · 6 comments
Labels
bug Something isn't working high priority module: ci Related to continuous integration triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@AlexRibard
Copy link

I've followed the steps outlined https://pytorch.org/executorch/stable/getting-started-setup.html
But after running

python3 -m examples.portable.scripts.export --model_name="add"

I am getting the following error

    mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
  File "/usr/lib/python3.8/runpy.py", line 111, in _get_module_details
    __import__(pkg_name)
  File "/home/azureuser/executorch/examples/portable/__init__.py", line 7, in <module>
    from .utils import export_to_edge, export_to_exec_prog, save_pte_program
  File "/home/azureuser/executorch/examples/portable/utils.py", line 11, in <module>
    import executorch.exir as exir
  File "/home/azureuser/executorch/.executorch/lib/python3.8/site-packages/executorch/exir/__init__.py", line 9, in <module>
    from executorch.exir.capture import (
  File "/home/azureuser/executorch/.executorch/lib/python3.8/site-packages/executorch/exir/capture/__init__.py", line 9, in <module>
    from executorch.exir.capture._capture import (
  File "/home/azureuser/executorch/.executorch/lib/python3.8/site-packages/executorch/exir/capture/_capture.py", line 14, in <module>
    from executorch.exir.capture._config import CaptureConfig
  File "/home/azureuser/executorch/.executorch/lib/python3.8/site-packages/executorch/exir/capture/_config.py", line 12, in <module>
    from executorch.exir.passes import MemoryPlanningPass, ToOutVarPass
  File "/home/azureuser/executorch/.executorch/lib/python3.8/site-packages/executorch/exir/passes/__init__.py", line 19, in <module>
    from executorch.exir import control_flow, memory, memory_planning
  File "/home/azureuser/executorch/.executorch/lib/python3.8/site-packages/executorch/exir/memory_planning.py", line 20, in <module>
    from executorch.exir.delegate import executorch_call_delegate
  File "/home/azureuser/executorch/.executorch/lib/python3.8/site-packages/executorch/exir/delegate.py", line 122, in <module>
    @executorch_call_delegate.py_functionalize_impl
AttributeError: 'HigherOrderOperator' object has no attribute 'py_functionalize_impl'
@mergennachin
Copy link
Contributor

Hey @huydhn

It looks like it is the same issue as #1413

I tried installing pip install --force-reinstall --pre torch=="dev20231010" -i https://download.pytorch.org/whl/nightly/cpu

but it is not installing

ERROR: Could not find a version that satisfies the requirement torch==dev20231010 (from versions: 2.2.0.dev20231128+cpu, 2.2.0.dev20231129+cpu, 2.2.0.dev20231130+cpu, 2.2.0.dev20231201+cpu, 2.2.0.dev20231202+cpu, 2.2.0.dev20231203+cpu, 2.2.0.dev20231204+cpu, 2.2.0.dev20231205+cpu, 2.2.0.dev20231206+cpu, 2.2.0.dev20231207+cpu, 2.2.0.dev20231208+cpu, 2.2.0.dev20231209+cpu, 2.2.0.dev20231210+cpu, 2.2.0.dev20231211+cpu, 2.2.0.dev20231212+cpu, 2.2.0.dev20231213+cpu, 2.3.0.dev20231214+cpu, 2.3.0.dev20231215+cpu, 2.3.0.dev20231216+cpu, 2.3.0.dev20231217+cpu, 2.3.0.dev20231218+cpu, 2.3.0.dev20231219+cpu, 2.3.0.dev20231220+cpu, 2.3.0.dev20231221+cpu, 2.3.0.dev20231222+cpu, 2.3.0.dev20231223+cpu, 2.3.0.dev20231224+cpu, 2.3.0.dev20231225+cpu, 2.3.0.dev20231226+cpu, 2.3.0.dev20231227+cpu, 2.3.0.dev20231228+cpu, 2.3.0.dev20231229+cpu, 2.3.0.dev20231230+cpu, 2.3.0.dev20231231+cpu, 2.3.0.dev20240101+cpu, 2.3.0.dev20240102+cpu, 2.3.0.dev20240103+cpu, 2.3.0.dev20240104+cpu, 2.3.0.dev20240105+cpu, 2.3.0.dev20240106+cpu, 2.3.0.dev20240107+cpu, 2.3.0.dev20240108+cpu, 2.3.0.dev20240109+cpu, 2.3.0.dev20240110+cpu, 2.3.0.dev20240111+cpu, 2.3.0.dev20240113+cpu, 2.3.0.dev20240114+cpu, 2.3.0.dev20240115+cpu, 2.3.0.dev20240116+cpu, 2.3.0.dev20240117+cpu, 2.3.0.dev20240118+cpu, 2.3.0.dev20240119+cpu, 2.3.0.dev20240120+cpu, 2.3.0.dev20240121+cpu, 2.3.0.dev20240122+cpu) ERROR: No matching distribution found for torch==dev20231010

@mergennachin mergennachin added bug Something isn't working module: ci Related to continuous integration high priority triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module labels Jan 22, 2024
@pytorch-bot pytorch-bot bot added the triage review Items require an triage review label Jan 22, 2024
@mergennachin mergennachin removed the triage review Items require an triage review label Jan 22, 2024
@huydhn
Copy link
Contributor

huydhn commented Jan 22, 2024

Let me take a look, the files are still there on S3, but they are gone from the index. The code was moved around recently in pytorch/test-infra#4879, so may be it causes a regression

@huydhn
Copy link
Contributor

huydhn commented Jan 22, 2024

This should be fixed by pytorch/test-infra#4900

@AlexRibard
Copy link
Author

Duplicate of #1662 I'd say.
With conda all is good. It's really pip which messes up dependencies

huydhn added a commit to pytorch/test-infra that referenced this issue Jan 22, 2024
pytorch/executorch#1663. The indexing script
was migrated recently from builder to test-infra in
#4879. But there was a mistake
in which my [recent
change](pytorch/builder@6f3cb2b)
to keep nightly 20231010 for ExecuTorch wasn't copied over.

So, this PR copies the missing logic
pytorch/builder#1642. It also fixes some linter
issues flagged by test-infra lintrunner.
@huydhn
Copy link
Contributor

huydhn commented Jan 22, 2024

The files are back in the index now https://download.pytorch.org/whl/nightly/torch/ and pip install --force-reinstall --pre torch=="2.2.0.dev20231010" -i https://download.pytorch.org/whl/nightly/cpu works as expected.

@mergennachin
Copy link
Contributor

Thanks @huydhn

I just went through the setup script in https://pytorch.org/executorch/stable/getting-started-setup.html from beginning to end.

Works for me now.

Thanks @AlexRibard for reporting. This was an actual bug on our side where torch=="2.2.0.dev20231010" (that stable branch, v0.1.0, uses) doesn't exist in the nightly index. Huy just updated it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working high priority module: ci Related to continuous integration triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

No branches or pull requests

3 participants