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

prepare for ZnTrack v0.8.0 release #356

Merged
merged 32 commits into from
Nov 28, 2024
Merged

prepare for ZnTrack v0.8.0 release #356

merged 32 commits into from
Nov 28, 2024

Conversation

PythonFZ
Copy link
Contributor

@PythonFZ PythonFZ commented Oct 21, 2024

Works like

Training a Model within apax

from apax.nodes import AddData, Apax
import zntrack

project = zntrack.Project()

with project:
    train = AddData(file="data/cosmo_water_train.xyz")
    test = AddData(file="data/cosmo_water_test.xyz")

    model = Apax(
        data=train.frames,
        validation_data=test.frames,
        config="config.yaml",
    )

project.repro()

and loading it from rev should now work just fine

import zntrack
from ase.build import molecule
import os

os.chdir("/tmp")

model = zntrack.from_rev("Apax", remote="/Users/fzills/tools/apax/models")
water = molecule("H2O")
water.calc = model.get_calculator()
water.get_forces()

PythonFZ and others added 26 commits October 21, 2024 15:19
@PythonFZ PythonFZ marked this pull request as ready for review November 28, 2024 10:57
apax/nodes/md.py Outdated
@@ -38,7 +36,7 @@ class ApaxJaxMD(zntrack.Node):
data_id: int = zntrack.params(-1)

model: ApaxBase = zntrack.deps()
repeat = zntrack.params(None)
repeat: typing.Optional[bool] = zntrack.params(None)
Copy link
Contributor

Choose a reason for hiding this comment

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

wouldn't this bee optional[list[int]]?

@@ -42,11 +43,11 @@ class Apax(ApaxBase):

data: list = zntrack.deps()
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this would also be list[ase.atoms]

Copy link
Contributor

@M-R-Schaefer M-R-Schaefer left a comment

Choose a reason for hiding this comment

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

Thanks for the update! I had some minor comments but otherwise it looks great!

@PythonFZ PythonFZ merged commit c45b446 into main Nov 28, 2024
2 checks passed
@PythonFZ PythonFZ deleted the zntrack-v08 branch November 28, 2024 16:11
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