-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix validation for model containing both formats. #948
base: feature/aqua-v1.0.4
Are you sure you want to change the base?
Fix validation for model containing both formats. #948
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes look good, we might have to update and add unit tests as well. Could you run tests and confirm they work fine?
@@ -933,139 +933,186 @@ def _validate_model( | |||
# now as we know that at least one type of model files exist, validate the content of oss path. | |||
# for safetensors, we check if config.json files exist, and for gguf format we check if files with | |||
# gguf extension exist. | |||
for model_format in model_formats: | |||
if ModelFormat.SAFETENSORS in model_formats and ModelFormat.GGUF in model_formats: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This case is only possible for the service models?
We probably can do something like this:
if {ModelFormat.SAFETENSORS, ModelFormat.GGUF}.issubset(set(model_formats)):
Ideally we should come up with the base modelFormatValidator class, and implement different types of the format validators. We can do this in the next iteration.
if ( | ||
model_format == ModelFormat.SAFETENSORS | ||
and len(safetensors_model_files) > 0 | ||
import_model_details.inference_container == InferenceContainerTypeFamily.AQUA_LLAMA_CPP_CONTAINER_FAMILY |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
NIT:
import_model_details.inference_container.lower()
Fix validation for model containing both formats.
SAFETENSORS
orGGUF
format and misses the case when both formats are present.Notebook
SAFETENSORS
GGUF
Selecting finetuning for GGUF model will fail
SAFETENSORS
andGGUF
Selecting finetuning for GGUF model will fail