(self, bind_conf)
with tempfile.TemporaryDirectory() as job_dir:
            submit_path = os.path.join(job_dir, "job_runtime_conf.json")
            with open(submit_path, "w") as fout:
                fout.write(json.dumps(bind_conf))
        result = self.client.model.bind(submit_path)
with tempfile.TemporaryDirectory() as job_dir:
            submit_path = os.path.join(job_dir, "job_runtime_conf.json")
            with open(submit_path, "w") as fout:
                fout.write(json.dumps(bind_conf))
        result = self.client.model.bind(submit_path)
with tempfile . TemporaryDirectory () as job_dir : submit_path = os . path . join ( job_dir job_runtime_conf . json ) with open ( submit_path w ) as fout : fout . write ( json . dumps ( bind_conf )) result = self . client . model . bind ( submit_path )
def bind_model(self, bind_conf):
        """
        with tempfile.TemporaryDirectory() as job_dir:
            submit_path = os.path.join(job_dir, "job_runtime_conf.json")
            with open(submit_path, "w") as fout:
                fout.write(json.dumps(bind_conf))
        result = self.client.model.bind(submit_path)
        """
        result = self.client.model.bind(bind_conf)
        if result is None or 'retcode' not in result:
            raise ValueError("Call flow bind failed, check if fate_flow server is up!")
        elif result["retcode"] != 0:
            raise ValueError("Cannot bind model, error msg is {}".format(result["retmsg"]))
        else:
            return result["retmsg"]
def bind_model ( self , bind_conf ) : result = self . client . model . bind ( bind_conf ) if result is None or 'retcode' not in result : raise ValueError ( "Call flow bind failed, check if fate_flow server is up!" ) elif result [ "retcode" ] != 0 : raise ValueError ( "Cannot bind model, error msg is {}" . format ( result [ "retmsg" ] ) ) else : return result [ "retmsg" ]