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

refactor: Update handling of assigned attributes. #220

Merged

Conversation

norhan-synnada
Copy link
Collaborator

@norhan-synnada norhan-synnada commented Mar 5, 2025

Description

Closes #216

What is Changed

  • Data structures for storing assigned shapes, types and differentiabilities updated.
  • Canonical inputs and outputs set by the user are traced also.
  • Serialization for these attributes is updated.
  • Setting strategy of these attributes updated in _add_connections method of BaseModel.
  • trace flag added for _extend, extend and _add_connections methods.
  • Dict conversions updated accordingly.
  • Tests updated accordingly.

Checklist:

  • Tests that cover the code added.
  • Corresponding changes documented.
  • All tests passed.
  • The code linted and styled (pre-commit run --all-files has passed).

Copy link

codecov bot commented Mar 5, 2025

Codecov Report

Attention: Patch coverage is 94.00000% with 18 lines in your changes missing coverage. Please review.

Project coverage is 89.31%. Comparing base (ff34187) to head (061d53e).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
mithril/utils/dict_conversions.py 94.37% 9 Missing ⚠️
mithril/framework/logical/base.py 88.13% 7 Missing ⚠️
mithril/models/models.py 95.00% 2 Missing ⚠️
@@            Coverage Diff             @@
##             main     #220      +/-   ##
==========================================
- Coverage   89.37%   89.31%   -0.07%     
==========================================
  Files          75       75              
  Lines       17067    17203     +136     
==========================================
+ Hits        15254    15365     +111     
- Misses       1813     1838      +25     
Files with missing lines Coverage Δ
mithril/cores/python/numpy/ops.py 81.40% <100.00%> (ø)
mithril/framework/common.py 96.67% <100.00%> (+0.02%) ⬆️
mithril/framework/logical/model.py 93.42% <100.00%> (ø)
mithril/framework/logical/operator.py 96.92% <100.00%> (ø)
mithril/framework/logical/operators.py 100.00% <100.00%> (ø)
mithril/framework/logical/primitive.py 96.00% <100.00%> (-4.00%) ⬇️
mithril/models/primitives.py 98.02% <100.00%> (ø)
mithril/models/models.py 90.14% <95.00%> (ø)
mithril/framework/logical/base.py 91.08% <88.13%> (-0.20%) ⬇️
mithril/utils/dict_conversions.py 81.89% <94.37%> (-0.46%) ⬇️

... and 3 files with indirect coverage changes

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

@aturker-synnada
Copy link
Collaborator

LGTM

@kberat-synnada kberat-synnada merged commit d506aae into synnada-ai:main Mar 7, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[OTHER] Update assigned shapes, types, differentiability handlings
4 participants