Skip to content

Instantly share code, notes, and snippets.

@wbuchwalter
Created October 18, 2018 18:04
Show Gist options
  • Save wbuchwalter/d8006a083dbcebbb079ffc88c0861c10 to your computer and use it in GitHub Desktop.
Save wbuchwalter/d8006a083dbcebbb079ffc88c0861c10 to your computer and use it in GitHub Desktop.
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