cf_engine

Module Contents

Classes Summary

CFClient

Custom CFClient API to match Dask’s CFClient and allow context management.

CFComputation

A Future-like wrapper around jobs created by the CFEngine.

CFEngine

The concurrent.futures (CF) engine

Contents

class evalml.automl.engine.cf_engine.CFClient(pool)[source]

Custom CFClient API to match Dask’s CFClient and allow context management.

Methods

submit

Pass through to imitate Dask’s Client API.

submit(self, *args, **kwargs)[source]

Pass through to imitate Dask’s Client API.

class evalml.automl.engine.cf_engine.CFComputation(future)[source]

A Future-like wrapper around jobs created by the CFEngine.

Methods

cancel

Cancel the current computation.

done

returns

Whether the computation is done.

get_result

Gets the computation result.

is_cancelled

returns

Returns whether computation was cancelled.

cancel(self)[source]

Cancel the current computation.

Returns

False if the call is currently being executed or finished running

and cannot be cancelled. True if the call can be canceled.

Return type

bool

done(self)[source]
Returns

Whether the computation is done.

Return type

bool

get_result(self)[source]

Gets the computation result. Will block until the computation is finished.

Raises
  • Exception – If computation fails. Returns traceback.

  • cf.TimeoutError – If computation takes longer than default timeout time.

  • cf.CancelledError – If computation was canceled before completing.

Returns

The result of the requested job.

property is_cancelled(self)
Returns

Returns whether computation was cancelled.

Return type

bool

class evalml.automl.engine.cf_engine.CFEngine(client)[source]

The concurrent.futures (CF) engine

Methods

setup_job_log

submit_evaluation_job

Send evaluation job to cluster.

submit_scoring_job

Send scoring job to cluster.

submit_training_job

Send training job to cluster.

static setup_job_log()
submit_evaluation_job(self, automl_config, pipeline, X, y)evalml.automl.engine.engine_base.EngineComputation[source]

Send evaluation job to cluster.

Parameters
  • automl_config – structure containing data passed from AutoMLSearch instance

  • pipeline (pipeline.PipelineBase) – pipeline to evaluate

  • X (pd.DataFrame) – input data for modeling

  • y (pd.Series) – target data for modeling

Returns

an object wrapping a reference to a future-like computation

occurring in the resource pool

Return type

CFComputation

submit_scoring_job(self, automl_config, pipeline, X, y, objectives)evalml.automl.engine.engine_base.EngineComputation[source]

Send scoring job to cluster.

Parameters
  • automl_config – structure containing data passed from AutoMLSearch instance

  • pipeline (pipeline.PipelineBase) – pipeline to train

  • X (pd.DataFrame) – input data for modeling

  • y (pd.Series) – target data for modeling

Returns

a object wrapping a reference to a future-like computation

occurring in the resource pool

Return type

CFComputation

submit_training_job(self, automl_config, pipeline, X, y)evalml.automl.engine.engine_base.EngineComputation[source]

Send training job to cluster.

Parameters
  • automl_config – structure containing data passed from AutoMLSearch instance

  • pipeline (pipeline.PipelineBase) – pipeline to train

  • X (pd.DataFrame) – input data for modeling

  • y (pd.Series) – target data for modeling

Returns

an object wrapping a reference to a future-like computation

occurring in the resource pool

Return type

CFComputation