Skip to content

Conversation

@curtischong
Copy link
Collaborator

@curtischong curtischong commented Jan 23, 2026

Updates the Mace model to allow people to pass in URLs to load models (#381) - so we don't need to call mace_mp

  • 3_dynamics.py still uses the old load_model method since we're sharing the model in 2 places. Also it's good documentation for how to do it the load_model way as well.

@curtischong curtischong marked this pull request as draft January 23, 2026 04:53
@curtischong curtischong force-pushed the auto-download-mace-models branch 2 times, most recently from 7f33f7f to 816fb3c Compare January 24, 2026 16:21
def __init__(
self,
model: str | Path | torch.nn.Module | None = None,
model: str | Path | torch.nn.Module | MACECalculator | None = None,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added the MACECalculator type since mace_mp returns it and it's an accepted type to this function

@curtischong curtischong force-pushed the auto-download-mace-models branch from 07207f1 to 50be710 Compare January 24, 2026 16:26
@curtischong curtischong changed the title Add automatic model downloading for MACE models by name Add automatic model downloading for MACE models by URL Jan 24, 2026
@curtischong curtischong marked this pull request as ready for review January 24, 2026 16:46
@curtischong curtischong changed the title Add automatic model downloading for MACE models by URL Specify MACE models by URL Jan 24, 2026
@curtischong curtischong force-pushed the auto-download-mace-models branch from d16cf0d to a6ff97a Compare January 24, 2026 18:56
@curtischong curtischong changed the title Specify MACE models by URL Specify MACE models by URL or by name Jan 24, 2026
@curtischong curtischong force-pushed the auto-download-mace-models branch from a6ff97a to f851285 Compare January 24, 2026 19:01
try:
from mace.calculators.foundations_models import mace_mp

try:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added this second try catch since I checked to see when was mace_mp_urls added and it was only added 8 months ago, so older mace versions may not have it ACEsuit/mace@ab913f8

@curtischong curtischong force-pushed the auto-download-mace-models branch from 793e746 to 2b69f5e Compare January 24, 2026 19:37
@curtischong curtischong force-pushed the auto-download-mace-models branch from 2b69f5e to c53be54 Compare January 24, 2026 19:41
@curtischong curtischong added the enhancement New feature or request label Jan 24, 2026

return MaceModel(
model=mace_model,
model="https://github.com/ACEsuit/mace-mp/releases/download/mace_mp_0/2023-12-03-mace-128-L1_epoch-199.model",
Copy link
Collaborator Author

@curtischong curtischong Jan 24, 2026

Choose a reason for hiding this comment

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

we don't want people with older models of mace to not run these tests

@curtischong curtischong force-pushed the auto-download-mace-models branch from 2c1cfa3 to e6d0d08 Compare January 24, 2026 21:21
@curtischong curtischong force-pushed the auto-download-mace-models branch from e6d0d08 to 683f0f3 Compare January 24, 2026 21:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants