You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
AttributeError: 'HigherOrderOperator' object has no attribute 'py_functionalize_impl' #1413
Traceback (most recent call last):
File "C:\Users\17255.conda\envs\myenv\lib\runpy.py", line 194, in _run_module_as_main
return run_code(code, main_globals, None,
File "C:\Users\17255.conda\envs\myenv\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "D:\edge\executorch\examples\xnnpack\aot_compiler.py", line 14, in
from executorch.backends.xnnpack.partition.xnnpack_partitioner import XnnpackPartitioner
File "C:\Users\17255.conda\envs\myenv\lib\site-packages\executorch\backends\xnnpack_init.py", line 8, in
from .partition.xnnpack_partitioner import (
File "C:\Users\17255.conda\envs\myenv\lib\site-packages\executorch\backends\xnnpack\partition\xnnpack_partitioner.py", l
ine 14, in
from executorch.backends.xnnpack.partition.configs import (
File "C:\Users17255.conda\envs\myenv\lib\site-packages\executorch\backends\xnnpack\partition\configs.py", line 8, in
from executorch.exir.dialects.ops import ops as exir_ops
File "C:\Users\17255.conda\envs\myenv\lib\site-packages\executorch\exir_init.py", line 9, in
from executorch.exir.capture import (
File "C:\Users\17255.conda\envs\myenv\lib\site-packages\executorch\exir\passes_init.py", line 19, in
from executorch.exir import control_flow, memory, memory_planning
File "C:\Users\17255.conda\envs\myenv\lib\site-packages\executorch\exir\memory_planning.py", line 20, in
from executorch.exir.delegate import executorch_call_delegate
File "C:\Users\17255.conda\envs\myenv\lib\site-packages\executorch\exir\delegate.py", line 120, in
@executorch_call_delegate.py_functionalize_impl
AttributeError: 'HigherOrderOperator' object has no attribute 'py_functionalize_impl'
I'm guessing this is due to #1149 ( 5c92ab9 ) which is weird as the tutorial specifically pins to branch v0.1.0 from October, whereas that PR is from November.
Actually this is due to the torch dependency being out-of-date now. When running install_requirements.sh it produces:
ERROR: Could not find a version that satisfies the requirement torch==2.2.0.dev20231010
(from versions: 2.2.0.dev20231021, 2.2.0.dev20231022, 2.2.0.dev20231023, 2.2.0.dev20231024, 2.2.0.dev20231025, 2.2.0.dev20231026, 2.2.0.dev20231027, 2.2.0.dev20231028, 2.2.0.dev20231029, 2.2.0.dev20231030, 2.2.0.dev20231031, 2.2.0.dev20231101, 2.2.0.dev20231102, 2.2.0.dev20231103, 2.2.0.dev20231104, 2.2.0.dev20231105, 2.2.0.dev20231106, 2.2.0.dev20231107, 2.2.0.dev20231108, 2.2.0.dev20231109, 2.2.0.dev20231110, 2.2.0.dev20231111, 2.2.0.dev20231112, 2.2.0.dev20231113, 2.2.0.dev20231114, 2.2.0.dev20231115, 2.2.0.dev20231116, 2.2.0.dev20231117, 2.2.0.dev20231118, 2.2.0.dev20231119, 2.2.0.dev20231120, 2.2.0.dev20231121, 2.2.0.dev20231122, 2.2.0.dev20231123, 2.2.0.dev20231124, 2.2.0.dev20231125, 2.2.0.dev20231126, 2.2.0.dev20231127, 2.2.0.dev20231128, 2.2.0.dev20231129, 2.2.0.dev20231130, 2.2.0.dev20231201, 2.2.0.dev20231202, 2.2.0.dev20231203, 2.2.0.dev20231204, 2.2.0.dev20231205, 2.2.0.dev20231206, 2.2.0.dev20231207, 2.2.0.dev20231208, 2.2.0.dev20231209, 2.2.0.dev20231210, 2.2.0.dev20231211, 2.2.0.dev20231212, 2.2.0.dev20231213, 2.3.0.dev20231214)
ERROR: No matching distribution found for torch==2.2.0.dev20231010
Changing this to torch==2.2.0.dev20231021 fixes this error, and I am able to continue with the tutorial.
For versioned releases like v0.1.0 of executorch, it would be nice if those dependencies were persisted and not deleted...
For now, the fix would be to change NIGHTLY_VERSION in install_requirements.sh to something which exists: I chose2.2.0.dev20231021 as it is the closest in age version that is still available. Note that this is inherently fragile. If there is a breaking change in 2.2.0.dev20231021 then potentially executorch v0.1.0 becomes unusable.
For release/0.1 branch, we use a specific torch nightly version dev20231010. However, looks like it is expired recently. Is it possible to keep the binary permanently?
So, dev20231010 nightly binaries are still there, but it's now older than 60 days and has been removed from PyTorch nightly index. After chatting with @mergennachin a bit, we have decided on the following steps:
Keep nightly 20231010 for ExecuTorch alpha 0.1 for now builder#1642 is a quick fix to keep dev20231010 in the nightly index. It has been committed and the index re-generated. So, the issue is mitigated now, and I can run bash install_requirements.sh on 0.1.0 branch locally without any issue
when using torch.2.3.0.dev20240120+cpu I'm getting another error TypeError: HigherOrderOperator.__init__() got an unexpected keyword argument '_deprecated_global_ns'
Activity
kegsay commentedon Dec 14, 2023
I'm also getting this on MacOS when trying to follow the tutorial https://pytorch.org/executorch/stable/getting-started-setup.html#generate-a-sample-executorch-program -
AttributeError: 'HigherOrderOperator' object has no attribute 'py_functionalize_impl'When running:
python3 -m examples.portable.scripts.export --model_name="add"kegsay commentedon Dec 14, 2023
I'm guessing this is due to #1149 ( 5c92ab9 ) which is weird as the tutorial specifically pins to branch v0.1.0 from October, whereas that PR is from November.
kegsay commentedon Dec 14, 2023
Actually this is due to the
torchdependency being out-of-date now. When runninginstall_requirements.shit produces:Changing this to
torch==2.2.0.dev20231021fixes this error, and I am able to continue with the tutorial.For versioned releases like v0.1.0 of executorch, it would be nice if those dependencies were persisted and not deleted...
For now, the fix would be to change
NIGHTLY_VERSIONininstall_requirements.shto something which exists: I chose2.2.0.dev20231021as it is the closest in age version that is still available. Note that this is inherently fragile. If there is a breaking change in2.2.0.dev20231021then potentially executorch v0.1.0 becomes unusable.mergennachin commentedon Dec 14, 2023
Hi @huydhn
For
release/0.1branch, we use a specific torch nightly version dev20231010. However, looks like it is expired recently. Is it possible to keep the binary permanently?https://github.com/pytorch/executorch/blob/release/0.1/install_requirements.sh
https://download.pytorch.org/whl/nightly/torch/
huydhn commentedon Dec 14, 2023
So, dev20231010 nightly binaries are still there, but it's now older than 60 days and has been removed from PyTorch nightly index. After chatting with @mergennachin a bit, we have decided on the following steps:
bash install_requirements.shon 0.1.0 branch locally without any issuemergennachin commentedon Dec 14, 2023
Thank you, @huydhn
AlexRibard commentedon Jan 20, 2024
I'm still getting the issue, even when using dev20231010 or dev20231021 for torch 2.2.0.version
AlexRibard commentedon Jan 20, 2024
when using torch.2.3.0.dev20240120+cpu I'm getting another error
TypeError: HigherOrderOperator.__init__() got an unexpected keyword argument '_deprecated_global_ns'AlexRibard commentedon Jan 20, 2024
fyi trying to run
https://pytorch.org/executorch/stable/ir-exir.html