track more task info (#133)

This commit is contained in:
Robert Nishihara
2016-06-21 10:59:32 -07:00
committed by Philipp Moritz
parent 170a2ee8b1
commit d5fe49584a
6 changed files with 71 additions and 16 deletions
+2
View File
@@ -13,6 +13,8 @@ OperationId ComputationGraph::add_operation(std::unique_ptr<Operation> operation
}
const Task& ComputationGraph::get_task(OperationId operationid) {
RAY_CHECK_NEQ(operationid, ROOT_OPERATION, "ComputationGraph attempting to get_task with operationid == ROOT_OPERATION");
RAY_CHECK_NEQ(operationid, NO_OPERATION, "ComputationGraph attempting to get_task with operationid == NO_OPERATION");
RAY_CHECK_LT(operationid, operations_.size(), "ComputationGraph attempting to get_task with operationid " << operationid << ", but operationid >= operations_.size().");
RAY_CHECK(operations_[operationid]->has_task(), "Calling get_task with operationid " << operationid << ", but this corresponds to a push not a task.");
return operations_[operationid]->task();