Skip to content

Commit

Permalink
indicate str is allowed in error message
Browse files Browse the repository at this point in the history
Signed-off-by: technillogue <technillogue@gmail.com>
  • Loading branch information
technillogue committed Mar 12, 2024
1 parent 128b57f commit 78bc7e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/cog/predictor.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def run_setup(predictor: BasePredictor) -> None:
weights = weights_url
else:
raise ValueError(
f"Predictor.setup() has an argument 'weights' of type {weights_type}, but only File and Path are supported"
f"Predictor.setup() has an argument 'weights' of type {weights_type}, but only File, Path and str are supported"
)
elif os.path.exists(weights_path):
if weights_type == CogFile:
Expand All @@ -99,7 +99,7 @@ def run_setup(predictor: BasePredictor) -> None:
weights = CogPath(weights_path)
else:
raise ValueError(
f"Predictor.setup() has an argument 'weights' of type {weights_type}, but only File and Path are supported"
f"Predictor.setup() has an argument 'weights' of type {weights_type}, but only File, Path and str are supported"
)
else:
weights = None
Expand Down

0 comments on commit 78bc7e3

Please sign in to comment.