Skip to content

Added a dropout argument to the M3GNET constructor - #628

Merged
shyuep merged 1 commit into
materialyzeai:mainfrom
miicck:add_dropout_m3gnet_constructor
Aug 6, 2025
Merged

Added a dropout argument to the M3GNET constructor#628
shyuep merged 1 commit into
materialyzeai:mainfrom
miicck:add_dropout_m3gnet_constructor

Conversation

@miicck

@miicck miicck commented Aug 5, 2025

Copy link
Copy Markdown
Contributor

The constructor simply passes the value down to the underlying M3GNetBlock layers. The default value is None (corresponding to no dropout), the same as for the M3GNetBlock layers - so there is no change to default behaviour. I'm using this to regularize my models - and it's working as intended.

Summary

Changes:

  • feature 1: Added a parameter to the constructor of a M3GNet model that allows passing down a dropout value. The default value preserves current behaviour.

Checklist

  • Google format doc strings added. Check with ruff.
  • Type annotations included. Check with mypy.
  • (N/A) Tests added for new features/fixes .
  • (N/A) If applicable, new classes/functions/modules have duecredit @due.dcite decorators to reference relevant papers by DOI (example)

Tip: Install pre-commit hooks to auto-check types and linting before every commit:

pip install -U pre-commit
pre-commit install

The constructor simply passes the value down to the underlying
M3GNetBlock layers. The default value is None (corresponding to no
dropout), the same as for the M3GNetBlock layers - so there is no change
to default behaviour.
@miicck
miicck requested review from kenko911 and shyuep as code owners August 5, 2025 12:18
@codecov

codecov Bot commented Aug 6, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 79.43%. Comparing base (464a49b) to head (5caf39e).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #628   +/-   ##
=======================================
  Coverage   79.43%   79.43%           
=======================================
  Files          45       45           
  Lines        3915     3915           
=======================================
  Hits         3110     3110           
  Misses        805      805           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@shyuep
shyuep merged commit 97f8081 into materialyzeai:main Aug 6, 2025
6 of 7 checks passed
@shyuep

shyuep commented Aug 6, 2025

Copy link
Copy Markdown
Contributor

Thanks!

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