merlin.systems.dag.ops.session_filter.FilterCandidates#
- class merlin.systems.dag.ops.session_filter.FilterCandidates(filter_out: str, input_col: Optional[str] = None)[source]#
Bases:
Operator
This operator takes the input column and filters out elements of that column based on the supplied criteria.
- __init__(filter_out: str, input_col: Optional[str] = None) FilterCandidates [source]#
_summary_
- Parameters:
- Returns:
A class object is instantiated with param values passed.
- Return type:
Methods
__init__
(filter_out[, input_col])_summary_
column_mapping
(col_selector)Compute which output columns depend on which input columns
compute_column_schema
(col_name, input_schema)compute_input_schema
(root_schema, ...)Compute the input schema of this node given the root, parents, and dependencies schemas of all ancestor nodes.
compute_output_schema
(input_schema, col_selector)Compute the input schema of this node given the root, parents and dependencies schemas of all ancestor nodes.
compute_selector
(input_schema, selector[, ...])Provides a hook method for sub-classes to override to implement custom column selection logic.
create_node
(selector)export
(path, input_schema, output_schema, ...)Export the class object as a config and all related files to the user defined path.
load_artifacts
([artifact_path])Load artifacts from disk required for operator function.
output_column_names
(col_selector)Given a set of columns names returns the names of the transformed columns this operator will produce
save_artifacts
([artifact_path])Save artifacts required to be reload operator state from disk
transform
(col_selector, transformable)Transform input dataframe to output dataframe using function logic.
validate_schemas
(parents_schema, ...[, ...])Attributes
dynamic_dtypes
export_name
Provides a clear common english identifier for this operator.
is_subgraph
label
output_dtype
output_properties
output_tags
supported_formats
supports
Returns what kind of data representation this operator supports
- property dependencies#
- compute_input_schema(root_schema: Schema, parents_schema: Schema, deps_schema: Schema, selector: ColumnSelector) Schema [source]#
Compute the input schema of this node given the root, parents, and dependencies schemas of all ancestor nodes.
- Parameters:
root_schema (Schema) – The schema representing the input columns to the graph
parents_schema (Schema) – A schema representing all the output columns of the ancestors of this node.
deps_schema (Schema) – A schema representing the dependencies of this node.
selector (ColumnSelector) – A column selector representing a target subset of columns necessary for this node’s operator
- Returns:
A schema that has the correct representation of all the incoming columns necessary for this node’s operator to complete its transform.
- Return type:
Schema
- Raises:
ValueError – Cannot receive more than one input for this node
- compute_output_schema(input_schema: Schema, col_selector: ColumnSelector, prev_output_schema: Optional[Schema] = None) Schema [source]#
Compute the input schema of this node given the root, parents and dependencies schemas of all ancestor nodes.
- Parameters:
input_schema (Schema) – The schema representing the input columns to the graph
col_selector (ColumnSelector) – A column selector representing a target subset of columns necessary for this node’s operator
prev_output_schema (Schema) – A schema representing the output of the previous node.
- Returns:
A schema object representing all outputs of this node.
- Return type:
Schema
- validate_schemas(parents_schema, deps_schema, input_schema, output_schema, strict_dtypes=False)[source]#
- transform(col_selector: ColumnSelector, transformable: Transformable) Transformable [source]#
Transform input dataframe to output dataframe using function logic.
- Parameters:
df (TensorTable) – Input tensor dictionary, data that will be manipulated
- Returns:
Transformed tensor dictionary
- Return type:
TensorTable