mirror of
https://github.com/wassname/ray.git
synced 2026-07-19 11:27:32 +08:00
Write computation graph to file
This commit is contained in:
@@ -19,3 +19,9 @@ const Task& ComputationGraph::get_task(OperationId operationid) {
|
||||
RAY_CHECK(operations_[operationid]->has_task(), "Calling get_task with operationid " << operationid << ", but this corresponds to a put not a task.");
|
||||
return operations_[operationid]->task();
|
||||
}
|
||||
|
||||
void ComputationGraph::to_protobuf(CompGraph* computation_graph) {
|
||||
for (OperationId id = 0; id < operations_.size(); ++id) {
|
||||
computation_graph->add_operation()->CopyFrom(*operations_[id]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user