You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
The text was updated successfully, but these errors were encountered:
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.
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
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
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
The text was updated successfully, but these errors were encountered: