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

project.create_experiment and run _exp seems buggy #241

Open
sandipde opened this issue Dec 10, 2023 · 0 comments
Open

project.create_experiment and run _exp seems buggy #241

sandipde opened this issue Dec 10, 2023 · 0 comments
Labels
bug Something isn't working research zntrack

Comments

@sandipde
Copy link

sandipde commented Dec 10, 2023

Hi, Thanks for building this great project. I am trying to utilise this for active learning with mace. The simple test worked but I feel I am missing something to go forward.

import ipsuite as ips
with ips.Project() as project:
    data = ips.AddData(file="my_data.xyz")
    test_data = ips.configuration_selection.UniformEnergeticSelection(
        data=data, n_configurations=156, name="test_data"
    )
    # we have now given the Nodes a "name" attribute to uniquly identify them
    train_data = ips.configuration_selection.RandomSelection(
        data=data,
        n_configurations=100,
        exclude_configurations=test_data.exclude_configurations,
        name="train_data",
    )
    validate_data = ips.configuration_selection.RandomSelection(
        data=train_data.excluded_atoms,
        n_configurations=10,
        name="validate_data",
    )
    model = ips.models.MACE(
        data=train_data,
        test_data=validate_data,
    )
    prediction = ips.analysis.Prediction(model=model, data=test_data)
    analysis = ips.analysis.PredictionMetrics(data=prediction)
project.run()

this works for me

but then

with project.create_experiment(name="baseline") as exp1 :
    # this will store the current experiment with the name "baseline"
    pass

with project.create_experiment() as exp2:
    test_data.n_configurations = 80

project.run_exp()

Fails. However

dvc exp run -S 'test_data.n_configurations=80' works perfectly. What am I doing wrong?

In addition I am wondering if I am expected to dvc exp apply <exp> and git commit independenty on the directory to track the changes between experiments like usual dvc steps. Any help or pointer would be highly appreciated. Thanks in advance.

dvc version 3.33.3
ZnTrack 0.7.1
ipsuite 0.1.1
python 3.10.13

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working research zntrack
Projects
None yet
Development

No branches or pull requests

2 participants