in credit-card-fraud-detection/neptune_ml_utils.py [0:0]
def get_neptune_ml_job_output_location(job_name: str, job_type: str):
assert job_type in ["dataprocessing", "modeltraining", "modeltransform"], "Invalid neptune ml job type"
host, port, use_iam = load_configuration()
response = signed_request("GET", service='neptune-db',
url=f'https://{host}:{port}/ml/{job_type}/{job_name}',
headers={'content-type': 'application/json'})
result = json.loads(response.content.decode('utf-8'))
if result["status"] != "Completed":
logging.error("Neptune ML {} job: {} is not completed".format(job_type, job_name))
return
return result["processingJob"]["outputLocation"]