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

Add classical optimisation problems to testing suite & examples #391

Open
BradyPlanden opened this issue Jul 5, 2024 · 5 comments
Open
Labels
enhancement New feature or request

Comments

@BradyPlanden
Copy link
Member

Feature description

In addition to our current battery focused identification and optimisation tasks, we should add tests and examples with classical benchmark optimisation tasks. An initial list of potential functions is available here

Motivation

This can help validate our workflows outside of battery focused tasks and provide benchmarks against other inference packages. Likewise, this could help the MCMC integration tests in #340 by having a higher performance forward model.

Possible implementation

No response

Additional context

No response

@BradyPlanden BradyPlanden added the enhancement New feature or request label Jul 5, 2024
@BradyPlanden BradyPlanden moved this to Todo in v24.9 Jul 18, 2024
@NicolaCourtier NicolaCourtier removed this from v24.9 Aug 28, 2024
@NicolaCourtier NicolaCourtier moved this to Todo in v24.12 Aug 28, 2024
@brosaplanella
Copy link
Contributor

Do you mean throwing these functions to the optimisers or going through the PyBOP problem class? I think the former is more adequate.

The other question I have is, should the examples be with the other examples? If we just use these functions for testing, we can define them in the tests folder. Otherwise, if we want to use them in the examples, we will have to define them inside PyBOP.

@BradyPlanden
Copy link
Member Author

Do you mean throwing these functions to the optimisers or going through the PyBOP problem class? I think the former is more adequate.

The former would be my preferred method as well. I think an easy entry point is inheriting the BaseCost for these functions.

The other question I have is, should the examples be with the other examples? If we just use these functions for testing, we can define them in the tests folder. Otherwise, if we want to use them in the examples, we will have to define them inside PyBOP.

That's a good question, I think it would be nice to offer these to users. In #481, I've created an experimental as discussed in the developers meeting, these classes could sit in this directory until we find the best location. Thoughts?

@brosaplanella
Copy link
Contributor

That's a good question, I think it would be nice to offer these to users. In #481, I've created an experimental as discussed in the developers meeting, these classes could sit in this directory until we find the best location. Thoughts?

If they inherit from BaseCost we could incude them in asubdirectory in the costs folder

@BradyPlanden
Copy link
Member Author

BradyPlanden commented Nov 22, 2024

Since they won't have a problem class, they won't be able to be used exactly like the other cost classes. This limitation could be captured in their docstrings, but the experimental directory does provide a clear warning to users for the beginning. Either works with me, as long as we are clear what the limitations are :)

For reference the standalone cost class is a good starting place for this: https://github.com/pybop-team/PyBOP/blob/develop/examples/standalone/cost.py

@brosaplanella
Copy link
Contributor

I am keen on implementing this, but probably won't have much time in the next few weeks. If someone else is keen, please go ahead. Otherwise I will give it a go once I have a bit of time.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

2 participants