thoth.adviser.sieves.tensorflow package

Submodules

thoth.adviser.sieves.tensorflow.tf_api module

Recommend a specific TensorFlow based on API usage.

class thoth.adviser.sieves.tensorflow.tf_api.TensorFlowAPISieve(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.sieve.Sieve

A sieve that makes sure the right TensorFlow release is used based on user’s API usage.

CONFIGURATION_DEFAULT: Dict[str, Any] = {'package_name': 'tensorflow'}
CONFIGURATION_SCHEMA: voluptuous.schema_builder.Schema = <Schema({'package_name': Any(<class 'str'>, msg=None)}, extra=PREVENT_EXTRA, required=False) object>
pre_run() None[source]

Initialize this pipeline unit before each run.

run(package_versions: Generator[thoth.python.package_version.PackageVersion, None, None]) Generator[thoth.python.package_version.PackageVersion, None, None][source]

Use specific TensorFlow release based on library usage as supplied by the user.

classmethod should_include(builder_context: PipelineBuilderContext) Generator[Dict[str, Any], None, None][source]

Register this pipeline unit for adviser library usage is provided.

Module contents

Implementation of sieves used, specific for TensorFlow.

class thoth.adviser.sieves.tensorflow.TensorFlowAPISieve(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.sieve.Sieve

A sieve that makes sure the right TensorFlow release is used based on user’s API usage.

CONFIGURATION_DEFAULT: Dict[str, Any] = {'package_name': 'tensorflow'}
CONFIGURATION_SCHEMA: voluptuous.schema_builder.Schema = <Schema({'package_name': Any(<class 'str'>, msg=None)}, extra=PREVENT_EXTRA, required=False) object>
pre_run() None[source]

Initialize this pipeline unit before each run.

run(package_versions: Generator[thoth.python.package_version.PackageVersion, None, None]) Generator[thoth.python.package_version.PackageVersion, None, None][source]

Use specific TensorFlow release based on library usage as supplied by the user.

classmethod should_include(builder_context: PipelineBuilderContext) Generator[Dict[str, Any], None, None][source]

Register this pipeline unit for adviser library usage is provided.