Skip to content

Save CoPE checkpoints to the current directory - #124

Open
rudycelekli wants to merge 2 commits into
facebookresearch:mainfrom
rudycelekli:fix/cope-current-directory-checkpoint
Open

rudycelekli wants to merge 2 commits into
facebookresearch:mainfrom
rudycelekli:fix/cope-current-directory-checkpoint

Conversation

@rudycelekli

Copy link
Copy Markdown

Saving with --checkpoint checkpoint.pt fails before writing because os.path.dirname returns an empty string and os.makedirs('') raises. Skip directory creation when the checkpoint is in the current directory.

Adds a regression using the actual checkpoint saver and real Torch serialization in a temporary working directory. It verifies both checkpoint and configuration files are written. This fails with FileNotFoundError on main and passes with this change.

Validation: Python 3.9.6, python3 -m unittest discover -s projects/cope/tests -v (1 passed). Distributed/GPU training, the full repository suite, and hosted CI remain unverified. Based on main 6bcc4813bfb72ec1dcec7923e449c027a4d9194e.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 4, 2026
@Golovneva Golovneva self-assigned this Nov 4, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants