thoth.adviser.sieves.tensorflow package

Submodules

thoth.adviser.sieves.tensorflow.tf_240_avx2 module

A sieve that filters out TensorFlow==2.4.0 build as it requires AVX2 instruction set.

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

Bases: thoth.adviser.sieve.Sieve

A sieve that filters out TensorFlow==2.4.0 build as it requires AVX2 instruction set.

See:
AVX2_CPUS = frozenset({(6, 5), (6, 6), (6, 10), (6, 12), (6, 13), (6, 14), (6, 15)})
CONFIGURATION_DEFAULT = {'package_name': 'tensorflow'}
run(package_versions: Generator[thoth.python.package_version.PackageVersion, None, None]) → Generator[thoth.python.package_version.PackageVersion, None, None][source]

Recommend not to use TensorFlow==2.4.0 on non-AVX2 enabled CPU processors.

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

Register this pipeline unit for adviser and stable/testing recommendation types.

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 = {'package_name': 'tensorflow'}
CONFIGURATION_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.TensorFlow240AVX2IllegalInstructionSieve(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]

Bases: thoth.adviser.sieve.Sieve

A sieve that filters out TensorFlow==2.4.0 build as it requires AVX2 instruction set.

See:
AVX2_CPUS = frozenset({(6, 5), (6, 6), (6, 10), (6, 12), (6, 13), (6, 14), (6, 15)})
CONFIGURATION_DEFAULT = {'package_name': 'tensorflow'}
run(package_versions: Generator[thoth.python.package_version.PackageVersion, None, None]) → Generator[thoth.python.package_version.PackageVersion, None, None][source]

Recommend not to use TensorFlow==2.4.0 on non-AVX2 enabled CPU processors.

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

Register this pipeline unit for adviser and stable/testing recommendation types.

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 = {'package_name': 'tensorflow'}
CONFIGURATION_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.