Skip to content

Add upet and sevennet models#591

Open
joehart2001 wants to merge 4 commits into
mainfrom
add-models
Open

Add upet and sevennet models#591
joehart2001 wants to merge 4 commits into
mainfrom
add-models

Conversation

@joehart2001

Copy link
Copy Markdown
Collaborator

Pre-review checklist for PR author

PR author must check the checkboxes below when creating the PR.

Summary

adds:

  • pet-mad-1.5-s
  • pet-oam-xl
  • sevennet-l3i5
  • sevennet-omni-i12-mpa

Linked issue

Resolves #

Testing

@joehart2001 joehart2001 requested a review from ElliottKasoar June 5, 2026 17:30
trained_on_dispersion=cfg.get("trained_on_dispersion", False),
dispersion_kwargs=cfg.get("dispersion_kwargs", {}),
)
case "UPETCalculator":

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why do we not want to replace PETMADCalculator?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

can we still use the old model?

@ElliottKasoar ElliottKasoar Jun 9, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Should be able to, yep, it's the same repo, just renamed. Models available are here: https://github.com/lab-cosmo/upet/blob/main/src/upet/_version.py#L1. You set the version e.g.

calculator = UPETCalculator(model="pet-mad-s", version="1.5.0", device="cuda") but v1.0.2 should also be available based on https://lab-cosmo.github.io/upet/latest/models.html

case "SevenNetCalculator":
kwargs = cfg.get("kwargs", {})
loaded_models[name] = SevenNetCalc(
model=kwargs["model"],

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why do we need to pull this out when the key word is model anyway?

Comment thread ml_peg/models/models.py
device: Device | None = None
kwargs: dict = dataclasses.field(default_factory=dict)

def get_calculator(self, **kwargs) -> Calculator:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Does this work when we set precision? I don't think they've implemented anything yet (MDIL-SNU/SevenNet#138), and then precision will get passed to SevenNetCalculator

Comment thread pyproject.toml
uma = [
"fairchem-core == 2.19.0; python_version >= '3.11'",
]
upet = [

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I think we just want to replace pet-mad? It's essentially the same repo

Comment thread pyproject.toml
Comment on lines +77 to +80
"upet",
]
sevenn = [
"sevenn",

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I would pin these so we know exactly what version we are using, and can rely on their interfaces

Comment thread ml_peg/models/models.yml
kwargs:
model: "7net-l3i5"

sevennet-omni-i12-mpa:

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Why this one? From their list, the standard omni is recommended?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

this is the one they submitted recently to matbench discovery so i assume its their model of choice. strange that one is reccomended. hmm we can discuss

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Hmm odd

@ElliottKasoar

Copy link
Copy Markdown
Collaborator

Also just to note, the pre-commit it failing

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants