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

Fix wrong name assignment in parser #42

Merged
merged 1 commit into from
Jan 31, 2024
Merged

Fix wrong name assignment in parser #42

merged 1 commit into from
Jan 31, 2024

Conversation

frostedoyster
Copy link
Collaborator

@frostedoyster frostedoyster commented Jan 26, 2024

Just missing a test. To be merged soon


📚 Documentation preview 📚: https://metatensor-models--42.org.readthedocs.build/en/42/

@frostedoyster
Copy link
Collaborator Author

The test is working. I'm also deleting model.pt which ended up in the folder in a previous PR by mistake

Copy link
Contributor

@PicoCentauri PicoCentauri left a comment

Choose a reason for hiding this comment

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

Thanks @frostedoyster for adding the tests.

@@ -26,6 +27,33 @@ def test_train(monkeypatch, tmp_path, output):
assert Path(output).is_file()


@pytest.mark.parametrize("output", [None, "mymodel.pt"])
def test_train_explicit_validation_test(monkeypatch, tmp_path, output):
Copy link
Contributor

Choose a reason for hiding this comment

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

Thanks for adding the test. We should also test a combination of these. Like both as a float each one as a float and both as files.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done!

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm I don't know if like that we add three more files here. Maybe keep the explicit and load this one, overwrite them and save them to the custom directory with the float options.

@@ -26,6 +27,33 @@ def test_train(monkeypatch, tmp_path, output):
assert Path(output).is_file()


@pytest.mark.parametrize("output", [None, "mymodel.pt"])
def test_train_explicit_validation_test(monkeypatch, tmp_path, output):
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm I don't know if like that we add three more files here. Maybe keep the explicit and load this one, overwrite them and save them to the custom directory with the float options.

Comment on lines 54 to 56
command = ["metatensor-models", "train", "options_explicit_valid_test.yaml"]
command = ["metatensor-models", "train", "options_explicit_valid.yaml"]
command = ["metatensor-models", "train", "options_explicit_test.yaml"]
Copy link
Contributor

Choose a reason for hiding this comment

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

I would rather like this as a pytest.mark.parametrize. These jobs creates files and this may interfere with each other.

@PicoCentauri
Copy link
Contributor

Should be now ready @frostedoyster.

@frostedoyster
Copy link
Collaborator Author

Thanks a lot @PicoCentauri!!

@frostedoyster frostedoyster merged commit 872dd0d into main Jan 31, 2024
8 checks passed
@frostedoyster frostedoyster deleted the parser-fixes branch January 31, 2024 13:23
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