Shaltiel commited on
Commit
3b9b5af
1 Parent(s): bef5580

Added params as a requirement for check validity

Browse files
Files changed (1) hide show
  1. src/submission/check_validity.py +1 -1
src/submission/check_validity.py CHANGED
@@ -63,7 +63,7 @@ def get_model_size(model_info: ModelInfo, precision: str):
63
  try:
64
  model_size = round(model_info.safetensors["total"] / 1e9, 3)
65
  except (AttributeError, TypeError):
66
- return 0 # Unknown model sizes are indicated as 0, see NUMERIC_INTERVALS in app.py
67
 
68
  size_factor = 8 if (precision == "GPTQ" or "gptq" in model_info.modelId.lower()) else 1
69
  model_size = size_factor * model_size
 
63
  try:
64
  model_size = round(model_info.safetensors["total"] / 1e9, 3)
65
  except (AttributeError, TypeError):
66
+ raise ValueError("Couldn't detect number of params in the metadata, and therefore unable to choose the instance type to deploy on. Please make sure the metadata is available.")
67
 
68
  size_factor = 8 if (precision == "GPTQ" or "gptq" in model_info.modelId.lower()) else 1
69
  model_size = size_factor * model_size