Skip to content

Commit

Permalink
Silently ignore missing notebooks (#427)
Browse files Browse the repository at this point in the history
  • Loading branch information
HubertJaworski authored Mar 2, 2021
1 parent e7d2420 commit fa34e77
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions neptune/internal/backends/hosted_neptune_backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -394,11 +394,14 @@ def create_checkpoint(self, notebook_id, jupyter_path, _file=None):
CheckpointDTO = self.leaderboard_swagger_client.get_model('CheckpointDTO')
return CheckpointDTO.unmarshal(response.json())
else:
NewCheckpointDTO = self.leaderboard_swagger_client.get_model('NewCheckpointDTO')
return self.leaderboard_swagger_client.api.createEmptyCheckpoint(
notebookId=notebook_id,
checkpoint=NewCheckpointDTO(path=jupyter_path)
).response().result
try:
NewCheckpointDTO = self.leaderboard_swagger_client.get_model('NewCheckpointDTO')
return self.leaderboard_swagger_client.api.createEmptyCheckpoint(
notebookId=notebook_id,
checkpoint=NewCheckpointDTO(path=jupyter_path)
).response().result
except HTTPNotFound:
return None

@with_api_exceptions_handler
def get_experiment(self, experiment_id):
Expand Down

0 comments on commit fa34e77

Please sign in to comment.