google-research / google-research/flood-forecasting
[CI/Conda] `environments/environment_cpu.yml` contains over-constrained minor version pins and channel conflicts
- Dominant language
- Python
- Stars
- 343
- Forks
- 87
- PR merge metrics
- No merged PRs in 30d
Description
### Description
`environments/environment_cpu.yml` defines exact minor-version wildcards (`=X.Y.*`) across more than 20 dependencies:
```yaml
dependencies:
- numpy=2.4.*
- scipy=1.16.*
- pydantic=2.12.*
- bokeh=3.8.*
- dask=2025.12.*
- xarray=2025.12.*
- tensorboard=2.20.*
- h5py=3.15.*
- more-itertools=10.8.*
```
This creates several issues for users and external contributors running conda env create -f environments/environment_cpu.yml:
1. Unsatisfiable / Non-Existent Pins: Several pins specify speculative minor versions that may not exist in package repositories (e.g. numpy=2.4.*, scipy=1.16.*, tensorboard=2.20.*), causing PackagesNotFoundError.
2. Over-Constrained Graph: Hard-pinning 30+ packages to exact minor versions prevents the Conda solver from resolving mutually compatible transitive dependencies (e.g. PyTorch and Xarray constraints on NumPy).
3. Channel Incompatibility: Mixing conda-forge with defaults causes solver slowdowns and ABI incompatibilities between C/C++ runtimes.
### Affected Files
• environments/environment_cpu.yml (lines 19-61)
### Proposed Fix
1. Remove defaults from channels and prioritize conda-forge and pytorch.
2. Relax rigid =X.Y.* minor pins to minimum compatible bounds (>=) or major-version constraints, allowing Conda's SAT solver to find a valid solution:
channels:
- pytorch
- conda-forge
- nodefaults
dependencies:
- python>=3.11,<3.13
- pytorch>=2.5
- cpuonly
- numpy>=1.26
- scipy>=1.14
- xarray>=2024.06
- dask
- pandas>=2.0
- pydantic>=2.0
- pytest
Contributor guide
Research direction
Start with environments/environment_cpu.yml, especially lines 19-61, and review its channels and dependency pins. Run conda env create -f environments/environment_cpu.yml to reproduce the reported resolution failures. Done means the CPU environment resolves successfully without the over-constrained pins or mixed-channel conflicts described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, pytorch
- Domain
- build-system, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100