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

Improve ordering in k_matrix involved_compartments function #788

Merged
merged 1 commit into from
Aug 25, 2021

Conversation

jsnel
Copy link
Member

@jsnel jsnel commented Aug 23, 2021

Avoiding the use of set to improve ordering

Refactor at least guarantees better than random ordering using list(set(x))

TODO: further improve ordering to use initial_concentrations ordering

Checklist

  • ✔️ Passing the tests (mandatory for all PR's)
  • 👌 Closes issue (mandatory for ✨ feature and 🩹 bug fix PR's)

Closes issues

closes #787

@github-actions
Copy link
Contributor

Binder 👈 Launch a binder notebook on branch jsnel/pyglotaran/fix/787_ordered_involved_compartments

@codecov
Copy link

codecov bot commented Aug 23, 2021

Codecov Report

Merging #788 (2a76a0b) into staging (dd0ce80) will increase coverage by 0.0%.
The diff coverage is 100.0%.

Impacted file tree graph

@@           Coverage Diff           @@
##           staging    #788   +/-   ##
=======================================
  Coverage     83.9%   83.9%           
=======================================
  Files           75      75           
  Lines         4185    4186    +1     
  Branches       752     754    +2     
=======================================
+ Hits          3512    3513    +1     
  Misses         538     538           
  Partials       135     135           
Impacted Files Coverage Δ
glotaran/builtin/megacomplexes/decay/k_matrix.py 94.9% <100.0%> (+<0.1%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd0ce80...2a76a0b. Read the comment docs.

Copy link
Member

@joernweissenborn joernweissenborn left a comment

Choose a reason for hiding this comment

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

This should work for now.

Will be revised in 0.6

Avoiding the use of set to improve ordering

Refactor at least guarantees better than random ordering using list(set(x))

TODO: further improve ordering to use initial_concentrations ordering
@jsnel jsnel force-pushed the fix/787_ordered_involved_compartments branch from 6a1f725 to 2a76a0b Compare August 25, 2021 01:50
@sonarqubecloud
Copy link

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 7 Code Smells

No Coverage information No Coverage information
0.0% 0.0% Duplication

@github-actions
Copy link
Contributor

Benchmark is done. Checkout the benchmark result page.
Benchmark differences below 5% might be due to CI noise.

Benchmark diff

Parametrized benchmark signatures:

BenchmarkOptimize.time_optimize(index_dependent, grouped, weight)

All benchmarks:

       before           after         ratio
     [dc00e6da]       [2a76a0bd]
     <v0.4.0>                   
-        44.0±1ms       33.7±0.6ms     0.77  BenchmarkOptimize.time_optimize(False, False, False)
-         244±4ms         40.2±2ms     0.17  BenchmarkOptimize.time_optimize(False, False, True)
-      63.2±0.8ms       55.0±0.8ms     0.87  BenchmarkOptimize.time_optimize(False, True, False)
-        64.6±1ms         57.1±1ms     0.88  BenchmarkOptimize.time_optimize(False, True, True)
         45.6±2ms       41.7±0.6ms     0.92  BenchmarkOptimize.time_optimize(True, False, False)
-         241±2ms        51.8±20ms     0.21  BenchmarkOptimize.time_optimize(True, False, True)
         64.6±1ms       64.9±0.4ms     1.00  BenchmarkOptimize.time_optimize(True, True, False)
         68.4±3ms         70.1±3ms     1.02  BenchmarkOptimize.time_optimize(True, True, True)
             179M             177M     0.99  IntegrationTwoDatasets.peakmem_create_result
             195M             193M     0.99  IntegrationTwoDatasets.peakmem_optimize
-         207±3ms          170±3ms     0.82  IntegrationTwoDatasets.time_create_result
-      4.35±0.01s        1.59±0.1s     0.36  IntegrationTwoDatasets.time_optimize

@jsnel jsnel merged commit a6a5a51 into glotaran:staging Aug 25, 2021
@jsnel jsnel deleted the fix/787_ordered_involved_compartments branch August 25, 2021 02:03
jsnel added a commit that referenced this pull request Sep 16, 2021
Avoiding the use of set to improve ordering

Refactor at least guarantees better than random ordering using list(set(x))

TODO: further improve ordering to use initial_concentrations ordering
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