Skip to content

Commit ad6517d

Browse files
authored
Merge pull request #4 from allenai/gabi/update_v1.1
Update pyproject.toml
2 parents 46974dd + ae53c0b commit ad6517d

6 files changed

Lines changed: 13 additions & 53 deletions

File tree

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ jobs:
2424
- uses: actions/checkout@v5
2525
with:
2626
ref: ${{ github.event.inputs.tag || github.ref }}
27-
27+
2828
- name: Set up Python
2929
uses: actions/setup-python@v5
3030
with:
31-
python-version: "3.12"
31+
python-version: ".python-version"
3232

3333
- name: Verify version matches tag
3434
run: |

.github/workflows/tests.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ on:
1010

1111
jobs:
1212
test:
13-
name: Test with torch-cpu
13+
name: Tests
1414
runs-on: ubuntu-latest
1515

1616
steps:
@@ -28,18 +28,8 @@ jobs:
2828

2929
- name: Install dependencies
3030
run: |
31-
# Install with CPU-only torch (suitable for CI)
32-
# Use uv pip install to bypass uv.sources configuration that causes conflicts
33-
uv venv
31+
uv sync --python 3.12 --extra dev
3432
source .venv/bin/activate
35-
# Install torch from CPU index
36-
uv pip install --index-url https://download.pytorch.org/whl/cpu "torch>=2.8,<2.9" "torchvision>=0.23,<1"
37-
# Install base dependencies
38-
uv pip install "einops>=0.7.0" "huggingface_hub" "numpy>=1.26.4" "universal-pathlib>=0.2.5"
39-
# Install dev dependencies
40-
uv pip install "pytest>=7.0.0"
41-
# Install the project itself
42-
uv pip install -e .
4333
4434
- name: Run tests (without weights)
4535
run: |

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
11
__pycache__/
2+
**/*.egg-info/
3+
# we ignore the lockfile since
4+
# we have gpu and cpu installations.
5+
uv.lock

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.12

README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ To install dependencies:
2323
```
2424
git clone git@github.com:allenai/olmoearth_pretrain_minimal.git
2525
cd olmoearth_pretrain_minimal
26-
# Install with CPU-only PyTorch (works on all platforms including Linux)
27-
uv sync --locked --python 3.12 --extra torch-cpu
28-
# Or install with CUDA 12.8 PyTorch
29-
uv sync --locked --python 3.12 --extra torch-cu128
26+
uv sync
3027
```
3128
uv installs everything into a venv, so to keep using python commands you can activate uv's venv: `source .venv/bin/activate`. Otherwise, swap to `uv run python`.
3229

@@ -37,7 +34,7 @@ uv installs everything into a venv, so to keep using python commands you can act
3734

3835
<img src="https://raw.githubusercontent.com/allenai/olmoearth_pretrain/main/assets/model.png" alt="Model Architecture Diagram" style="width: 800px; margin-left:'auto' margin-right:'auto' display:'block'"/>
3936

40-
The OlmoEarth models are trained on three satellite modalities (Sentinel 2, Sentinel 1 and Landsat) and six derived maps (OpenStreetMap, WorldCover, USDA Cropland Data Layer, SRTM DEM, WRI Canopy Height Map, and WorldCereal).
37+
The OlmoEarth models are trained on three satellite modalities (Sentinel 2, Sentinel 1 and Landsat) and six derived maps (OpenStreetMap, WorldCover, USDA Cropland Data Layer, SRTM DEM, WRI Canopy Height Map, and WorldCereal).
4138

4239
**Note:** The model weights are released under the [OlmoEarth Artifact License](https://github.com/allenai/olmoearth_pretrain/blob/main/LICENSE)
4340
| Model Size | Weights | Encoder Params | Decoder Params |
@@ -64,7 +61,7 @@ from olmoearth_pretrain_minimal import ModelID, load_model_from_id
6461
# - ModelID.OLMOEARTH_V1_LARGE - 308M encoder params, 53M decoder params
6562
model = load_model_from_id(ModelID.OLMOEARTH_V1_BASE, load_weights=True)
6663

67-
# Load with randomly initialized weights
64+
# Load with randomly initialized weights
6865
model_with_weights = load_model_from_id(ModelID.OLMOEARTH_V1_NANO, load_weights=False)
6966
```
7067

pyproject.toml

Lines changed: 1 addition & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,10 @@ dependencies = [
1313
"huggingface_hub",
1414
"numpy>=1.26.4",
1515
"universal-pathlib>=0.2.5",
16+
"torch>=2.8,<2.9",
1617
]
1718

1819
[project.optional-dependencies]
19-
torch-cpu = [
20-
"torch>=2.8,<2.9",
21-
"torchvision>=0.23,<1",
22-
]
23-
torch-cu128 = [
24-
"pytorch-triton",
25-
"torch>=2.8,<2.9",
26-
"torchvision>=0.23,<1",
27-
]
2820
dev = [
2921
"pytest>=7.0.0",
3022
]
@@ -39,32 +31,8 @@ include = ["olmoearth_pretrain_minimal*"]
3931
[tool.setuptools.package-data]
4032
"olmoearth_pretrain_minimal.olmoearth_pretrain_v1.data.norm_configs" = ["*.json"]
4133

42-
[tool.uv.sources]
43-
torch = [
44-
{ index = "pytorch-cpu", extra = "torch-cpu" },
45-
{ index = "pytorch-cu128", extra = "torch-cu128" },
46-
]
47-
torchvision = [
48-
{ index = "pytorch-cpu", extra = "torch-cpu" },
49-
{ index = "pytorch-cu128", extra = "torch-cu128" },
50-
]
51-
pytorch-triton = [
52-
{ index = "pytorch-cu128", extra = "torch-cu128" },
53-
]
54-
55-
[[tool.uv.index]]
56-
name = "pytorch-cpu"
57-
url = "https://download.pytorch.org/whl/cpu"
58-
explicit = true
59-
60-
[[tool.uv.index]]
61-
name = "pytorch-cu128"
62-
url = "https://download.pytorch.org/whl/cu128"
63-
explicit = true
64-
6534
[tool.pytest.ini_options]
6635
markers = [
6736
"slow: marks tests as slow (deselect with '-m \"not slow\"')",
6837
]
6938
testpaths = ["tests"]
70-

0 commit comments

Comments
 (0)