Skip to content

Commit

Permalink
throw informative error
Browse files Browse the repository at this point in the history
  • Loading branch information
Safoora Yousefi committed Jan 17, 2025
1 parent bd7ebeb commit f52164c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions eureka_ml_insights/core/inference.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,8 @@ def fetch_previous_inference_results(self):

# perform a sample inference call to get the model output keys and validate the resume_from contents
sample_response_dict = self.model.generate(*sample_model_input)
if not sample_response_dict["is_valid"]:
raise ValueError("Sample inference call for resume_from returned invalid results, please check the model configuration.")
# check if the inference response dictionary contains the same keys as the resume_from file
eventual_keys = set(sample_response_dict.keys()) | set(sample_data_keys)

Expand Down

0 comments on commit f52164c

Please sign in to comment.