Clay-foundation / model

The Clay Foundation Model (in development)
https://clay-foundation.github.io/model/
Apache License 2.0
362 stars 46 forks source link

environment setup has invalid section in yaml and dependency conflicts on Ubuntu 22.04 with CUDA GPU #309

Closed rbavery closed 1 week ago

rbavery commented 3 months ago

πŸ‘‹ I'm poking around the yaml to see what the fix is for my machine, not sure if others are running into this. I'm using the latest version of mamba.

# rave at rave-desktop in ~/clay-model on git:main ● [15:10:19]
β†’ mamba env create --file environment.yml

EnvironmentSectionNotValid: The following section on '/home/rave/clay-model/environment.yml' is invalid and will be ignored:
 - platforms

Channels:
 - conda-forge
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: failed
Channels:
 - conda-forge
Platform: linux-64
Collecting package metadata (repodata.json): done
Solving environment: failed

LibMambaUnsatisfiableError: Encountered problems while solving:
  - package torchgeo-0.5.2-pyhd8ed1ab_0 requires segmentation-models-pytorch >=0.2, but none of the providers can be installed
  - package pylance-0.14.1-py311h6a0c370_0 requires pyarrow >=12,<15.0.1, but none of the providers can be installed

Could not solve for environment specs
The following packages are incompatible
β”œβ”€ lancedb ~=0.10.2  is installable with the potential options
β”‚  β”œβ”€ lancedb 0.10.2 would require
β”‚  β”‚  └─ pylance 0.14.1  with the potential options
β”‚  β”‚     β”œβ”€ pylance 0.14.1 would require
β”‚  β”‚     β”‚  └─ pyarrow >=12,<15.0.1  with the potential options
β”‚  β”‚     β”‚     β”œβ”€ pyarrow [12.0.0|12.0.1|...|16.1.0] would require
β”‚  β”‚     β”‚     β”‚  └─ python_abi 3.10.* *_cp310, which can be installed;
β”‚  β”‚     β”‚     β”œβ”€ pyarrow [12.0.0|12.0.1|...|15.0.0], which can be installed;
β”‚  β”‚     β”‚     β”œβ”€ pyarrow [12.0.0|12.0.1|...|16.1.0] would require
β”‚  β”‚     β”‚     β”‚  └─ python_abi 3.8.* *_cp38, which can be installed;
β”‚  β”‚     β”‚     β”œβ”€ pyarrow [12.0.0|12.0.1|...|16.1.0] would require
β”‚  β”‚     β”‚     β”‚  └─ python_abi 3.9.* *_cp39, which can be installed;
β”‚  β”‚     β”‚     └─ pyarrow [13.0.0|14.0.0|...|16.1.0] would require
β”‚  β”‚     β”‚        └─ python_abi 3.12.* *_cp312, which can be installed;
β”‚  β”‚     β”œβ”€ pylance 0.14.1 would require
β”‚  β”‚     β”‚  └─ python_abi 3.10.* *_cp310, which can be installed;
β”‚  β”‚     β”œβ”€ pylance 0.14.1 would require
β”‚  β”‚     β”‚  └─ python_abi 3.12.* *_cp312, which can be installed;
β”‚  β”‚     └─ pylance 0.14.1 would require
β”‚  β”‚        └─ python_abi 3.9.* *_cp39, which can be installed;
β”‚  β”œβ”€ lancedb 0.10.2 would require
β”‚  β”‚  └─ python_abi 3.10.* *_cp310, which can be installed;
β”‚  β”œβ”€ lancedb 0.10.2 would require
β”‚  β”‚  └─ python_abi 3.12.* *_cp312, which can be installed;
β”‚  └─ lancedb 0.10.2 would require
β”‚     └─ python_abi 3.9.* *_cp39, which can be installed;
β”œβ”€ pyarrow ~=16.1.0  is installable with the potential options
β”‚  β”œβ”€ pyarrow [12.0.0|12.0.1|...|16.1.0], which can be installed (as previously explained);
β”‚  β”œβ”€ pyarrow [12.0.0|12.0.1|...|16.1.0], which can be installed (as previously explained);
β”‚  β”œβ”€ pyarrow [12.0.0|12.0.1|...|16.1.0], which can be installed (as previously explained);
β”‚  β”œβ”€ pyarrow [13.0.0|14.0.0|...|16.1.0], which can be installed (as previously explained);
β”‚  └─ pyarrow 16.1.0 conflicts with any installable versions previously reported;
β”œβ”€ python ~=3.11.0  is not installable because it requires
β”‚  └─ python_abi 3.11.* *_cp311, which conflicts with any installable versions previously reported;
β”œβ”€ timm ~=0.9.16  is requested and can be installed;
└─ torchgeo ~=0.5.2  is not installable because it requires
   └─ segmentation-models-pytorch >=0.2  but there are no viable options
      β”œβ”€ segmentation-models-pytorch [0.2.0|0.2.1|0.3.0|0.3.1] would require
      β”‚  └─ timm 0.4.12 , which conflicts with any installable versions previously reported;
      β”œβ”€ segmentation-models-pytorch 0.3.2 would require
      β”‚  └─ timm 0.6.12 , which conflicts with any installable versions previously reported;
      └─ segmentation-models-pytorch 0.3.3 would require
         └─ timm 0.9.2 , which conflicts with any installable versions previously reported.
rbavery commented 3 months ago

I can install from the lockfile successfully following these instructions, might be an upstream issue with mamba or how a dependency specifies it's own dependencies. https://clay-foundation.github.io/model/getting-started/installation.html#advanced

weiji14 commented 3 months ago

You're hitting into 2 separate dependency solving issues:

LibMambaUnsatisfiableError: Encountered problems while solving:
  - package torchgeo-0.5.2-pyhd8ed1ab_0 requires segmentation-models-pytorch >=0.2, but none of the providers can be installed
  - package pylance-0.14.1-py311h6a0c370_0 requires pyarrow >=12,<15.0.1, but none of the providers can be installed

The first one is because torchgeo depends on smp which has a hard pin on timm=0.9.2 (https://github.com/conda-forge/segmentation-models-pytorch-feedstock/pull/22#discussion_r1511659865). Second one is lancedb=0.10.2 depends on pylance=0.14.1 which has a upper pin on pyarrow<15.0.1.

I've opened a PR to refresh the lockfile at https://github.com/Clay-foundation/model/pull/310. Could you test installing from that branch and run through a few examples?

jonm3D commented 2 months ago

The new lockfile worked for me (macOS).