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

Do not disable rascaline's logger #147

Merged
merged 5 commits into from
Mar 15, 2024
Merged

Conversation

frostedoyster
Copy link
Collaborator

@frostedoyster frostedoyster commented Mar 13, 2024

Without these changes, evaluating the SOAP-BPNN looks like this on my laptop. However, I don't think this is a sustainable solution because we have to import rascaline

filippo@C03DL22:~/metatensor-models/tests/resources$ metatensor-models eval bpnn-model.pt eval.yaml
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
[2024-03-13 18:02:06][INFO] - Setting up evaluation set.
[2024-03-13 18:02:06][INFO] - Evaluating dataset
[2024-03-13 18:02:06][WARNING] - Forces not found in section 'energy'. Continue without forces!
[2024-03-13 18:02:06][WARNING] - Stress not found in section 'energy'. Continue without stress!
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
[2024-03-13 18:02:14][INFO] - energy RMSE: 0.27898045890441614
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)
rascaline::math::splines -- spline reached requested accuracy (1.000e-8) with 321 reference points (max absolute error is 5.699e-8)

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

import rascaline.torch # noqa: F401

rascaline.set_logging_callback(lambda x, y: None)
Copy link
Member

@Luthaf Luthaf Mar 14, 2024

Choose a reason for hiding this comment

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

So this is problematic because it will also suppress the warnings. Maybe something like

from rascaline.log import RASCAL_LOG_LEVEL_WARN, RASCAL_LOG_LEVEL_ERROR

def rascaline_logging(level, message):
    if level in [RASCAL_LOG_LEVEL_WARN, RASCAL_LOG_LEVEL_ERROR]:
        rascaline.log.default_logging_callback(level, message)

rascaline.set_logging_callback(rascaline_logging)

Another solution would be to move the spline message to debug instead of info level in rascaline.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ok, fair, I will do this.

But how will we do this when rascaline won't be imported explicitly in Python?

Copy link
Member

Choose a reason for hiding this comment

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

You mean for eval?

Another solution would be to move the spline message to debug instead of info level in rascaline.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I mean for eval

@frostedoyster
Copy link
Collaborator Author

Following Luthaf/rascaline#289, this pull request will be about removing the filtering of warnings and errors from rascaline

@frostedoyster frostedoyster changed the title Disable rascaline logger during eval as well Do not disable rascaline's logger Mar 15, 2024
Copy link
Member

@Luthaf Luthaf left a comment

Choose a reason for hiding this comment

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

Sounds good, should we wait for the rascaline PR & also update the pinned commit?

@frostedoyster
Copy link
Collaborator Author

Yes, indeed

@frostedoyster frostedoyster merged commit cc9fbc9 into main Mar 15, 2024
9 of 10 checks passed
@frostedoyster frostedoyster deleted the eval-rascaline-logger branch March 15, 2024 13:18
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