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

KeyError: 'alias' in packages/ml/tensorflow/config.py #712

Open
hugomiralles-manta opened this issue Nov 4, 2024 · 3 comments
Open

KeyError: 'alias' in packages/ml/tensorflow/config.py #712

hugomiralles-manta opened this issue Nov 4, 2024 · 3 comments

Comments

@hugomiralles-manta
Copy link

Description:
When attempting to build a container using the jetson-containers repository, I encountered a KeyError in the config.py script located in packages/ml/tensorflow. This error appears because the pkg dictionary does not contain an 'alias' key when the code tries to extend it.

Error Log:

Traceback (most recent call last):
  File "/home/manta/jetson-containers/jetson_containers/packages.py", line 147, in scan_packages
    packages = config_package(package)  # returns a list (including subpackages)
  ...
  File "/home/manta/jetson-containers/packages/ml/tensorflow/config.py", line 99, in <module>
    *tensorflow(
     ^^^^^^^^^^^
  File "/home/manta/jetson-containers/packages/ml/tensorflow/config.py", line 92, in tensorflow
    pkg['alias'].extend(['tensorflow','tensorflow2'])
KeyError: 'alias'

Steps to Reproduce:

  1. Clone the jetson-containers repository.
  2. Run the jetson-containers build pytorch command.
  3. Observe the KeyError during the build process.

Environment:

  • L4T Version: 32.7.5
  • JetPack Version: 5.1
  • Python Version: 3.12
  • Host System: Jetson TX2
  • OS: Ubuntu 18.04 (Bionic)
@johnnynunez
Copy link
Contributor

johnnynunez commented Nov 4, 2024

Description: When attempting to build a container using the jetson-containers repository, I encountered a KeyError in the config.py script located in packages/ml/tensorflow. This error appears because the pkg dictionary does not contain an 'alias' key when the code tries to extend it.

Error Log:

Traceback (most recent call last):
  File "/home/manta/jetson-containers/jetson_containers/packages.py", line 147, in scan_packages
    packages = config_package(package)  # returns a list (including subpackages)
  ...
  File "/home/manta/jetson-containers/packages/ml/tensorflow/config.py", line 99, in <module>
    *tensorflow(
     ^^^^^^^^^^^
  File "/home/manta/jetson-containers/packages/ml/tensorflow/config.py", line 92, in tensorflow
    pkg['alias'].extend(['tensorflow','tensorflow2'])
KeyError: 'alias'

Steps to Reproduce:

  1. Clone the jetson-containers repository.
  2. Run the jetson-containers build pytorch command.
  3. Observe the KeyError during the build process.

Environment:

  • L4T Version: 32.7.5
  • JetPack Version: 5.1
  • Python Version: 3.12
  • Host System: Jetson TX2
  • OS: Ubuntu 18.04 (Bionic)

tensorflow is for jetpack 6.1:
https://docs.nvidia.com/deeplearning/frameworks/install-tf-jetson-platform/index.html

@dusty-nv
Copy link
Owner

dusty-nv commented Nov 5, 2024

@hugomiralles-manta just fixed this error on JetPack 4 with f38a230 - if you have further issues after pulling the latest, please let me know.

@johnnynunez the containers config scripts still need to not produce errors regardless of jetpack version, because those always get run during every jetson-containers build when it enumerates the available package configurations. For example, here pytorch was trying to be built, not TF.

@hugomiralles-manta
Copy link
Author

Thanks a lot for your quick answer !

I am encountering a new issue when attempting to build a container for PyTorch with Python 3.8 using the jetson-containers repository on my Jetson TX2 device. The build process fails during the install_python.sh step due to an error in finding a suitable pip distribution.

Environment:

  • Device: Jetson TX2
  • L4T Version: 32.7.5
  • JetPack Version: 5.1
  • Python Version: 3.8
  • CUDA Version: 10.2
  • OS: Ubuntu 18.04 (Bionic)

Steps to Reproduce:

  • Ran the command: PYTHON_VERSION=3.8 jetson-containers build pytorch.
  • Observed the following error during the build step involving install_python.sh:

Error Log:

+ curl -sS https://bootstrap.pypa.io/get-pip.py
+ python3.8
Looking in indexes: http://jetson.webredirect.org/jp5/cu102
ERROR: Could not find a version that satisfies the requirement pip (from versions: none)
ERROR: No matching distribution found for pip
+ curl -sS https://bootstrap.pypa.io/pip/3.6/get-pip.py
+ python3.6
Looking in indexes: http://jetson.webredirect.org/jp5/cu102
ERROR: Could not find a version that satisfies the requirement pip<22.0 (from versions: none)
ERROR: No matching distribution found for pip<22.0
The command '/bin/sh -c /tmp/install_python.sh' returned a non-zero code: 1

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

No branches or pull requests

3 participants