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

Method run

caffe2/python/session.py:133–147  ·  view source on GitHub ↗

Run the given runnable. Args: runnable: Object recognized by the Session. Currently, we support TaskGroup, Task, Plan, ExecutionStep, and Net. workspace_type: A string defined in the WorkspaceType object. setup_net_list: A list of Net obje

(self, runnable, workspace_type=None, setup_net_list=None)

Source from the content-addressed store, hash-verified

131 return compiled
132
133 def run(self, runnable, workspace_type=None, setup_net_list=None):
134 """Run the given runnable.
135
136 Args:
137 runnable: Object recognized by the Session. Currently, we support
138 TaskGroup, Task, Plan, ExecutionStep, and Net.
139 workspace_type: A string defined in the WorkspaceType object.
140 setup_net_list: A list of Net objects or a list of NetDef protos.
141 So far this is only used by the DistributedSession, in which we
142 need to pass a list of special nets to setup the master.
143 """
144 assert self.is_open(), 'Session is closed.'
145 assert runnable is not None, 'Got a none runnable.'
146 self._run_compiled(self.compile(runnable, workspace_type,
147 setup_net_list).obj)
148
149 def close(self):
150 if self.is_open():

Callers 1

_run_compiledMethod · 0.45

Calls 3

is_openMethod · 0.95
_run_compiledMethod · 0.95
compileMethod · 0.95

Tested by

no test coverage detected