Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/github_actions/codecov/codecov-ac…
Browse files Browse the repository at this point in the history
…tion-5
  • Loading branch information
lbluque authored Nov 25, 2024
2 parents 210fcdc + 38a4bb3 commit f32a70a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 0 additions & 3 deletions packages/fairchem-data-om/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@ git_describe_command = 'git describe --tags --match fairchem_data_om-*'
[tool.hatch.build]
directory = "../../dist-data-om"

[tool.hatch.build]
directory = "../../dist"

[tool.hatch.build.targets.sdist]
only-include = ["src/fairchem/data/om"]

Expand Down
3 changes: 2 additions & 1 deletion src/fairchem/core/trainers/base_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,7 @@ def __init__(
self.cpu = cpu
self.epoch = 0
self.step = 0
self.ema = None

if torch.cuda.is_available() and not self.cpu:
logging.info(f"local rank base: {local_rank}")
Expand Down Expand Up @@ -617,7 +618,7 @@ def load_checkpoint(
"Loading checkpoint in inference-only mode, not loading keys associated with trainer state!"
)

if "ema" in checkpoint and checkpoint["ema"] is not None:
if "ema" in checkpoint and checkpoint["ema"] is not None and self.ema:
self.ema.load_state_dict(checkpoint["ema"])
else:
self.ema = None
Expand Down

0 comments on commit f32a70a

Please sign in to comment.