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)
| 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(): |
no test coverage detected