(self, submit_conf=None, drop=0)
return job_id, data
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(submit_conf))

            result = self.client.data.upload(conf_path=submit_path, verbose=1, drop=drop)
            try:
                if 'retcode' not in result or result["retcode"] != 0:
                    raise ValueError

                if "jobId" not in result:
                    raise ValueError

                job_id = result["jobId"]
                data = result["data"]
            except:
                raise ValueError("job submit failed, err msg: {}".format(result))
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(submit_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 ( submit_conf ))
def upload_data(self, submit_conf=None, drop=0):
        """
        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(submit_conf))

            result = self.client.data.upload(conf_path=submit_path, verbose=1, drop=drop)
            try:
                if 'retcode' not in result or result["retcode"] != 0:
                    raise ValueError

                if "jobId" not in result:
                    raise ValueError

                job_id = result["jobId"]
                data = result["data"]
            except:
                raise ValueError("job submit failed, err msg: {}".format(result))
        """
        result = self.client.data.upload(config_data=submit_conf, verbose=1, drop=drop)
        try:
            if 'retcode' not in result or result["retcode"] != 0:
                raise ValueError

            if "jobId" not in result:
                raise ValueError

            job_id = result["jobId"]
            data = result["data"]
        except:
            raise ValueError("job submit failed, err msg: {}".format(result))
        return job_id, data
def upload_data ( self , submit_conf = None , drop = 0 ) : result = self . client . data . upload ( config_data = submit_conf , verbose = 1 , drop = drop ) try : if 'retcode' not in result or result [ "retcode" ] != 0 : raise ValueError if "jobId" not in result : raise ValueError job_id = result [ "jobId" ] data = result [ "data" ] except : raise ValueError ( "job submit failed, err msg: {}" . format ( result ) ) return job_id , data