thoth.adviser.strides package¶
Submodules¶
thoth.adviser.strides.one_version module¶
Filter out software stacks allowing the pipeline to produce just one software stack with specific package.
This stride will allow the pipeline to produce a stack with only a specific package-version just once - e.g. if two or more software stacks could be resolved with tensorflow==2.0.0, this stride will allow the pipeline to produce just one software stack with tensorflow==2.0.0, other software stacks will be filtered out.
- class thoth.adviser.strides.one_version.OneVersionStride(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]¶
Bases:
thoth.adviser.stride.Stride
Filter out software stacks allowing the pipeline to produce just one software stack with specific package.
- CONFIGURATION_SCHEMA: voluptuous.schema_builder.Schema = <Schema({'package_name': <class 'str'>, 'only_once': <class 'bool'>}, extra=PREVENT_EXTRA, required=False) object>¶
- run(state: thoth.adviser.state.State) None [source]¶
Filter out software stacks, allow only a package with specific version being produced just once.
- classmethod should_include(builder_context: PipelineBuilderContext) Generator[Dict[str, Any], None, None] [source]¶
Include this pipeline unit only if user asks for it explicitly.
- version_seen¶
thoth.adviser.strides.random_decision module¶
Filter out states randomly.
- class thoth.adviser.strides.random_decision.RandomDecisionStride(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]¶
Bases:
thoth.adviser.stride.Stride
Filter out states randomly.
- run(state: thoth.adviser.state.State) None [source]¶
Flip a coin and decide - tails are not acceptable.
thoth.adviser.strides.unique_stack module¶
Filter out software stacks that were already resolved.
This pipeline unit is especially useful for dependency monkey runs when no duplicate software stacks should be resolved.
- class thoth.adviser.strides.unique_stack.UniqueStackStride(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]¶
Bases:
thoth.adviser.stride.Stride
Filter out software stacks that were already resolved.
As dependency graphs can share nodes, it might happen that the same software stack can be resolved multiple times considering different resolution paths.
- run(state: thoth.adviser.state.State) None [source]¶
Filter out software stacks that were already resolved.
- classmethod should_include(builder_context: PipelineBuilderContext) Generator[Dict[str, Any], None, None] [source]¶
Include this pipeline unit only if user asks for it explicitly.
- stacks_seen¶
Module contents¶
Implementation of strides used to filter out resolved stacks.
- class thoth.adviser.strides.OneVersionStride(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]¶
Bases:
thoth.adviser.stride.Stride
Filter out software stacks allowing the pipeline to produce just one software stack with specific package.
- CONFIGURATION_SCHEMA: voluptuous.schema_builder.Schema = <Schema({'package_name': <class 'str'>, 'only_once': <class 'bool'>}, extra=PREVENT_EXTRA, required=False) object>¶
- run(state: thoth.adviser.state.State) None [source]¶
Filter out software stacks, allow only a package with specific version being produced just once.
- classmethod should_include(builder_context: PipelineBuilderContext) Generator[Dict[str, Any], None, None] [source]¶
Include this pipeline unit only if user asks for it explicitly.
- version_seen¶
- class thoth.adviser.strides.RandomDecisionStride(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]¶
Bases:
thoth.adviser.stride.Stride
Filter out states randomly.
- run(state: thoth.adviser.state.State) None [source]¶
Flip a coin and decide - tails are not acceptable.
- class thoth.adviser.strides.UniqueStackStride(*, unit_run: bool = False, configuration: Dict[str, Any] = NOTHING)[source]¶
Bases:
thoth.adviser.stride.Stride
Filter out software stacks that were already resolved.
As dependency graphs can share nodes, it might happen that the same software stack can be resolved multiple times considering different resolution paths.
- run(state: thoth.adviser.state.State) None [source]¶
Filter out software stacks that were already resolved.
- classmethod should_include(builder_context: PipelineBuilderContext) Generator[Dict[str, Any], None, None] [source]¶
Include this pipeline unit only if user asks for it explicitly.
- stacks_seen¶