Skip to content

Commit

Permalink
Fix config for 0.1 deg model
Browse files Browse the repository at this point in the history
  • Loading branch information
wesselb committed Aug 23, 2024
1 parent c39cfb1 commit d1ca223
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
8 changes: 7 additions & 1 deletion aurora/model/aurora.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
from aurora.model.lora import LoRAMode
from aurora.model.swin3d import Swin3DTransformerBackbone

__all__ = ["Aurora", "AuroraSmall"]
__all__ = ["Aurora", "AuroraSmall", "AuroraHighRes"]


class Aurora(torch.nn.Module):
Expand Down Expand Up @@ -250,3 +250,9 @@ def load_checkpoint(self, repo: str, name: str, strict: bool = True) -> None:
num_heads=8,
use_lora=False,
)

AuroraHighRes = partial(
Aurora,
encoder_depths=(6, 8, 8),
decoder_depths=(8, 8, 6),
)
3 changes: 3 additions & 0 deletions docs/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ Models

.. autoclass:: aurora.AuroraSmall
:members:

.. autoclass:: aurora.AuroraHighRes
:members:
8 changes: 4 additions & 4 deletions docs/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,9 @@ Aurora 0.1° Fine-Tuned is a high-resolution version of Aurora.
### Usage

```python
from aurora import Aurora
from aurora import AuroraHighRes

model = Aurora()
model = AuroraHighRes()
model.load_checkpoint("microsoft/aurora", "aurora-0.1-finetuned.ckpt")
```

Expand Down Expand Up @@ -170,8 +170,8 @@ Therefore, you should use the static variables provided in
you can turn off LoRA to obtain more realistic predictions at the expensive of slightly higher long-term MSE:

```python
from aurora import Aurora
from aurora import AuroraHighRes

model = Aurora(use_lora=False) # Disable LoRA for more realistic samples.
model = AuroraHighRes(use_lora=False) # Disable LoRA for more realistic samples.
model.load_checkpoint("microsoft/aurora", "aurora-0.1-finetuned.ckpt", strict=False)
```

0 comments on commit d1ca223

Please sign in to comment.