def generate_submodel_gpr_compile_task(self, submodel_id, location_ids, upstream_tasks): job_hash_name = "m5q0_{}_submodel_{}_gpr_compile".format( self.version_id, submodel_id) slots = 5 mem_free = 10 process_timeout = 10000 runfile = "{}/07_append_gpr.py".format(self.code_dir) args = [ "--version_id", str(self.version_id), "--submodel_id", str(submodel_id), "--location_ids", ' '.join([str(l) for l in location_ids]) ] return PythonOperator(job_hash_name, slots=slots, mem_free=mem_free, project=self.cluster_project, runfile=runfile, args=args, process_timeout=process_timeout, path_to_python_binary=self.python_binary_path, upstream_tasks=upstream_tasks)
def generate_submodel_gpr_task(self, submodel_id, location_id, ihme_loc_id, upstream_tasks): job_hash_name = "m5q0_{}_submodel_{}_gpr_{}".format( self.version_id, submodel_id, location_id) slots = 5 mem_free = 10 process_timeout = 10000 runfile = "{}/06_fit_gpr.py".format(self.code_dir) args = [ "--version_id", str(self.version_id), "--submodel_id", str(submodel_id), "--location_id", str(location_id), "--ihme_loc_id", ihme_loc_id ] return PythonOperator( job_hash_name, slots=slots, mem_free=mem_free, project=self.cluster_project, runfile=runfile, args=args, process_timeout=process_timeout, path_to_python_binary=self.python_gpr_binary_path, upstream_tasks=upstream_tasks)
def generate_assess_bias_task(self, upstream_tasks): job_hash_name = "m5q0_{}_assess_bias".format(self.version_id) slots = 5 mem_free = 10 process_timeout = 10000 runfile = "{}/02_assess_vr_bias.py".format(self.code_dir) args = ["--version_id", str(self.version_id)] return PythonOperator(job_hash_name, slots=slots, mem_free=mem_free, project=self.cluster_project, runfile=runfile, args=args, process_timeout=process_timeout, path_to_python_binary=self.python_binary_path, upstream_tasks=upstream_tasks)
def generate_sex_gpr_task(version_id, ihme_loc_id, region_name, upstream_tasks): job_hash_name = "agesex_{}_sex_gpr_{}".format( version_id, ihme_loc_id) slots = 5 mem_free = 10 project = "CLUSTER_PROJECT" path_to_python_binary="FILEPATH" runfile = ("FILEPATH" "05_predict_sex_model_gpr.py") args = ["--version_id", str(version_id), "--region_name", region_name, "--ihme_loc_id", ihme_loc_id] process_timeout = 10000 return PythonOperator( job_hash_name, slots=slots, mem_free=mem_free, project=project, runfile=runfile, args=args, process_timeout=process_timeout, path_to_python_binary=path_to_python_binary, upstream_tasks=upstream_tasks)
def generate_save_draws_task(self, location_id, upstream_tasks): job_hash_name = "m5q0_{}_save_draws_{}".format(self.version_id, location_id) slots = 5 mem_free = 10 process_timeout = 10000 runfile = "{}/09_save_draws.py".format(self.code_dir) args = ["--version_id", self.version_id, "--location_id", location_id] return PythonOperator(job_hash_name, slots=slots, mem_free=mem_free, project=self.cluster_project, runfile=runfile, args=args, process_timeout=process_timeout, path_to_python_binary=self.python_binary_path, upstream_tasks=upstream_tasks)
def generate_u5_task(location_id, ihme_loc_id, version_id, version_age_sex_id, upstream_tasks): job_hash_name = "u5_{}_{}".format(version_id, location_id) slots = 12 mem_free = 24 project = "CLUSTER_PROJECT" runfile = code_dir + "01_u5.py" args = [ "--location_id", str(int(location_id)), "--ihme_loc_id", ihme_loc_id, "--version_id", str(int(version_id)), "--version_age_sex_id", str(int(version_age_sex_id)) ] process_timeout = 10000 return PythonOperator(job_hash_name, slots=slots, mem_free=mem_free, project=project, runfile=runfile, args=args, process_timeout=process_timeout, path_to_python_binary=path_to_python_binary, upstream_tasks=upstream_tasks)