Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix YAML referencing to allow better CLI overrides #150

Merged
merged 2 commits into from
Feb 10, 2023

Conversation

abhi-mosaic
Copy link
Contributor

Currently we rely on YAML anchors to copy things like max_seq_len into many places.

But since we use OmegaConf to read our YAMLs, we can instead use the ${max_seq_len} syntax.

This allows CLI to override the anchored values like data_remote, data_local, max_seq_len, etc. that could not be done before. Previously, you would have to override every materialized value like train_loader.dataset.remote.

There are a lot of files here, but I'm going to check the high priority ones 1 by 1 to make sure nothing broke. And then assume that YAMLs within a dir (like yamls/mosaic_gpt/... all work).

@abhi-mosaic abhi-mosaic requested review from dblalock and removed request for dakinggg February 10, 2023 02:06
@abhi-mosaic abhi-mosaic marked this pull request as ready for review February 10, 2023 02:06
Copy link
Collaborator

@dakinggg dakinggg left a comment

Choose a reason for hiding this comment

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

yesss thank you. LGTM, assuming you checked a few and the syntax works.

examples/bert/yamls/test/main.yaml Show resolved Hide resolved
examples/llm/icl_eval/my-neo.yaml Outdated Show resolved Hide resolved
examples/llm/yamls/hf_causal_lm/icl-live.yaml Outdated Show resolved Hide resolved
Copy link
Collaborator

@dblalock dblalock left a comment

Choose a reason for hiding this comment

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

So I'm kind of confused why we still use YAML anchors for the run_name in the BERT configs.

  • ./examples/bert/yamls/finetuning/glue/mcloud_run.yaml: base_run_name: *run_name
  • ./examples/bert/yamls/finetuning/mcloud_run.yaml: run_name: *run_name
  • ./examples/bert/yamls/main/mcloud_run_a100_40gb.yaml: run_name: *run_name
  • ./examples/bert/yamls/main/mcloud_run_a100_80gb.yaml: run_name: *run_name

But seems like there are no issues besides those we already flagged.

In more detail, I wrote a script to parse the old and new versions via omegaconf, resolve() them, and then check that they're the same. It correctly found the new null that Daniel flagged and said everything else is the same*
so I kinda believe it.

*Except that the BERT yamls can't resolve anything because you need to write out the parameters: as a separate yaml file for it to work. (Yet another reason we need to indirect to the other config files).

@abhi-mosaic
Copy link
Contributor Author

So I'm kind of confused why we still use YAML anchors for the run_name in the BERT configs.

I agree, we shouldn't have these. But I think I need to fix the BERT training scripts to read in COMPOSER_RUN_NAME correctly to fix. I will look into this, but in a separate PR.

@abhi-mosaic abhi-mosaic merged commit 7cb0211 into main Feb 10, 2023
@abhi-mosaic abhi-mosaic deleted the abhi/fix_omegaconf_refs branch February 10, 2023 18:39
dakinggg pushed a commit to samhavens/benchmarks that referenced this pull request Feb 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants