plasmo-dev / Plasmo.jl

A Platform for Scalable Modeling and Optimization
Other
143 stars 20 forks source link

Fix slow graph objective #79

Closed jalving closed 1 year ago

jalving commented 1 year ago

This fixes a recurring issue that PR https://github.com/plasmo-dev/Plasmo.jl/pull/78 was supposed to address. The problem is that even using add_to_expression! is still very slow when updating node objective functions using the graph objective. The solution used here is to simply separate node and graph objective functions. A user must actually call set_node_objective_functions if they intend to update all of the nodes with a graph objective.

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 20.00% and project coverage change: -1.53 :warning:

Comparison is base (ee2b7c4) 90.29% compared to head (b69838b) 88.76%.

:exclamation: Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #79 +/- ## ========================================== - Coverage 90.29% 88.76% -1.53% ========================================== Files 19 19 Lines 2307 2324 +17 ========================================== - Hits 2083 2063 -20 - Misses 224 261 +37 ``` | [Impacted Files](https://app.codecov.io/gh/plasmo-dev/Plasmo.jl/pull/79?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [src/optimizer\_interface.jl](https://app.codecov.io/gh/plasmo-dev/Plasmo.jl/pull/79?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL29wdGltaXplcl9pbnRlcmZhY2Uuamw=) | `90.00% <ø> (ø)` | | | [src/optigraph.jl](https://app.codecov.io/gh/plasmo-dev/Plasmo.jl/pull/79?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL29wdGlncmFwaC5qbA==) | `76.31% <20.00%> (-9.23%)` | :arrow_down: | ... and [2 files with indirect coverage changes](https://app.codecov.io/gh/plasmo-dev/Plasmo.jl/pull/79/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.