ClientState class

Definition

Tracks the history of a client's optimization loop.

ClientState(metric, task)
Inheritance
builtins.object
ClientState

Methods

actual_times()

Return a list of actual times.

all_predicted_metrics()

Return a list of all predicted metircs.

all_scores(reduced=False)

Return a list of all scores.

from_dict(d)

Create a client state object from a dictionary.

get_best_pipeline_index()

Return the best pipeline index.

get_cost_stats()

Return the cost statistics used to evaluate performance of the cost model.

iteration_configs()

Return a list of iteration configurations.

iteration_infos()

Return a list of iteration information objects.

optimization_scores(clip=True, filter_training_percent=None, filter_timeout=None)

Return a list of scores for the metric being optimized.

pipeline_hashes()

Return a list of pipeline hashes.

pipeline_training_percents()

Return a list of pipeline training percents.

predicted_times()

Return a list of predicted times.

time_constraints()

Return a list of time constraints.

to_dict()

Create a dictionary from a ClientState.

training_times()

Return a tuple of (predicted times, actual times).

update(pid, score, predicted_time, actual_time, predicted_metrics=None, training_percent=100, time_constraint=None)

Add a new pipeline result.

actual_times()

Return a list of actual times.

actual_times()

all_predicted_metrics()

Return a list of all predicted metircs.

all_predicted_metrics()

all_scores(reduced=False)

Return a list of all scores.

all_scores(reduced=False)

Parameters

reduced
default value: False

from_dict(d)

Create a client state object from a dictionary.

from_dict(d)

Parameters

d

The dictionary to use.

Returns

A client state object.

get_best_pipeline_index()

Return the best pipeline index.

get_best_pipeline_index()

get_cost_stats()

Return the cost statistics used to evaluate performance of the cost model.

get_cost_stats()

iteration_configs()

Return a list of iteration configurations.

iteration_configs()

iteration_infos()

Return a list of iteration information objects.

iteration_infos()

optimization_scores(clip=True, filter_training_percent=None, filter_timeout=None)

Return a list of scores for the metric being optimized.

optimization_scores(clip=True, filter_training_percent=None, filter_timeout=None)

Parameters

clip
default value: True
filter_training_percent
default value: None
filter_timeout
default value: None

pipeline_hashes()

Return a list of pipeline hashes.

pipeline_hashes()

pipeline_training_percents()

Return a list of pipeline training percents.

pipeline_training_percents()

predicted_times()

Return a list of predicted times.

predicted_times()

time_constraints()

Return a list of time constraints.

time_constraints()

to_dict()

Create a dictionary from a ClientState.

to_dict()

training_times()

Return a tuple of (predicted times, actual times).

training_times()

update(pid, score, predicted_time, actual_time, predicted_metrics=None, training_percent=100, time_constraint=None)

Add a new pipeline result.

update(pid, score, predicted_time, actual_time, predicted_metrics=None, training_percent=100, time_constraint=None)

Parameters

pid

Pipeline id (hash).

score

A dict of results from validation set.

predicted_time

The pipeline training time predicted by the server.

actual_time

The actual pipeline training time.

predicted_metrics
default value: None

A dict of string to flow representing the predicted metrics for the pipeline

training_percent
default value: 100

The training percent that was used.

time_constraint
default value: None

The time_constraint for this iteration.