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

Main interface implementation and first benchmark problems #4

Merged
merged 34 commits into from
Oct 8, 2024

Conversation

BatyLeo
Copy link
Member

@BatyLeo BatyLeo commented May 14, 2024

This PR is an attempt at a common interface for all Benchmarks:

  • AbstractBenchmark abstract type
  • A benchmark is generator for everything needed to build a pipeline
  • Dedicated DataSample struct for staoring sample
  • generate_dataset allows generating a dataset (of type Vector{<:DataSample}) for training/testing of requested size
  • generate_maximizer generates a callable optimizer function
  • generate_statistical_model generates an untrained Flux model specific for the considered benchmark
  • plot_data can visualize isnatnces/solutions, depending on the given inputs
  • compute_gap computes the performance metric of given pipeline on given dataset

And some implemented examples;

  • WarcraftBenchmark: path finding on image maps
  • PortfolioOptimizationBenchmark: portfolio optimization with uncertain prices
  • FixedSizeShortestPathBenchmark: shortest path on a square graph of fixed size
  • SubsetSelectionBenchmark: minimalist pipeline with top-k layer

Questions:

  • Do we need a pipeline struct?
  • Is the interface generic enough?
  • What tests can we perform beside training a pipeline?

Note: we should rename the package as DecisionFocusedLearningBenchmarks, and also rename all names mentioning InferOpt

@BatyLeo
Copy link
Member Author

BatyLeo commented May 14, 2024

@gdalle JET doesn't like my code, do you know what's wrong? I don't understand its error message.

@gdalle
Copy link
Member

gdalle commented May 14, 2024

I think the key line is this one:

no matching method found `rand(::Random.MersenneTwister, ::Type{Float32}, ::Distributions.Uniform{Float64}, ::Int64)`

You probably cannot force the sampling type of a Distribution

@BatyLeo
Copy link
Member Author

BatyLeo commented May 14, 2024

You're right, I need to specify the type in the distribution constructor, not in the sampling. Thanks!

Copy link

codecov bot commented May 14, 2024

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@BatyLeo BatyLeo marked this pull request as ready for review August 9, 2024 15:22
@BatyLeo BatyLeo merged commit 3569254 into main Oct 8, 2024
2 of 3 checks passed
@BatyLeo BatyLeo deleted the decision-focused-learning branch October 8, 2024 14:02
@gdalle
Copy link
Member

gdalle commented Oct 8, 2024

incroyable !!!!

@BatyLeo
Copy link
Member Author

BatyLeo commented Oct 8, 2024

Just came back from holidays, starting a fresh PR!

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