You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently, the tensor can only be executed by the graph mode, we build a tensor graph, submit it to the cluster when users call the execute method.
Although the graph mode is born for performance, it's quite unfriendly for developing, and hard to debug. Thus, I suggest that we can provide an eager mode.
frommars.configimportoption_contextwithoption_context() asoptions:
options.eager_mode=True# the eager mode is on only for the with statement
Since every Tensor object is created by the new_tensors method defined in tensor/expressions/core.py, if the eager mode is on, we can trigger the submission graph there to make sure the tensor is executed eagerly.
Additional context
Maybe we can abstract a new_entities not only for the tensors, prepared for the coming dataframe module.
The text was updated successfully, but these errors were encountered:
Handle the executed tensor by replacing it with tensor whose op is Fetch. Handling logic for local, local cluster and distributed session may be different.(Replace executed tensor with fetch tensor #180)
Provide a base class for the TensorOperandMixin which has a new_tensors method, maybe we need to implement a new_entities for the base class, and call it inside the new_tensors. This is a preparation for the coming dataframe module. (DataFrame initial support #173)
If eager mode is on, make the new_tensor(maybe new_entity) trigger the execution when building expressions, we need to take care of the case cautiously, because new_tensor is also widely used in the tile, we need to make sure that the new_tensor in tilewould not trigger the execution.(Support eager mode #200)
cc @NJUPole if there is any additional suggestion.
Is your feature request related to a problem? Please describe.
Currently, the tensor can only be executed by the graph mode, we build a tensor graph, submit it to the cluster when users call the
execute
method.Although the graph mode is born for performance, it's quite unfriendly for developing, and hard to debug. Thus, I suggest that we can provide an eager mode.
Describe the solution you'd like
We can enable the eager mode by the option.
Enable the eager mode globally.
Or use a context.
Since every Tensor object is created by the
new_tensors
method defined in tensor/expressions/core.py, if the eager mode is on, we can trigger the submission graph there to make sure the tensor is executed eagerly.Additional context
Maybe we can abstract a
new_entities
not only for the tensors, prepared for the coming dataframe module.The text was updated successfully, but these errors were encountered: