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

Trainer args consistency #951

Closed
rasbt opened this issue Feb 23, 2024 · 4 comments · Fixed by #950
Closed

Trainer args consistency #951

rasbt opened this issue Feb 23, 2024 · 4 comments · Fixed by #950

Comments

@rasbt
Copy link
Collaborator

rasbt commented Feb 23, 2024

For consistency, should it be io.destination_path (or perhaps even better io.out_dir) etc. in

python scripts/prepare_alpaca.py \
   --destination_path data/alpaca \
   --checkpoint_dir checkpoints/google/gemma-2b


python finetune/lora.py \
   --io.train_data_dir data/alpaca \
   --io.checkpoint_dir checkpoints/google/gemma-2b
@carmocca
Copy link
Contributor

carmocca commented Feb 23, 2024

Maybe.

This can be done in one of two ways:

  1. Add all those new arguments to IOArgs, the downside is that you'll need to update the argument validation for all scripts.
  2. Create a new PrepareArgs and then do io: PrepareArgs = PrepareArgs() in the prepare_*.py scripts. From the command line it's the same but internally it's using a different class.

I think it depends on how many arguments are shared across scripts. We should also consider how it will look after #950

@carmocca
Copy link
Contributor

@awaelchli Is refactoring the current prepare_*.py scripts in scope for #950?

@awaelchli
Copy link
Contributor

awaelchli commented Feb 23, 2024

Yes, with #950 the goal is to replace these prepare scripts (with the exception of the pretraining datasets which need to be optimized in advance). We haven't made any decisions yet and I'd like to discuss it, but my vision was that the scripts get a datamodule as input which encapsulate all data related args.

@carmocca
Copy link
Contributor

Cool. In that case #954 replaces this issue

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 a pull request may close this issue.

3 participants