GitXplorerGitXplorer
b

accelerate-example

public
1 stars
0 forks
0 issues

Commits

List of commits on branch main.
Unverified
4c0565f62dc9048dd0e8ba44d3b3e2a7afe67bc4

feat: add colab

bborisdayma committed 3 years ago
Unverified
339fefa880b7b0d6b87b274114869b73777d6f43

docs: README

bborisdayma committed 3 years ago
Unverified
aeb6e81c755d903dd2cff526c4d5b90cb03fa4cf

feat: add progress

bborisdayma committed 3 years ago
Unverified
d0330c1a144048871ba0b1b91d1f7f5414efe140

feat: init repo

bborisdayma committed 3 years ago

README

The README file for this repository.

Instruction on colab

  • open colab notebook

  • set runtime instance

  • set use_wandb to True/False

  • always interrupt and restart instance between experiments

Instructions on local

  • install requirements.txt

  • Run the script

    • on CPU or GPU if available: python ./main.py

    • force CPU: python ./main.py --cpu

    • on multi GPU and single/multi TPU:

      • set config with accelerate config
      • launch with accelerate launch ./main.py

Notes

  • I don't think wandb.init() can be called in all processes

  • accelerator.is_local_main_process (one per node) or accelerator.is_main_process (one only) can be used by Trainer's to know the main process (local or global)

  • accelerate.wait_for_everyone() can be used to ensure all other processes are done (for example before logging a model)