Skip to content

Create config for jepa forecasting finetuning, and fix jepa finetuning#1946

Open
csjfwang wants to merge 48 commits intoecmwf:developfrom
csjfwang:develop-add-jepa-forecast-finetune
Open

Create config for jepa forecasting finetuning, and fix jepa finetuning#1946
csjfwang wants to merge 48 commits intoecmwf:developfrom
csjfwang:develop-add-jepa-forecast-finetune

Conversation

@csjfwang
Copy link
Contributor

Description

  1. create config_jepa_forecasting_finetuning.yml
  2. fix issue JEPA fine-tuning fails with 2D-rope #1943 , JEPA finetuning with 2D-RoPE

Issue Number

Closes #1943

Is this PR a draft? Mark it as draft.

Checklist before asking for review

  • I have performed a self-review of my code
  • My changes comply with basic sanity checks:
    • I have fixed formatting issues with ./scripts/actions.sh lint
    • I have run unit tests with ./scripts/actions.sh unit-test
    • I have documented my code and I have updated the docstrings.
    • I have added unit tests, if relevant
  • I have tried my changes with data and code:
    • I have run the integration tests with ./scripts/actions.sh integration-test
    • (bigger changes) I have run a full training and I have written in the comment the run_id(s): launch-slurm.py --time 60
    • (bigger changes and experiments) I have shared a hegdedoc in the github issue with all the configurations and runs for this experiments
  • I have informed and aligned with people impacted by my change:
    • for config changes: the MatterMost channels and/or a design doc
    • for changes of dependencies: the MatterMost software development channel

wang85 and others added 30 commits July 16, 2025 10:07
"student-teacher": {
enabled: False,
type: LossLatentSSLStudentTeacher,
type: Disabled,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this change necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because here is not filtered by enabled: False:

if v.type == "LossLatentSSLStudentTeacher"

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

enabled: False,
masking_strategy: "random",
num_samples: 1,
num_samples: 0,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

if enabled: False already why do we need num_samples 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I re-used function get_batch_size_from_config (), and it doesn't use filter enabled: False, I will try to send another fix to avoid num_samples: 1 still be used.

self.batch_size_per_gpu = get_batch_size_from_config(cf.training_config)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh I see, I guess in effect this part of the code gets the unfiltered config and that is the source of the error.

For now set it to 0 samples, but maybe raise an issue!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! Then I will keep the num_samples: 0 and raise an issue to report the unfiltered config thing!

# granted to it by virtue of its status as an intergovernmental organisation
# nor does it submit to any jurisdiction.

embed_orientation: "channels"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's remove model params of the encoder, because they should be taken from the base_config anyway

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sophie-xhonneux I removed the params related to encoder, can you look again?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

JEPA fine-tuning fails with 2D-rope

2 participants