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

Adding test cases for the bugs found, local_rank None and output dir … #343

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

albertodepaola
Copy link
Contributor

What does this PR do?

Fixes 2 bugs introduced on #220:

  1. None value was used in the json file name when the local_rank was not informed.
  2. Directory structure was not created before saving the metrics json file.

Created new tests to reproduce these errors and fixed them

Testing

Running unit tests and running finetuning for an epoch:

  1. Tests:
    image

  2. Finetuning command:
    python -m llama_recipes.finetuning --use_peft --peft_method lora --quantization --model_name ../llama/models_hf/7B/ --output_dir ../llama/models_ft/Llama-2-7b-peft-samsum-1 --batch_size_training 2 --gradient_accumulation_steps 2 --num_epochs 1 --save_model --save_metrics --dataset samsum_dataset

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes?
  • Did you write any new necessary tests?

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

Successfully merging this pull request may close these issues.

None yet

2 participants