pytorch / pytorch/executorch

Problem when try to install Executorh in Kaggle

Open
#8,129 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

module: build/install triaged
Dominant language
Python
Stars
5k
Forks
1.2k
Avg merge
2d 10h
Merged PRs (30d)
581

Description

🐛 Describe the bug

when i try to install executorch in Kaggle environment it's displaying error

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
catboost 1.2.7 requires numpy<2.0,>=1.16.0, but you have numpy 2.0.0 which is incompatible.
cupy-cuda12x 12.2.0 requires numpy<1.27,>=1.20, but you have numpy 2.0.0 which is incompatible.
fastai 2.7.18 requires torch<2.6,>=1.10, but you have torch 2.6.0 which is incompatible.
gensim 4.3.3 requires numpy<2.0,>=1.18.5, but you have numpy 2.0.0 which is incompatible.
langchain 0.3.12 requires numpy<2,>=1.22.4; python_version < "3.12", but you have numpy 2.0.0 which is incompatible.
matplotlib 3.7.5 requires numpy<2,>=1.20, but you have numpy 2.0.0 which is incompatible.
mkl-fft 1.3.8 requires numpy<1.27.0,>=1.26.4, but you have numpy 2.0.0 which is incompatible.
mkl-random 1.2.4 requires numpy<1.27.0,>=1.26.4, but you have numpy 2.0.0 which is incompatible.
mkl-umath 0.1.1 requires numpy<1.27.0,>=1.26.4, but you have numpy 2.0.0 which is incompatible.
mlxtend 0.23.3 requires scikit-learn>=1.3.1, but you have scikit-learn 1.2.2 which is incompatible.
pandas-gbq 0.25.0 requires google-api-core<3.0.0dev,>=2.10.2, but you have google-api-core 1.34.1 which is incompatible.
plotnine 0.14.4 requires matplotlib>=3.8.0, but you have matplotlib 3.7.5 which is incompatible.
pylibcugraph-cu12 24.10.0 requires pylibraft-cu12==24.10.*, but you have pylibraft-cu12 24.12.0 which is incompatible.
pylibcugraph-cu12 24.10.0 requires rmm-cu12==24.10.*, but you have rmm-cu12 24.12.1 which is incompatible.
pytensor 2.26.4 requires numpy<2,>=1.17.0, but you have numpy 2.0.0 which is incompatible.
tensorflow 2.17.1 requires numpy<2.0.0,>=1.23.5; python_version <= "3.11", but you have numpy 2.0.0 which is incompatible.
tensorflow-decision-forests 1.10.0 requires tensorflow==2.17.0, but you have tensorflow 2.17.1 which is incompatible.
thinc 8.2.5 requires numpy<2.0.0,>=1.19.0; python_version >= "3.9", but you have numpy 2.0.0 which is incompatible.
Successfully installed execnet-2.1.1 executorch-0.5.0 expecttest-0.3.0 hypothesis-6.124.9 numpy-2.0.0 nvidia-cublas-cu12-12.4.5.8 nvidia-cuda-cupti-cu12-12.4.127 nvidia-cuda-nvrtc-cu12-12.4.127 nvidia-cuda-runtime-cu12-12.4.127 nvidia-cudnn-cu12-9.1.0.70 nvidia-cufft-cu12-11.2.1.3 nvidia-curand-cu12-10.3.5.147 nvidia-cusolver-cu12-11.6.1.9 nvidia-cusparse-cu12-12.3.1.170 nvidia-cusparselt-cu12-0.6.2 nvidia-nccl-cu12-2.21.5 nvidia-nvjitlink-cu12-12.4.127 nvidia-nvtx-cu12-12.4.127 parameterized-0.9.0 pytest-xdist-3.6.1 ruamel.yaml-0.18.10 ruamel.yaml.clib-0.2.12 torch-2.6.0 torchaudio-2.6.0 torchvision-0.21.0 triton-3.2.0

