1. Learn
  2. /
  3. Courses
  4. /
  5. Efficient AI Model Training with PyTorch

Connected

Exercise

Save and load the state of preprocessed text

You've finished preprocessing a dataset of agricultural questions and answers to help farmers look up common issues in the field. To save your progress, you decide to create and load checkpoints of the preprocessed text data.

Some data has been preloaded:

  • dataloader contains a preprocessed dataset of agricultural questions and answers
  • Accelerator has been imported from accelerate

Instructions

100 XP
  • Save a checkpoint of the preprocessed data in checkpoint_dir.
  • Load a checkpoint from checkpoint_dir.