Conversation
8186ca3 to
3503c22
Compare
SimonBlanke
left a comment
There was a problem hiding this comment.
It would fit better to create a new module "test_functions_4d", because this test-function does not have a n_dim parameter. There is also some code-quality test, that fails.
|
Done and cleaned the code @SimonBlanke |
SimonBlanke
left a comment
There was a problem hiding this comment.
There are some tests failing. Could you explain why?
|
My bad @SimonBlanke , it's because ShekelFunction was simultaneously still sitting in the standard_functions_nd list in constructor. Should be all green now |
|
|
||
| def _create_objective_function(self) -> None: | ||
| def shekel_function(params: Dict[str, Any]) -> float: | ||
| x_input = np.array([params[f"x{i}"] for i in range(self.n_dim)]) |
There was a problem hiding this comment.
You need to change this and the search-space. This part still looks like an n-d test function
|
Hey @SimonBlanke ,
Just a lil note, I think it will fail on CI run because in |
SimonBlanke
left a comment
There was a problem hiding this comment.
Some tests are still failing. Please also do a local test run before pushing the new commits.
|
Tests are failing because We can fix this by making it dim-agnostic. Specifically: |
That is right! Currently we do not even have 3D test functions. Only 1D, 2D and ND. And the test is set on this test-function collection, which is not good. I think your change makes sense. Please implement it :-) |
|
Done @SimonBlanke , spec consistency tests are now passing.
|
SimonBlanke
left a comment
There was a problem hiding this comment.
I would like to merge this soon, but there are changes in the .gitignore that create merge conflicts. There should not be any changes in the .gitignore in this PR.
|
Resolved @SimonBlanke |
SimonBlanke
left a comment
There was a problem hiding this comment.
There are some test fails. It is an easy fix. Just bump the number.
|
Thanks for your patience !!! These were my first two PRs ever on GitHub, so I learned a lot, especially about how not to be a dumbass in a large codebase. |

Description
This PR adds the Shekel function to the library's collection of standard algebraic test functions.
Related Issues
issue #10
Type of Change
[ENH]- New feature (non-breaking change adding functionality))How was this solved?
Implementation: Created shekel_function.py inside src/surfaces/test_functions/algebraic/standard/test_functions_nd/.
Registration: Updated the following init.py files to ensure the function is properly exported and accessible via the library's API:
src/surfaces/test_functions/algebraic/init.py
src/surfaces/test_functions/algebraic/standard/init.py
src/surfaces/test_functions/algebraic/standard/test_functions_nd/init.py
Checklist
Required
[BUG],[ENH],[DOC]or[MNT]make check(lint, format, isort)Tests
Documentation
Testing
It can be verified by instantiating it through the standard algebraic interface:
Additional Notes
This is a fresh Pull Request intended to replace previous one that was "accidentally" combined with the other one