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

DocString incorrect: utils.measurement.synthetic_functions SyntheticFunction #1545

Closed
ClaasRostock opened this issue Mar 23, 2023 · 2 comments
Assignees
Labels
bug Something isn't working documentation Additional documentation requested

Comments

@ClaasRostock
Copy link

In class SyntheticFunction, the DocString of method _f() does not seem to be correct. It was apparently copied from method f().
However, while f() works on an input matrix and returns a vector, _f() works on a single observation, i.e. vector, and returns a float.

Proposal:
def _f(self, X: np.ndarray) -> float:
...
Args:
X (numpy.ndarray): 1-dimensional input vector with d elements, where d is the dimensionality of the inputs.
Returns:
float: the function value

@ClaasRostock
Copy link
Author

further observation: _f() is declared as class method, but has 'self' as first parameter. I suspect the @classmethod decorator is wrong and should be removed, unless _f() is really used somewhere as class method.

@lena-kashtelyan lena-kashtelyan added bug Something isn't working documentation Additional documentation requested labels Jul 25, 2023
esantorella added a commit to esantorella/Ax that referenced this issue Apr 6, 2024
Summary:
- Fix docstring in Ax SyntheticFunction._f and address some Pyre issues. This was raised in facebook#1545 , which is pretty clear
- Add some type annotations
- Add override for safety in refactoring

Differential Revision: D55821434
@esantorella esantorella self-assigned this Apr 6, 2024
@esantorella
Copy link
Contributor

Closed by #2329 .

facebook-github-bot pushed a commit that referenced this issue Apr 6, 2024
Summary:
Pull Request resolved: #2329

- Fix docstring in Ax SyntheticFunction._f and address some Pyre issues. This was raised in #1545 , which is pretty clear
- Add some type annotations
- Add override for safety in refactoring

Reviewed By: Balandat

Differential Revision: D55821434

fbshipit-source-id: ebe7650181d5a6adc4b3e5b566e2f4861499548c
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working documentation Additional documentation requested
Projects
None yet
Development

No branches or pull requests

4 participants