Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

load linref and normalizer on cuda device when resuming from checkpoint #813

Merged
merged 2 commits into from
Aug 16, 2024

Conversation

misko
Copy link
Collaborator

@misko misko commented Aug 15, 2024

No description provided.

@misko misko added bug Something isn't working patch Patch version release labels Aug 15, 2024
Copy link

codecov bot commented Aug 15, 2024

Codecov Report

Attention: Patch coverage is 66.66667% with 1 line in your changes missing coverage. Please review.

Files Patch % Lines
src/fairchem/core/trainers/base_trainer.py 66.66% 1 Missing ⚠️
Files Coverage Δ
src/fairchem/core/trainers/base_trainer.py 89.40% <66.66%> (+0.02%) ⬆️

@misko misko marked this pull request as ready for review August 15, 2024 22:04
@misko misko requested a review from lbluque August 15, 2024 22:04
Copy link
Collaborator

@lbluque lbluque left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks @misko

@@ -551,13 +559,13 @@ def _unwrapped_model(self):
def load_checkpoint(
self, checkpoint_path: str, checkpoint: dict | None = None
) -> None:
map_location = torch.device("cpu") if self.cpu else self.device
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit, can we just call this 'device' 'instead of map_location'?

@misko misko enabled auto-merge August 16, 2024 00:12
@misko misko added this pull request to the merge queue Aug 16, 2024
Merged via the queue into main with commit 7877671 Aug 16, 2024
9 of 10 checks passed
@misko misko deleted the move_linref_checkpoint_to_device branch August 16, 2024 01:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working patch Patch version release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants