Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • M metaseq
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 95
    • Issues 95
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 41
    • Merge requests 41
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Administrator
  • metaseq
  • Merge requests
  • !432

Avoid race condition when saving config.yml

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/tangbinh/tangbinh/fix-save-dir into main Oct 18, 2022
  • Overview 2
  • Commits 1
  • Pipelines 0
  • Changes 1

Created by: tangbinh

Patch Description

Currently, rank 0 attempts to save a YAML config (i.e. config.yml) before the checkpoint directory (i.e. cfg.checkpoint.save_dir) is created in verify_checkpoint_directory. The failure seems to happen sporadically as other ranks might get ahead of rank 0 and succeed in creating the directory before it tries to save the YAML. However, with a smaller world size and pdb statements, the race condition appears problematic.

Testing steps

  • Verify that training proceeds as expected after we add from metaseq.pdb import set_trace; set_trace() to line 59 and step over it:
python -m metaseq_internal.projects.zucchini.sweep_baseline -g 8 -n 1 -t 1 --azure --model-size 125m --prefix local-125m --data /data/gpt-z/zucchini/consolidated/v1.0_textonly --local
Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: github/fork/tangbinh/tangbinh/fix-save-dir