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

Data generation when resuming from a checkpoint #2517

Closed
PC91 opened this issue Nov 17, 2023 · 2 comments
Closed

Data generation when resuming from a checkpoint #2517

PC91 opened this issue Nov 17, 2023 · 2 comments

Comments

@PC91
Copy link
Contributor

PC91 commented Nov 17, 2023

Hi,
I have a question about the data generation when a training is resumed from a checkpoint.
In the training config file:

  • The batch_type value is tokens.
  • The seed value is fixed to make the result reproducible.
  • The values of step and batches in the following line of trainer.py are observed (by printing to a logging file):
 for i, (batches, normalization) in enumerate(self._accum_batches(train_iter)):

            step = self.optim.training_step

I found that the value of step changes according to the checkpoint to resume. But this is not the case for batches. It seems that a training will always begin with the data generated from the first step even when this training is resumed from a checkpoint. Is there any way to change the configs to have a data generator that adapts to the checkpoint to resume ?

Thank you

@vince62s
Copy link
Member

duplicate of #2006 ?
I recently added an index in the data processed. look here: #2496

actually I have to change the type (no need to be a tensor) but this can be used to achieve restoration of the proper index in datasets.
Do you want to work on this ?

@PC91
Copy link
Contributor Author

PC91 commented Nov 17, 2023

duplicate of #2006 ? I recently added an index in the data processed. look here: #2496

actually I have to change the type (no need to be a tensor) but this can be used to achieve restoration of the proper index in datasets. Do you want to work on this ?

Thanks. I will have a look at it

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

No branches or pull requests

2 participants