Skip to content

Commit 81244dc

Browse files
committed
Initialize the lazy fields of ChunkData explicitly
1 parent 132bbcc commit 81244dc

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

mars/services/task/analyzer/analyzer.py

+3-7
Original file line numberDiff line numberDiff line change
@@ -287,13 +287,9 @@ def _gen_subtask_info(
287287
inp_chunks[i] = fetch_chunk
288288
for out_chunk in chunk.op.outputs:
289289
# Note: `dtypes`, `index_value`, and `columns_value` are lazily
290-
# initialized, so we should initialize them here.
291-
if hasattr(out_chunk, "dtypes"):
292-
out_chunk.dtypes
293-
if hasattr(out_chunk, "index_value"):
294-
out_chunk.index_value
295-
if hasattr(out_chunk, "columns_value"):
296-
out_chunk.columns_value
290+
# initialized, so we should call property `params` to initialize
291+
# these fields.
292+
out_chunk.params
297293
processed.add(out_chunk)
298294
chunk_graph.add_node(out_chunk)
299295
if out_chunk in self._final_result_chunks_set:

0 commit comments

Comments
 (0)