Skip to content

Commit

Permalink
Update attributes of ModelNotFoundError class
Browse files Browse the repository at this point in the history
Signed-off-by: Nathan Weinberg <[email protected]>
  • Loading branch information
nathan-weinberg committed Jun 17, 2024
1 parent 3eadb4d commit 0f50072
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions src/instructlab/eval/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,13 @@ class ModelNotFoundError(EvalError):
Exception raised when model is not able to be found
Attributes
model model that is being operated on
message error message to be printed on raise
model model that is being operated on
path filepath of model location
"""

def __init__(self, model) -> None:
def __init__(self, path) -> None:
super().__init__()
self.model = model
self.message = f"Model {self.model} could not be found"
self.path = path
self.model = path.rsplit('/')[-1]
self.message = f"Model {self.model} could not be found at {self.path}"

0 comments on commit 0f50072

Please sign in to comment.