Skip to content
This repository has been archived by the owner on Sep 18, 2024. It is now read-only.

Commit

Permalink
feat: add error message when experiment is None (#708)
Browse files Browse the repository at this point in the history
* feat: add error message when experiment is

* chore: update changelog

* chore: correct grammar

* chore: adjust error message
  • Loading branch information
LMMilliken authored Apr 5, 2023
1 parent 92618b4 commit 3fb9658
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Add support for python 3.10. ([#704](https://github.com/jina-ai/finetuner/pull/704))

- Add error message when `experiment` is `None` when creating a run. ([#708](https://github.com/jina-ai/finetuner/pull/708))

### Removed

### Changed
Expand Down
7 changes: 7 additions & 0 deletions finetuner/finetuner.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,13 @@ def create_run(
experiment = self._default_experiment
else:
experiment = self.get_experiment(name=experiment_name)
if not experiment:
raise ValueError(
(
'Unable to start finetuning run as experiment is `None`. '
'Make sure you have logged in using `finetuner.login(force=True)`.'
)
)
return experiment.create_run(
model=model,
train_data=train_data,
Expand Down

0 comments on commit 3fb9658

Please sign in to comment.