Implement Pytorch checkpoint to reproduce identical accuracy

Job ID: 38550830

Budget: $10 – $30 AUD

I need an experienced PyTorch developer to modify an existing code.

Here is an existing tutorial for training cats/dogs classification using Pytorch and Hugging Face Accelerate on multiple GPUs. Full code is here:
https://huggingface.co/docs/accelerate/en/basic_tutorials/notebook

The task for you is to save checkpoints during training on various hardware configurations (specifically: CPU, Single GPU, Multi GPU), and then loading the checkpoint on a different computer to predict using CPU, or Single GPU, or Multi GPU.

The objective is to reproduce the accuracy IDENTICAL to when the checkpoint was saved.

Your task:

1) I need you to insert code to SAVE CHECKPOINT in the training_loop() during training on COMPUTER A. Note the accuracy for the checkpoint when it was saved. The training needs to execute smoothly on cpu-only, single_gpu, or, multi_gpu.

2) Then, write code to LOAD CHECKPOINT. Run on COMPUTER B (cpu-only mode, single_gpu mode, and mult_gpu mode). The accuracy must be identical to when the checkpoint was saved on computer A.

I will test code on my machines to confirm accuracies are reproduced.