Skip to content

Commit

Permalink
Add Hostname to experiment creation (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hubert Jaworski authored Apr 2, 2019
1 parent a881a31 commit 34ace33
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
6 changes: 4 additions & 2 deletions neptune/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ def create_experiment(name=None,
send_hardware_metrics=True,
run_monitoring_thread=True,
handle_uncaught_exceptions=True,
git_info=None):
git_info=None,
hostname=None):
# pylint: disable=global-statement
global project
if project is None:
Expand All @@ -88,7 +89,8 @@ def create_experiment(name=None,
send_hardware_metrics=send_hardware_metrics,
run_monitoring_thread=run_monitoring_thread,
handle_uncaught_exceptions=handle_uncaught_exceptions,
git_info=git_info
git_info=git_info,
hostname=hostname
)


Expand Down
15 changes: 13 additions & 2 deletions neptune/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,17 @@ def get_metrics_csv(self, experiment):
experiment_short_id=experiment.id, project_qualified_name=experiment._project_full_id)

@with_api_exceptions_handler
def create_experiment(self, project, name, description, params, properties, tags, abortable, monitored, git_info):
def create_experiment(self,
project,
name,
description,
params,
properties,
tags,
abortable,
monitored,
git_info,
hostname):
ExperimentCreationParams = self.backend_swagger_client.get_model('ExperimentCreationParams')
GitInfoDTO = self.backend_swagger_client.get_model('GitInfoDTO')
GitCommitDTO = self.backend_swagger_client.get_model('GitCommitDTO')
Expand Down Expand Up @@ -227,7 +237,8 @@ def create_experiment(self, project, name, description, params, properties, tags
entrypoint="", # FIXME
execArgsTemplate="", # FIXME,
abortable=abortable,
monitored=monitored
monitored=monitored,
hostname=hostname
)

api_experiment = self.backend_swagger_client.api.createExperiment(
Expand Down
6 changes: 4 additions & 2 deletions neptune/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,8 @@ def create_experiment(self,
send_hardware_metrics=True,
run_monitoring_thread=True,
handle_uncaught_exceptions=True,
git_info=None):
git_info=None,
hostname=None):
"""
Raises:
`ExperimentValidationError`: When provided arguments are invalid.
Expand Down Expand Up @@ -257,7 +258,8 @@ def create_experiment(self,
tags=tags,
abortable=abortable,
monitored=run_monitoring_thread,
git_info=git_info
git_info=git_info,
hostname=hostname
)

experiment.start(
Expand Down

0 comments on commit 34ace33

Please sign in to comment.