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

Add missing dependency in pixi.toml #144

Merged
merged 3 commits into from
Apr 24, 2024
Merged

Add missing dependency in pixi.toml #144

merged 3 commits into from
Apr 24, 2024

Conversation

flferretti
Copy link
Collaborator

@flferretti flferretti commented Apr 23, 2024

lxml dependency was missing in the examples'pixi.toml


📚 Documentation preview 📚: https://jaxsim--144.org.readthedocs.build//144/

@flferretti flferretti requested a review from xela-95 April 23, 2024 12:55
@flferretti flferretti self-assigned this Apr 23, 2024
@flferretti
Copy link
Collaborator Author

Actually it would be smarter to unify the two pixi.lock, I'll port the modifications on the new file

fyi @traversaro

@flferretti
Copy link
Collaborator Author

flferretti commented Apr 23, 2024

For some reason cuda-cupti (removed in https://github.com/ami-iit/jaxsim/pull/138/files) is still missing from the resulting GPU environment, even if seems to be in the run_exports (https://github.com/conda-forge/cuda-cupti-feedstock/blob/0fa5abe8a5b6475b827c241ccb472c0f4093bff8/recipe/meta.yaml#L81-L93 and conda-forge/cuda-cupti-feedstock#10)

CUDA backend failed to initialize: Unable to load cuPTI. Is it installed? (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)

@flferretti
Copy link
Collaborator Author

flferretti commented Apr 23, 2024

I needed to move some attribute from setup.cfg to the pyproject.toml as pixi was complaining that some attributes were missing. Apparently this breaks the CIs as it is looking for the dependencies in the pyproject.toml

fyi @diegoferigo

@flferretti
Copy link
Collaborator Author

flferretti commented Apr 23, 2024

A solution could be to use pixi for the CI, but this requires to setup 3 additional environments (py310, py311, py312), which would increase the size of the pixi.lock. See https://pixi.sh/latest/advanced/github_actions/

@traversaro
Copy link
Contributor

I needed to move some attribute from setup.cfg to the pyproject.toml as pixi was complaining that some attributes were missing. Apparently this breaks the CIs as it is looking for the dependencies in the pyproject.toml

fyi @diegoferigo

If having the [project] prevents us to use the setup.cfg, then it is a bug in pixi I guess.

@traversaro
Copy link
Contributor

For some reason cuda-cupti (removed in https://github.com/ami-iit/jaxsim/pull/138/files) is still missing from the resulting GPU environment, even if seems to be in the run_exports (https://github.com/conda-forge/cuda-cupti-feedstock/blob/0fa5abe8a5b6475b827c241ccb472c0f4093bff8/recipe/meta.yaml#L81-L93 and conda-forge/cuda-cupti-feedstock#10)

CUDA backend failed to initialize: Unable to load cuPTI. Is it installed? (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)

I guess that if jaxlib==0.4.23=*_0 is present in the pixi.lock, pixi will not try to install a newer jaxlib==0.4.23=*_1 unless you delete the pixi.lock and recreate it.

@traversaro
Copy link
Contributor

I needed to move some attribute from setup.cfg to the pyproject.toml as pixi was complaining that some attributes were missing. Apparently this breaks the CIs as it is looking for the dependencies in the pyproject.toml
fyi @diegoferigo

If having the [project] prevents us to use the setup.cfg, then it is a bug in pixi I guess.

I guess this is a regression due to prefix-dev/pixi#1112 .

@flferretti
Copy link
Collaborator Author

For some reason cuda-cupti (removed in https://github.com/ami-iit/jaxsim/pull/138/files) is still missing from the resulting GPU environment, even if seems to be in the run_exports (https://github.com/conda-forge/cuda-cupti-feedstock/blob/0fa5abe8a5b6475b827c241ccb472c0f4093bff8/recipe/meta.yaml#L81-L93 and conda-forge/cuda-cupti-feedstock#10)

CUDA backend failed to initialize: Unable to load cuPTI. Is it installed? (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)

I guess that if jaxlib==0.4.23=*_0 is present in the pixi.lock, pixi will not try to install a newer jaxlib==0.4.23=*_1 unless you delete the pixi.lock and recreate it.

I tried with that, but I still get:

CUDA backend failed to initialize: Unable to use CUDA because of the following issues with CUDA components:
Unable to load cuPTI. Is it installed?
Traceback (most recent call last):
  File "/home/flferretti/git/jaxsim/.pixi/envs/test-gpu/lib/python3.12/site-packages/jax/_src/xla_bridge.py", line 322, in _version_check
    version = get_version()
              ^^^^^^^^^^^^^
RuntimeError: jaxlib/cuda/versions_helpers.cc:44: operation cuptiGetVersion(&version) failed: Unknown CUPTI error 999. This probably means that JAX was unable to load cupti.
 (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.)

@traversaro
Copy link
Contributor

I tried with that, but I still get:

What is the version of jaxlib that gets installed in that case? If for any reason a version diffent from 0.4.23=*_1 is installed, we can just leave cupti for the time being (until at least a new jaxlib release).

@traversaro
Copy link
Contributor

I needed to move some attribute from setup.cfg to the pyproject.toml as pixi was complaining that some attributes were missing. Apparently this breaks the CIs as it is looking for the dependencies in the pyproject.toml
fyi @diegoferigo

If having the [project] prevents us to use the setup.cfg, then it is a bug in pixi I guess.

I guess this is a regression due to prefix-dev/pixi#1112 .

I tried to leave almost everything in the setup.cfg with the following:

[project]
name = "jaxsim"
dynamic = ["version", "dependencies", "optional-dependencies", "urls", "classifiers", "keywords", "authors", "requires-python", "license", "readme"]

Do you think it could work?

@flferretti
Copy link
Collaborator Author

I tried with that, but I still get:

What is the version of jaxlib that gets installed in that case? If for any reason a version diffent from 0.4.23=*_1 is installed, we can just leave cupti for the time being (until at least a new jaxlib release).

Oh yes, it still installs jaxlib-0.4.23. Well then I'll add cupti again

@flferretti
Copy link
Collaborator Author

I tried to leave almost everything in the setup.cfg with the following:

[project]
name = "jaxsim"
dynamic = ["version", "dependencies", "optional-dependencies", "urls", "classifiers", "keywords", "authors", "requires-python", "license", "readme"]

Do you think it could work?

Yes, thanks a lot!

@traversaro
Copy link
Contributor

I tried with that, but I still get:

What is the version of jaxlib that gets installed in that case? If for any reason a version diffent from 0.4.23=*_1 is installed, we can just leave cupti for the time being (until at least a new jaxlib release).

Oh yes, it still installs jaxlib-0.4.23. Well then I'll add cupti again

Which build number?

@flferretti
Copy link
Collaborator Author

Build 1

@flferretti flferretti merged commit 8dc5c8c into main Apr 24, 2024
29 checks passed
@flferretti flferretti deleted the fix/examples branch April 24, 2024 07:38
@diegoferigo
Copy link
Member

@flferretti I though we agreed to wait a bit longer before merging to understand how to deal with the two lock files.

@flferretti
Copy link
Collaborator Author

Sorry Diego, apparently I misunderstood that. I merged since I haven't received any updates on this. Do you want to revert or I can open an issue to address this in the future

@diegoferigo
Copy link
Member

Reverting a merged PR without leaving traces is not straightforward, let's keep it as it is this time. From now on, in these cases I'll be leaving empty blocking reviews to prevent other similar occurrences.

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

Successfully merging this pull request may close these issues.

3 participants