allenai / allenai/olmoearth_pretrain

Exception in minimal inference-only environment

Open
#476 5 comments 0 reactions 1 assignee Claimed by @Hgherzog View on GitHub
Dominant language
Python
Stars
308
Forks
50
Avg merge
5d 23h
Merged PRs (30d)
2

Description

I am trying to use OlmoEarth for inference only in a minimal environment - without `ai2-olmo-core` installed.

Following the example [here](https://github.com/allenai/olmoearth_pretrain/blob/main/docs/Inference-Quickstart.md), the following code raises an exception:

```
import torch
from olmoearth_pretrain.model_loader import ModelID, load_model_from_id
from olmoearth_pretrain.datatypes import MaskedOlmoEarthSample, MaskValue

# Load model from HuggingFace
model = load_model_from_id(ModelID.OLMOEARTH_V1_BASE)
```

```
File c:\Users\jakob\Projects\ml\olmoearth\olmoearth_pretrain\model_loader.py:116, in _load_model_from_config(path)
114 config_dict = json.load(f)
115 model_config = Config.from_dict(config_dict["model"])
--> [116](file:///C:/Users/jakob/Projects/ml/olmoearth/olmoearth_pretrain/model_loader.py:116) return model_config.build()

File c:\Users\jakob\Projects\ml\olmoearth\olmoearth_pretrain\config.py:244, in _StandaloneConfig.build(self)
...
(...) 242 NotImplementedError: Always, unless overridden by subclass.
243 """
--> [244](file:///C:/Users/jakob/Projects/ml/olmoearth/olmoearth_pretrain/config.py:244) raise NotImplementedError("Subclasses must implement build()")

NotImplementedError: Subclasses must implement build()
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.