thoth.adviser.wraps package

Submodules

thoth.adviser.wraps.no_onservation module

A wrap that notifies about missing observations.

class thoth.adviser.wraps.no_onservation.NoObservationWrap(*, configuration: Dict[str, Any] = NOTHING, name: str = None)[source]

Bases: thoth.adviser.wrap.Wrap

A wrap that notifies about missing observations.

run(state: thoth.adviser.state.State) → None[source]

Check for no observations made on the given state.

classmethod should_include(builder_context: PipelineBuilderContext) → Optional[Dict[Any, Any]][source]

Include this wrap in adviser, once.

Module contents

Wrap units implemented in adviser.

class thoth.adviser.wraps.NoObservationWrap(*, configuration: Dict[str, Any] = NOTHING, name: str = None)[source]

Bases: thoth.adviser.wrap.Wrap

A wrap that notifies about missing observations.

run(state: thoth.adviser.state.State) → None[source]

Check for no observations made on the given state.

classmethod should_include(builder_context: PipelineBuilderContext) → Optional[Dict[Any, Any]][source]

Include this wrap in adviser, once.

class thoth.adviser.wraps.NoSemanticInterpositionWrap(*, configuration: Dict[str, Any] = NOTHING, name: str = None)[source]

Bases: thoth.adviser.wrap.Wrap

A wrap that recommends to switch to Python 3.8 on RHEL 8.2.

https://developers.redhat.com/blog/2020/06/25/red-hat-enterprise-linux-8-2-brings-faster-python-3-8-run-speeds/

run(state: thoth.adviser.state.State) → None[source]

Recommend using Python3.8 on RHEL/UBI 8.2.

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

Include this wrap in adviser for RHEL/UBI 8.2.

class thoth.adviser.wraps.TensorFlow23DictSummary(*, configuration: Dict[str, Any] = NOTHING, name: str = None)[source]

Bases: thoth.adviser.wrap.Wrap

A wrap that notifies a bug in summary output spotted on TensorFlow 2.3.

https://github.com/tensorflow/tensorflow/issues/42679

run(state: thoth.adviser.state.State) → None[source]

Notify about a bug in summary output spotted on TensorFlow 2.3.

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

Include this wrap in adviser.

class thoth.adviser.wraps.TensorFlow23Accuracy(*, configuration: Dict[str, Any] = NOTHING, name: str = None)[source]

Bases: thoth.adviser.wrap.Wrap

A wrap that notifies about accuracy bug on safe()/load_model() calls.

https://github.com/tensorflow/tensorflow/issues/42045 https://github.com/keras-team/keras/issues/14181 https://github.com/tensorflow/tensorflow/commit/5adacc88077ef82f6c4a7f9bb65f9ed89f9d8947

run(state: thoth.adviser.state.State) → None[source]

Notify about accuracy bug in safe()/load_model() calls.

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

Include this wrap in adviser.

class thoth.adviser.wraps.IntelTensorFlowWrap(*, configuration: Dict[str, Any] = NOTHING, name: str = None)[source]

Bases: thoth.adviser.wrap.Wrap

A wrap that recommends using Intel TensorFlow if TensorFlow is in resolved dependencies.

https://software.intel.com/content/www/us/en/develop/articles/intel-optimization-for-tensorflow-installation-guide.html#pip_wheels

run(state: thoth.adviser.state.State) → None[source]

Recommend using intel-tensorflow if tensorflow is resolved.

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

Include this wrap for x86_64 architecture on CPU models with Ivy/Sandy bridge.

class thoth.adviser.wraps.MKLThreadsWrap(*, configuration: Dict[str, Any] = NOTHING, name: str = None)[source]

Bases: thoth.adviser.wrap.Wrap

A wrap that notifies about Intel’s MKL thread configuration for containerized deployments.

https://software.intel.com/en-us/mkl-linux-developer-guide-setting-the-number-of-openmp-threads

run(state: thoth.adviser.state.State) → None[source]

Check for libraries using PyTorch.

classmethod should_include(builder_context: PipelineBuilderContext) → Optional[Dict[Any, Any]][source]

Include this wrap in adviser, once.