Skip to content

Avoid and hide deprecation warnings - #1248

Merged
pfebrer merged 4 commits into
mainfrom
warnings
Aug 11, 2026
Merged

Avoid and hide deprecation warnings#1248
pfebrer merged 4 commits into
mainfrom
warnings

Conversation

@pfebrer

@pfebrer pfebrer commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Before the next release, we:

  • Hide the multiprocessing warnings (see change in metatrain.utils.logging). These just warn about a problem that has been there since forever, it's not like the new release will be less robust than the previous ones in this regard.
  • Remove all uses of ModelOutput(quantity="X") to avoid getting metatomic's warning. These were useless anyway, so in principle it shouldn't be a problem. The only architecture that seems to use output.quantity is LLPR, so there I didn't change anything. But it could be that having removed it in PET will create problems. Could you see if things can be done without output.quantity @ppegolo ?
  • Add unit="eV" to the ModelOutput that is initialized in metatrain.utils.data.dataset to avoid getting an "empty unit" warning.

📚 Documentation preview 📚: https://metatrain--1248.org.readthedocs.build/en/1248/

@ppegolo

ppegolo commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

I'll have a look at the LLPR arch, thanks

@Luthaf

Luthaf commented Aug 10, 2026

Copy link
Copy Markdown
Member

Add unit="eV" to the ModelOutput that is initialized in metatrain.utils.data.dataset to avoid getting an "empty unit" warning.

I'd rather not do that, the user should give the unit of the data in the input to avoid this warning. Guessing eV might be wrong and would be a problem …

@pfebrer

pfebrer commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

This is just a dummy call that we do to ModelCapabilities to check that the length unit is accepted by metatomic, the output is a made up output in this case.

@ppegolo
ppegolo requested a review from SanggyuChong as a code owner August 10, 2026 13:33
@pfebrer

pfebrer commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

cscs-ci run

@pfebrer

pfebrer commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

Thanks Paolo, your changes look good to me, so feel free to approve and merge or suggest changes if you want 👍

@pfebrer

pfebrer commented Aug 10, 2026

Copy link
Copy Markdown
Contributor Author

cscs-ci run

@pfebrer
pfebrer enabled auto-merge (squash) August 10, 2026 14:33
@pfebrer

pfebrer commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

cscs-ci run

@pfebrer

pfebrer commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

cscs-ci run

@pfebrer

pfebrer commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

Ok @ppegolo I have spent some time and I don't know how to hide the "fork" warning from pytest in a clean way so I added it back to the filterwarnings list. But in principle the logs don't show the warnings anymore, could you check if this is fine in your environment in CSCS?

@pfebrer

pfebrer commented Aug 11, 2026

Copy link
Copy Markdown
Contributor Author

(in the CI it is fine, the logs don't contain the warnings)

@pfebrer
pfebrer merged commit b2b4560 into main Aug 11, 2026
22 of 23 checks passed
@pfebrer
pfebrer deleted the warnings branch August 11, 2026 11:01
@ppegolo

ppegolo commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

confirmed, no fork warnings

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.

3 participants