Spaces:
Runtime error
Runtime error
Added params as a requirement for check validity
Browse files
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 |
-
|
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
|