Created
October 18, 2018 18:04
-
-
Save wbuchwalter/d8006a083dbcebbb079ffc88c0861c10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def get_outputs_path(default): | |
try: | |
from polyaxon_helper import get_outputs_path | |
out = get_outputs_path() | |
if out is not None: | |
return out | |
except ImportError: | |
return default | |
def get_data_input_path(relative_path, default): | |
try: | |
from polyaxon_helper import get_data_paths | |
data = get_data_paths()['data'] | |
if data is not None: | |
return os.path.join(data, relative_path) | |
except ImportError: | |
return default | |
def send_metrics(*args, **kwargs): | |
try: | |
from polyaxon_helper import ( | |
get_outputs_path, | |
send_metrics | |
) | |
if get_outputs_path is None: | |
return | |
except ImportError: | |
return | |
send_metrics(*args, **kwargs) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment