Skip to content

Commit

Permalink
Initialize the lazy fields of ChunkData explicitly
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongchun committed Apr 25, 2023
1 parent 132bbcc commit 81244dc
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions mars/services/task/analyzer/analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,13 +287,9 @@ def _gen_subtask_info(
inp_chunks[i] = fetch_chunk
for out_chunk in chunk.op.outputs:
# Note: `dtypes`, `index_value`, and `columns_value` are lazily
# initialized, so we should initialize them here.
if hasattr(out_chunk, "dtypes"):
out_chunk.dtypes
if hasattr(out_chunk, "index_value"):
out_chunk.index_value
if hasattr(out_chunk, "columns_value"):
out_chunk.columns_value
# initialized, so we should call property `params` to initialize
# these fields.
out_chunk.params
processed.add(out_chunk)
chunk_graph.add_node(out_chunk)
if out_chunk in self._final_result_chunks_set:
Expand Down

0 comments on commit 81244dc

Please sign in to comment.