def get_outputs_path(): """ The outputs path generated by polyaxon based on the hierarchy of the experiment: `user/project-uid/run-uid/files` """ ensure_is_managed() return os.getenv(POLYAXON_KEYS_OUTPUTS_PATH, None)
def get_run_info(): """ Returns information about the current run: * owner * project * run_uuid """ ensure_is_managed() return get_run_info()
def get_artifacts_paths(): """ The data/artifacts paths dictionary that you mounted for the job/experiment. {'data1': '/data/1/', 'data-foo': '/data/foo'} """ ensure_is_managed() paths = os.getenv(POLYAXON_KEYS_ARTIFACTS_PATHS, None) try: return json.loads(paths) if paths else None except (ValueError, TypeError): print("Could get data/artifacts paths, " "please make sure this is running inside a polyaxon job.") return None
def get_log_level(): """If set on the polyaxonfile it will return the log level.""" ensure_is_managed() return settings.CLIENT_CONFIG.log_level