Registry / ai-ml / terratorch

terratorch

JSON →
library1.2.8pypypiunverified

TerraTorch is a geospatial foundation model fine-tuning toolkit built on PyTorch Lightning, supporting models like Prithvi, DOFA, and others. The current version is 1.2.6, with active development and monthly releases.

pip install terratorch
INSTALL
IMPORT
SIG · TERRATORCH
T
terratorch
ai-mlpythonv1.2.8
Install
—
Import
—
Disk
—
Pass rate
0/ 10
Env Coverage0 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v? · pip install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
build_error
glibc
py 3.10–3.95 runs
timeout
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TerraTorchTrainer
✓ from terratorch import TerraTorchTrainer
✗ from terratorch.trainer import TerraTorchTrainer
TerraTorchTrainer is now exposed at the top level.
PrithviModel
✓ from terratorch.models import PrithviModel
✗ from terratorch.backbones import PrithviModel
Models are in the `models` module.

Minimal example fine-tuning a Prithvi model.

from terratorch import TerraTorchTrainer from terratorch.datamodules import GeoSpatialDataModule import os trainer = TerraTorchTrainer( model_name='prithvi_eo_v2_300', backbone='prithvi_eo_v2_300', num_classes=10, learning_rate=1e-4, ) datamodule = GeoSpatialDataModule( data_root=os.environ.get('DATA_ROOT', './data'), batch_size=4, ) trainer.fit(datamodule=datamodule)
terratorch --version
Debug
Known issues
breakingIn v1.0, the import path for models changed from `terratorch.backbones` to `terratorch.models`. Old imports will fail.
fix
Use `from terratorch.models import PrithviModel` instead of `from terratorch.backbones import ...`.
affects: >=1.0
gotcha`TerraTorchTrainer` requires a `model_name` that exactly matches a registered model key. Typos silently fall back to a default, causing unexpected behavior.
fix
List available models via `terratorch.models.list_models()` and use the exact string.
affects: all
Upgrade
Version history
1.2.8latest on PyPI · released May 29, 2026
Audit
Dependencies
torchrequiredCore deep learning framework
lightningrequiredPyTorch Lightning for training loops
torchgeorequiredGeospatial datasets and transforms
peftrequiredParameter-Efficient Fine-Tuning (LoRA, etc.)
Agent activity
19 hits · last 30 days
node
18
OpenAI (training)
1
Resources
terratorch — pip install terratorch · libregistry