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

Force correct self.technosphere_matrix format for solver #101

Merged
merged 3 commits into from
Jul 24, 2024

Conversation

marc-vdm
Copy link
Contributor

@marc-vdm marc-vdm commented Jul 17, 2024

What
self.technosphere_matrix is now forced to csr when using PYPARDISO or otherwise forced to csc

Why

  1. This forces the correct matrix format for the solver, e.g. when user is over-writing their own technosphere, the correct format is still ensured
  2. For scipy users, this shouldn't change anything
  3. For PyPardiso users, this should speed up calculations ~10% on repeated solves, as BW would previously force the format to csc and then pypardiso would force it back to csr

See here for further discussion: haasad/PyPardiso#75 (comment)

Copy link

codecov bot commented Jul 17, 2024

Codecov Report

Attention: Patch coverage is 47.05882% with 9 lines in your changes missing coverage. Please review.

Project coverage is 81.44%. Comparing base (2417a1b) to head (a89ede1).
Report is 1 commits behind head on main.

Files Patch % Lines
bw2calc/lca_base.py 41.66% 7 Missing ⚠️
bw2calc/multi_lca.py 60.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #101      +/-   ##
==========================================
- Coverage   83.65%   81.44%   -2.22%     
==========================================
  Files          14       14              
  Lines         832      846      +14     
==========================================
- Hits          696      689       -7     
- Misses        136      157      +21     

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

@marc-vdm
Copy link
Contributor Author

marc-vdm commented Jul 17, 2024

Maintainers, please advise on failing tests.

  1. The tests run fine for me locally (linux, py3.12), so I can't reproduce this as MC apparently works here
  2. I have no clue what Codecov wants from me.

@cmutel
Copy link
Member

cmutel commented Jul 24, 2024

I am going to merge and fix tests afterwards

@cmutel cmutel merged commit fea496c into brightway-lca:main Jul 24, 2024
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.

Factorizing matrices with pypardiso is not a no-op
2 participants