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

ADD: warning hub model #1301

Merged

Conversation

JohanWork
Copy link
Contributor

Description

Update in accordance to #1202 (comment) . Also fixing and updating the tests etc

Motivation and Context

How has this been tested?

Screenshots (if appropriate)

Types of changes

Social Handles (Optional)

@JohanWork
Copy link
Contributor Author

@NanoCode012 happy for you feedback here!

@JohanWork JohanWork changed the title Update warning hub model ADD: warning hub model Feb 19, 2024
@winglian
Copy link
Collaborator

@JohanWork I'm working on a slight refactor of doing validation with Pydantic, so let's fix and merge this after that gets merged. thanks!

@JohanWork
Copy link
Contributor Author

@JohanWork I'm working on a slight refactor of doing validation with Pydantic, so let's fix and merge this after that gets merged. thanks!

Sure sounds great! When that is merged I can update the pr as well!

@winglian
Copy link
Collaborator

@JohanWork the pydantic refactor has been merged. let me know if you have any questions about that.

@@ -358,9 +358,9 @@ def validate_config(cfg):
"push_to_hub_model_id is deprecated. Please use hub_model_id instead."
)

if cfg.hub_model_id and not (cfg.save_steps or cfg.saves_per_epoch):
if cfg.hub_model_id and cfg.save_strategy not in ["steps", "epoch", None]:
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this check was made to ensure that one of save_steps/saves_per_epoch/save_strategy was set. In this case, you're missing those conditions?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Isen't the only thing that matters that you have set a save strategy? https://huggingface.co/docs/transformers/main_classes/trainer#transformers.TrainingArguments.save_strategy. And to not save you have to set it to NO as I have understood it, if you don't set it (None in axolotl) it becomes steps.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be changed to check for "no" then?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It could be, but currently the test checks if it is no or any other value. I wanted to check more widely, but can tighten it up if you think it is better @NanoCode012 . Also sorry for slow progress :(

tests/test_validation.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@NanoCode012 NanoCode012 left a comment

Choose a reason for hiding this comment

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

Following discussion, this seems good then!

@NanoCode012
Copy link
Collaborator

Hey @JohanWork , would you be able to rebase or resolve merge conflicts? I will merge this PR after.

@JohanWork
Copy link
Contributor Author

@NanoCode012 I have update the pr. Sorry for really slow response from my side. I had to update src/axolotl/utils/config/models/input/v0_4_1/init.py, as previous mention setting save_steps or save_epochs dosen't matter what matters is setting save_stragey(https://huggingface.co/docs/transformers/main_classes/trainer#transformers.TrainingArguments.save_strategy) and None in axolotl defaults to steps. let me know what you think and if I have missed something. Will be faster in responding :)

@NanoCode012 NanoCode012 merged commit 601c08b into axolotl-ai-cloud:main Apr 30, 2024
7 checks passed
@NanoCode012
Copy link
Collaborator

Thank you for the PR. Sorry that it took a while.

@JohanWork
Copy link
Contributor Author

No worries :) Thnx

djsaunde pushed a commit that referenced this pull request Dec 17, 2024
* update warning for save_strategy

* update

* clean up

* update

* Update test_validation.py

* fix validation step

* update

* test_validation

* update

* fix

* fix

---------

Co-authored-by: NanoCode012 <[email protected]>
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.

3 participants