8000 Minor edits by copybara-service[bot] · Pull Request #1000 · google/vizier · GitHub
[go: up one dir, main page]

Skip to content
8000
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions vizier/pyvizier/converters/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1203,7 +1203,9 @@ def from_study_configs(
)

@classmethod
def from_study_config(cls, study_config: pyvizier.ProblemStatement):
def from_study_config(
cls, study_config: pyvizier.ProblemStatement
) -> 'DefaultTrialConverter':
return cls.from_study_configs(
[study_config],
study_config.metric_information,
Expand Down Expand Up @@ -1234,7 +1236,7 @@ def to_features(self, trials) -> np.ndarray:
return dict_to_array(self._impl.to_features(trials))

def to_labels(self, trials) -> np.ndarray:
"""Returns the labels array with dimenion: (n_trials, n_metrics)."""
"""Returns the labels array with dimension: (n_trials, n_metrics)."""
# Pad up the labels.
return dict_to_array(self._impl.to_labels(trials))

Expand All @@ -1243,7 +1245,7 @@ def to_xy(self, trials) -> Tuple[np.ndarray, np.ndarray]:

def to_parameters(self, arr: np.ndarray) -> Sequence[pyvizier.ParameterDict]:
"""Convert to nearest feasible parameter value. NaNs are preserved."""
# TODO: Add a boolean flag to diable automatic clipping.
# TODO: Add a boolean flag to disable automatic clipping.
arrformat = DictOf2DArrays(self._impl.to_features([]))
return self._impl.to_parameters(arrformat.dict_like(arr))

Expand Down
0