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

The OVERHAUL #78

Merged
merged 9 commits into from
Jun 30, 2023
Merged

The OVERHAUL #78

merged 9 commits into from
Jun 30, 2023

Conversation

gdalle
Copy link
Member

@gdalle gdalle commented Jun 30, 2023

  • Bump to version 0.5.0
  • Introduce hierarchy of abstract types (see below)
  • Rename:
    • RegularizedGeneric -> RegularizedFrankWolfe
    • PlusIdentity -> IdentityRelaxation
    • soft_argmax -> SoftArgmax
    • sparse_argmax -> SparseArgmax
  • Make ImitationLoss more coherent with StructuredSVMLoss (field names, $\alpha$)
  • Rework 0-1 loss
  • Remove compress_distribution!
  • List related packages
  • Create examples folder and put tutorial there
  • Add kwarg use to tutorial
  • Add tutorial to tests
  • Start docs pages for layer choice and mathematical models
julia> using AbstractTrees, InferOpt, InteractiveUtils

julia> AbstractTrees.children(x::Type) = subtypes(x)

julia> print_tree(InferOpt.AbstractLayer)
AbstractLayer
├─ AbstractLossLayer
│  ├─ FenchelYoungLoss
│  ├─ ImitationLoss
│  ├─ SPOPlusLoss
│  └─ StructuredSVMLoss
├─ AbstractOptimizationLayer
│  ├─ AbstractPerturbed
│  │  ├─ PerturbedAdditive
│  │  └─ PerturbedMultiplicative
│  ├─ AbstractRegularized
│  │  ├─ RegularizedFrankWolfe
│  │  ├─ SoftArgmax
│  │  └─ SparseArgmax
│  ├─ IdentityRelaxation
│  └─ Interpolation
└─ Pushforward

BatyLeo and others added 2 commits June 29, 2023 14:31
  - Only one struct named `Regularized`, every regularized layer is a particular case of it
  - Specific constructors for `SparseArgmax`, `SoftArgmax`, and `RegularizedFrankWolfe`
  - Now we can also use `Regularized` with a custom optimizer (we may need to test this feature)
@gdalle gdalle changed the title New_types The OVERHAUL Jun 30, 2023
@gdalle gdalle requested a review from BatyLeo June 30, 2023 08:53
@gdalle gdalle linked an issue Jun 30, 2023 that may be closed by this pull request
@codecov-commenter
Copy link

codecov-commenter commented Jun 30, 2023

Codecov Report

Patch coverage: 86.00% and project coverage change: +4.69 🎉

Comparison is base (7dcc51d) 80.05% compared to head (5f3608a) 84.75%.

❗ 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
@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
+ Coverage   80.05%   84.75%   +4.69%     
==========================================
  Files          19       18       -1     
  Lines         346      341       -5     
==========================================
+ Hits          277      289      +12     
+ Misses         69       52      -17     
Impacted Files Coverage Δ
src/InferOpt.jl 100.00% <ø> (ø)
src/imitation/spoplus_loss.jl 89.65% <ø> (ø)
src/perturbed/abstract_perturbed.jl 90.00% <ø> (ø)
src/perturbed/additive.jl 83.33% <ø> (ø)
src/perturbed/multiplicative.jl 83.33% <ø> (ø)
src/simple/interpolation.jl 80.00% <ø> (ø)
src/utils/probability_distribution.jl 62.50% <ø> (+25.91%) ⬆️
src/utils/some_functions.jl 90.47% <ø> (ø)
src/utils/pushforward.jl 38.46% <42.85%> (ø)
src/regularized/regularized_frank_wolfe.jl 72.72% <72.72%> (ø)
... and 8 more

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

Copy link
Member

@BatyLeo BatyLeo left a comment

Choose a reason for hiding this comment

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

Great improvements over(h)a(u)ll !

Project.toml Show resolved Hide resolved
src/imitation/zero_one_loss.jl Show resolved Hide resolved
src/imitation/zero_one_loss.jl Show resolved Hide resolved
src/imitation/fenchel_young.jl Outdated Show resolved Hide resolved
src/regularized/abstract_regularized.jl Show resolved Hide resolved
src/regularized/frank_wolfe.jl Outdated Show resolved Hide resolved
src/spo/spoplus_loss.jl Show resolved Hide resolved
src/utils/pushforward.jl Show resolved Hide resolved
src/utils/pushforward.jl Show resolved Hide resolved
@BatyLeo BatyLeo added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 30, 2023
@gdalle gdalle merged commit b9f4f69 into main Jun 30, 2023
4 checks passed
@gdalle gdalle deleted the new_types branch June 30, 2023 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cite alternatives Get rid of SimpleTraits?
3 participants