MCPcopy Index your code
hub / github.com/pytorch/pytorch / to_task

Method to_task

caffe2/python/task.py:337–342  ·  view source on GitHub ↗
(self, node=None)

Source from the content-addressed store, hash-verified

335 return grouped_by_node
336
337 def to_task(self, node=None):
338 node = str(Node.current(node))
339 tasks = self.tasks_by_node(lambda x: node).tasks()
340 if len(tasks) == 0:
341 return Task()
342 return tasks[0]
343
344 def workspace_type(self):
345 return self._workspace_type

Callers 2

build_cache_stepMethod · 0.80
_compile_task_groupMethod · 0.80

Calls 4

tasks_by_nodeMethod · 0.95
currentMethod · 0.80
tasksMethod · 0.80
TaskClass · 0.70

Tested by

no test coverage detected