merlin.systems.dag.ops.implicit.PredictImplicit#

class merlin.systems.dag.ops.implicit.PredictImplicit(model, num_to_recommend: int = 10, **kwargs)[source]#

Bases: Operator

Operator for running inference on Implicit models..

__init__(model, num_to_recommend: int = 10, **kwargs)[source]#

Instantiate an Implicit prediction operator.

Parameters:
  • model (An Implicit Model instance) –

  • num_to_recommend (int) – the number of items to return

Methods

__init__(model[, num_to_recommend])

Instantiate an Implicit prediction operator.

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, ...)

Return the input schema representing the input columns this operator expects to use.

compute_output_schema(input_schema, col_selector)

Return the output schema representing the columns this operator returns.

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)

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)

transform(col_selector, transformable)

Transform the dataframe by applying this operator to the set of input columns.

validate_schemas(parents_schema, ...[, ...])

Provides a hook method that sub-classes can override to implement schema validation logic.

Attributes

dependencies

Defines an optional list of column dependencies for this operator.

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

load_artifacts(artifact_path: str)[source]#
save_artifacts(artifact_path: str)[source]#
compute_input_schema(root_schema: Schema, parents_schema: Schema, deps_schema: Schema, selector: ColumnSelector) Schema[source]#

Return the input schema representing the input columns this operator expects to use.

compute_output_schema(input_schema: Schema, col_selector: ColumnSelector, prev_output_schema: Optional[Schema] = None) Schema[source]#

Return the output schema representing the columns this operator returns.

transform(col_selector: ColumnSelector, transformable: Transformable) Transformable[source]#

Transform the dataframe by applying this operator to the set of input columns.

Parameters:

df (TensorTable) – A pandas or cudf dataframe that this operator will work on

Returns:

Returns a transformed dataframe for this operator

Return type:

TensorTable