JuliaDecisionFocusedLearning / InferOpt.jl

Combinatorial optimization layers for machine learning pipelines
https://juliadecisionfocusedlearning.github.io/InferOpt.jl/
MIT License
113 stars 4 forks source link

Parallelize perturbed with ThreadsX #31

Closed BatyLeo closed 1 year ago

BatyLeo commented 1 year ago

Add an option to created parallelized version of PerturbedAdditive and PerturbedMultiplicative, as a keyword argument is_parallel in their respective constructors.

See #29.

codecov-commenter commented 1 year ago

Codecov Report

Base: 88.85% // Head: 87.95% // Decreases project coverage by -0.90% :warning:

Coverage data is based on head (2ed31a5) compared to base (56fabdb). Patch coverage: 69.56% of modified lines in pull request are covered.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #31 +/- ## ========================================== - Coverage 88.85% 87.95% -0.91% ========================================== Files 18 18 Lines 368 382 +14 ========================================== + Hits 327 336 +9 - Misses 41 46 +5 ``` | [Impacted Files](https://codecov.io/gh/axelparmentier/InferOpt.jl/pull/31?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None) | Coverage Δ | | |---|---|---| | [src/perturbed/abstract\_perturbed.jl](https://codecov.io/gh/axelparmentier/InferOpt.jl/pull/31/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL3BlcnR1cmJlZC9hYnN0cmFjdF9wZXJ0dXJiZWQuamw=) | `90.00% <60.00%> (-10.00%)` | :arrow_down: | | [src/fenchel\_young/perturbed.jl](https://codecov.io/gh/axelparmentier/InferOpt.jl/pull/31/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL2ZlbmNoZWxfeW91bmcvcGVydHVyYmVkLmps) | `87.50% <62.50%> (-12.50%)` | :arrow_down: | | [src/perturbed/additive.jl](https://codecov.io/gh/axelparmentier/InferOpt.jl/pull/31/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL3BlcnR1cmJlZC9hZGRpdGl2ZS5qbA==) | `95.83% <80.00%> (+0.37%)` | :arrow_up: | | [src/perturbed/multiplicative.jl](https://codecov.io/gh/axelparmentier/InferOpt.jl/pull/31/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None#diff-c3JjL3BlcnR1cmJlZC9tdWx0aXBsaWNhdGl2ZS5qbA==) | `95.83% <80.00%> (+0.37%)` | :arrow_up: | Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=None)

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