-
Notifications
You must be signed in to change notification settings - Fork 124
Closed
Description
Bug description
I get the following error from the 02-Deploying-multi-stage-RecSys-with-Merlin-Systems.ipynb notebook, when I execute the ensemble = Ensemble(ordering, request_schema) command.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Input In [20], in <cell line: 4>()
1 # define the path where all the models and config files exported to
2 export_path = os.path.join(BASE_DIR + 'poc_ensemble')
----> 4 ensemble = Ensemble(ordering, request_schema)
5 ens_config, node_configs = ensemble.export(export_path)
File /usr/local/lib/python3.8/dist-packages/merlin/systems/dag/ensemble.py:51, in Ensemble.__init__(self, ops, schema, name, label_columns)
37 """_summary_
38
39 Parameters
(...)
48 List of strings representing label columns, by default None
49 """
50 self.graph = Graph(ops)
---> 51 self.graph.construct_schema(schema)
52 self.name = name
53 self.label_columns = label_columns or []
File /usr/local/lib/python3.8/dist-packages/merlin/dag/graph.py:73, in Graph.construct_schema(self, root_schema, preserve_dtypes)
70 def construct_schema(self, root_schema: Schema, preserve_dtypes=False) -> "Graph":
71 nodes = list(postorder_iter_nodes(self.output_node))
---> 73 self._compute_node_schemas(root_schema, nodes, preserve_dtypes)
74 self._validate_node_schemas(root_schema, nodes, preserve_dtypes)
76 return self
File /usr/local/lib/python3.8/dist-packages/merlin/dag/graph.py:80, in Graph._compute_node_schemas(self, root_schema, nodes, preserve_dtypes)
78 def _compute_node_schemas(self, root_schema, nodes, preserve_dtypes=False):
79 for node in nodes:
---> 80 node.compute_schemas(root_schema, preserve_dtypes=preserve_dtypes)
File /usr/local/lib/python3.8/dist-packages/merlin/dag/node.py:188, in Node.compute_schemas(self, root_schema, preserve_dtypes)
183 self.selector = self.op.compute_selector(
184 self.input_schema, self.selector, parents_selector, dependencies_selector
185 )
187 prev_output_schema = self.output_schema if preserve_dtypes else None
--> 188 self.output_schema = self.op.compute_output_schema(
189 self.input_schema, self.selector, prev_output_schema
190 )
File /usr/local/lib/python3.8/dist-packages/merlin/systems/dag/ops/softmax_sampling.py:106, in SoftmaxSampling.compute_output_schema(self, input_schema, col_selector, prev_output_schema)
88 def compute_output_schema(
89 self, input_schema: Schema, col_selector: ColumnSelector, prev_output_schema: Schema = None
90 ) -> Schema:
91 """
92 Describes the operator's outputs, which are computed from the input schema.
93
(...)
103 Not used.
104 """
105 col_schemas = sorted(
--> 106 [
107 schema
108 for name, schema in input_schema.column_schemas.items()
109 if name in col_selector.names
110 ],
111 key=lambda cs: cs.name,
112 )
113 return Schema(col_schemas)
File /usr/local/lib/python3.8/dist-packages/merlin/systems/dag/ops/softmax_sampling.py:109, in <listcomp>(.0)
88 def compute_output_schema(
89 self, input_schema: Schema, col_selector: ColumnSelector, prev_output_schema: Schema = None
90 ) -> Schema:
91 """
92 Describes the operator's outputs, which are computed from the input schema.
93
(...)
103 Not used.
104 """
105 col_schemas = sorted(
106 [
107 schema
108 for name, schema in input_schema.column_schemas.items()
--> 109 if name in col_selector.names
110 ],
111 key=lambda cs: cs.name,
112 )
113 return Schema(col_schemas)
AttributeError: 'NoneType' object has no attribute 'names'
Environment details
- Merlin version:
- Platform:
- Python version:
- PyTorch version (GPU?):
- Tensorflow version (GPU?):
merlin-tensorflow:22.07 the latest main branches are pulled.