Skip to content

Commit

Permalink
Merge branch 'develop' into feature/activation_function
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieloks committed Sep 6, 2024
2 parents 24867f9 + 4f1de81 commit 6e6fa85
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
1 change: 0 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Keep it human-readable, your future self will thank you!
- Update CI to inherit from common infrastructue reusable workflows
- run downstream-ci only when src and tests folders have changed
- New error messages for wrongs graphs.
- Feature: Change model to be instantiatable in the interface, addressing [#28](https://github.com/ecmwf/anemoi-models/issues/28) through [#29](https://github.com/ecmwf/anemoi-models/pulls/29)

### Removed

Expand Down
7 changes: 4 additions & 3 deletions src/anemoi/models/interface/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
from hydra.utils import instantiate
from torch_geometric.data import HeteroData

from anemoi.models.models.encoder_processor_decoder import AnemoiModelEncProcDec
from anemoi.models.preprocessing import Processors


Expand Down Expand Up @@ -72,9 +73,9 @@ def _build_model(self) -> None:
self.pre_processors = Processors(processors)
self.post_processors = Processors(processors, inverse=True)

# Instantiate the model
self.model = instantiate(
self.config.model.model, config=self.config, data_indices=self.data_indices, graph_data=self.graph_data
# Instantiate the model (Can be generalised to other models in the future, here we use AnemoiModelEncProcDec)
self.model = AnemoiModelEncProcDec(
config=self.config, data_indices=self.data_indices, graph_data=self.graph_data
)

# Use the forward method of the model directly
Expand Down

0 comments on commit 6e6fa85

Please sign in to comment.