Skip to content

Commit

Permalink
Hide privatly used methods from API (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hubert Jaworski authored and Kamil A. Kaczmarek committed Jul 30, 2019
1 parent 9cff63e commit 8fe52c9
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 13 deletions.
22 changes: 11 additions & 11 deletions neptune/experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ def get_logs(self):
channels[ch.name] = ch
return channels

def get_system_channels(self):
def _get_system_channels(self):
channels = self._client.get_system_channels(self)
return dict((ch.name, ch) for ch in channels)

Expand Down Expand Up @@ -734,15 +734,15 @@ def get_numeric_channels_values(self, *channel_names):

return align_channels_on_x(pd.concat(channels_data.values(), axis=1, sort=False))

def start(self,
upload_source_files=None,
abort_callback=None,
logger=None,
upload_stdout=True,
upload_stderr=True,
send_hardware_metrics=True,
run_monitoring_thread=True,
handle_uncaught_exceptions=True):
def _start(self,
upload_source_files=None,
abort_callback=None,
logger=None,
upload_stdout=True,
upload_stderr=True,
send_hardware_metrics=True,
run_monitoring_thread=True,
handle_uncaught_exceptions=True):
if upload_source_files is None:
main_file = sys.argv[0]
main_abs_path = os.path.join(os.getcwd(), os.path.basename(main_file))
Expand Down Expand Up @@ -864,7 +864,7 @@ def _find_channel(self, channel_name, channel_namespace):
if channel_namespace == ChannelNamespace.USER:
return self.get_channels().get(channel_name, None)
elif channel_namespace == ChannelNamespace.SYSTEM:
return self.get_system_channels().get(channel_name, None)
return self._get_system_channels().get(channel_name, None)
else:
raise RuntimeError("Unknown channel namesapce {}".format(channel_namespace))

Expand Down
3 changes: 2 additions & 1 deletion neptune/internal/channels/channels_values_sender.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,8 @@ def channel_key(value):
for ch in queued_grouped_by_channel.keys()
if ch.channel_namespace == ChannelNamespace.USER
])
system_channels_by_name = self._experiment.get_system_channels()
# pylint: disable=protected-access
system_channels_by_name = self._experiment._get_system_channels()

for channel_key in queued_grouped_by_channel:
if channel_key.channel_namespace == ChannelNamespace.USER:
Expand Down
3 changes: 2 additions & 1 deletion neptune/projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,8 @@ def create_experiment(self,
notebook_id=notebook_id
)

experiment.start(
# pylint: disable=protected-access
experiment._start(
upload_source_files=upload_source_files,
abort_callback=abort_callback,
logger=logger,
Expand Down

0 comments on commit 8fe52c9

Please sign in to comment.