def _get_job_conf(self, job_name): if job_name in self.job_name2job_conf_: return self.job_name2job_conf_[job_name] else: job_conf = job_conf_proto_cfg.JobConfigProto() job_conf.set_job_name(job_name) job_conf.mutable_predict_conf() self.job_name2job_conf_[job_name] = job_conf return job_conf
def __init__(self, job_func=None, job_config_proto=None, function_attribute=None): if job_config_proto is None: job_config_proto = job_conf_cfg.JobConfigProto() if function_attribute is None: function_attribute = FunctionAttribute() self.job_func = job_func self.job_config_proto = job_config_proto self.job_config_proto.mutable_predict_conf() self.function_attribute = function_attribute
def InitScopeStack(): job_conf = job_conf_cfg.JobConfigProto() job_conf.mutable_predict_conf() job_conf.set_job_name("") scope = MakeInitialScope(job_conf, "cpu", ["0:0"], None, is_mirrored=False) oneflow._oneflow_internal.InitGlobalScopeStack(scope)
def __init__(self): super().__init__() self._outputs_buffer_size = 2 self.proto = job_conf_cfg.JobConfigProto() self._train(False)