i try in colab have same error

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
langchain 0.3.16 requires numpy<2,>=1.22.4; python_version < "3.12", but you have numpy 2.0.0 which is incompatible.
gensim 4.3.3 requires numpy<2.0,>=1.18.5, but you have numpy 2.0.0 which is incompatible.
pytensor 2.26.4 requires numpy<2,>=1.17.0, but you have numpy 2.0.0 which is incompatible.
fastai 2.7.18 requires torch<2.6,>=1.10, but you have torch 2.6.0 which is incompatible.
thinc 8.2.5 requires numpy<2.0.0,>=1.19.0; python_version >= "3.9", but you have numpy 2.0.0 which is incompatible.

but when running the executorch library does not cause an error like this that occurs on the kaggle platform:

---------------------------------------------------------------------------
ImportError                               Traceback (most recent call last)
<ipython-input-5-03382cd9a8cb> in <cell line: 5>()
      3 from torch import nn
      4 from torch.export import ExportedProgram, export, export_for_training
----> 5 import executorch.exir as exir
      6 from executorch.backends.xnnpack.partition.xnnpack_partitioner import XnnpackPartitioner
      7 from executorch.exir import (

/usr/local/lib/python3.10/dist-packages/executorch/exir/__init__.py in <module>
      7 from typing import Any
      8 
----> 9 from executorch.exir.capture import (
     10     _capture_legacy_do_not_use,
     11     CallSpec,

/usr/local/lib/python3.10/dist-packages/executorch/exir/capture/__init__.py in <module>
      7 # pyre-strict
      8 
----> 9 from executorch.exir.capture._capture import (
     10     _capture_legacy_do_not_use,
     11     CallSpec,

/usr/local/lib/python3.10/dist-packages/executorch/exir/capture/_capture.py in <module>
     13 
     14 import torch
---> 15 from executorch.exir.capture._config import CaptureConfig
     16 from executorch.exir.error import ExportError, ExportErrorType, InternalError
     17 from executorch.exir.program import ExirExportedProgram

/usr/local/lib/python3.10/dist-packages/executorch/exir/capture/_config.py in <module>
     13 from executorch.exir.dynamic_shape import DynamicMemoryPlanningMode
     14 from executorch.exir.pass_manager import PassType
---> 15 from executorch.exir.passes import MemoryPlanningPass, ToOutVarPass
     16 from executorch.exir.passes.sym_shape_eval_pass import ConstraintBasedSymShapeEvalPass
     17 from executorch.exir.tracer import ExirDynamoConfig

/usr/local/lib/python3.10/dist-packages/executorch/exir/passes/__init__.py in <module>
     17 
     18 import torch
---> 19 from executorch.exir import control_flow, memory, memory_planning
     20 from executorch.exir.common import override_logger
     21 from executorch.exir.delegate import executorch_call_delegate

/usr/local/lib/python3.10/dist-packages/executorch/exir/control_flow.py in <module>
     56 import torch.utils._pytree as pytree
     57 from executorch.exir.error import ExportError, ExportErrorType, internal_assert
---> 58 from executorch.exir.tracer import (
     59     DispatchTracer,
     60     flattened_dispatch_trace,

/usr/local/lib/python3.10/dist-packages/executorch/exir/tracer.py in <module>
     48 from torch._dynamo.guards import Guard
     49 from torch._functorch.eager_transforms import _maybe_unwrap_functional_tensor
---> 50 from torch.export import default_decompositions
     51 from torch.func import functionalize
     52 from torch.fx.operator_schemas import normalize_function

ImportError: cannot import name 'default_decompositions' from 'torch.export' (/usr/local/lib/python3.10/dist-packages/torch/export/__init__.py)

At first I thought the problem was installing the package, but when in google colab it worked fine I don't think that was the problem.

Versions

PyTorch version: 2.6.0+cu124
Is debug build: False
CUDA used to build PyTorch: 12.4
ROCM used to build PyTorch: N/A

OS: Ubuntu 22.04.3 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: 14.0.0-1ubuntu1.1
CMake version: version 3.31.2
Libc version: glibc-2.35

Python version: 3.10.12 (main, Nov 6 2024, 20:22:13) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-6.6.56+-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: 12.2.140
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: GPU 0: Tesla P100-PCIE-16GB
Nvidia driver version: 560.35.03
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.8.9.6
/usr/lib/x86_64-linux-gnu/libcudnn_adv_infer.so.8.9.6
/usr/lib/x86_64-linux-gnu/libcudnn_adv_train.so.8.9.6
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_infer.so.8.9.6
/usr/lib/x86_64-linux-gnu/libcudnn_cnn_train.so.8.9.6
/usr/lib/x86_64-linux-gnu/libcudnn_ops_infer.so.8.9.6
/usr/lib/x86_64-linux-gnu/libcudnn_ops_train.so.8.9.6
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 46 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 4
On-line CPU(s) list: 0-3
Vendor ID: GenuineIntel
Model name: Intel(R) Xeon(R) CPU @ 2.00GHz
CPU family: 6
Model: 85
Thread(s) per core: 2
Core(s) per socket: 2
Socket(s): 1
Stepping: 3
BogoMIPS: 4000.38
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss ht syscall nx pdpe1gb rdtscp lm constant_tsc rep_good nopl xtopology nonstop_tsc cpuid tsc_known_freq pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch pti ssbd ibrs ibpb stibp fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm mpx avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves arat md_clear arch_capabilities
Hypervisor vendor: KVM
Virtualization type: full
L1d cache: 64 KiB (2 instances)
L1i cache: 64 KiB (2 instances)
L2 cache: 2 MiB (2 instances)
L3 cache: 38.5 MiB (1 instance)
NUMA node(s): 1
NUMA node0 CPU(s): 0-3
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Mitigation; PTE Inversion
Vulnerability Mds: Mitigation; Clear CPU buffers; SMT Host state unknown
Vulnerability Meltdown: Mitigation; PTI
Vulnerability Mmio stale data: Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Mitigation; IBRS
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; IBRS; IBPB conditional; STIBP conditional; RSB filling; PBRSB-eIBRS Not affected; BHI SW loop, KVM SW loop
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Mitigation; Clear CPU buffers; SMT Host state unknown

Versions of relevant libraries:
[pip3] executorch==0.5.0
[pip3] mypy-extensions==1.0.0
[pip3] numpy==2.0.0
[pip3] nvidia-cublas-cu12==12.4.5.8
[pip3] nvidia-cuda-cupti-cu12==12.4.127
[pip3] nvidia-cuda-nvrtc-cu12==12.4.127
[pip3] nvidia-cuda-runtime-cu12==12.4.127
[pip3] nvidia-cudnn-cu12==9.1.0.70
[pip3] nvidia-cufft-cu12==11.2.1.3
[pip3] nvidia-curand-cu12==10.3.5.147
[pip3] nvidia-cusolver-cu12==11.6.1.9
[pip3] nvidia-cusparse-cu12==12.3.1.170
[pip3] nvidia-cusparselt-cu12==0.6.2
[pip3] nvidia-nccl-cu12==2.21.5
[pip3] nvidia-nvjitlink-cu12==12.4.127
[pip3] nvidia-nvtx-cu12==12.4.127
[pip3] nvtx==0.2.10
[pip3] onnx==1.17.0
[pip3] optree==0.13.1
[pip3] pynvjitlink-cu12==0.4.0
[pip3] pytorch-ignite==0.5.1
[pip3] pytorch-lightning==2.5.0.post0
[pip3] torch==2.6.0
[pip3] torchaudio==2.6.0
[pip3] torchinfo==1.8.0
[pip3] torchmetrics==1.6.1
[pip3] torchsummary==1.5.1
[pip3] torchtune==0.5.0
[pip3] torchvision==0.21.0
[pip3] triton==3.2.0
[conda] Could not collect

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the Kaggle and Colab installation environments and reproducing the import of executorch.exir, focusing on the reported torch.export.default_decompositions traceback. Check the listed executorch, PyTorch, NumPy, Python, and CUDA versions; done means the supported environment or compatibility problem is clearly identified and the installation/import behavior is corrected or documented.

Written by the indexing model from the issue text.

Assessment

Tech stack
numpy, python, pytorch
Domain
build-system, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.