function.remote.objective_remote
function.remote.objective_remote(X, url=DEFAULT_SERVER_URL, **kwargs)
Evaluates an objective function remotely via an HTTP POST request.
Parameters
| X |
np.ndarray |
Input data of shape (n_samples, n_features). |
required |
| url |
str |
The URL of the remote computation server. Defaults to “http://139.6.66.164:8000/compute/”. |
DEFAULT_SERVER_URL |
| **kwargs |
Any |
Additional arguments to include in the request payload (optional). |
{} |
Returns
|
np.ndarray |
np.ndarray: The computed objective values of shape (n_samples,). |
Raises
|
requests.exceptions.RequestException |
If the remote request fails. |
Examples
>>> import numpy as np
>>> from spotoptim.function.remote import objective_remote
>>> X = np.array([[1, 2], [3, 4]])
>>> y = objective_remote(X)
>>> print(y)