Skip to content
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

Add ignore validation flag while registering model #1023

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

VipulMascarenhas
Copy link
Member

@VipulMascarenhas VipulMascarenhas commented Dec 12, 2024

Description

Mistral has released some of their models in the Mistral format where you get one consolidated.safetensors and a params.json , and there is no config.json file. We still want users to proceed with model registration since the current set up restricts user to proceed.

This PR adds a input check --ignore-model-artifact-check that will not throw an error during registration when config.json is not in the model artifacts.

Also, some improvements have been made:

  • get_model_files() API will include .safetensors file names along with config.json. This ensures that the model file list is not empty when config.json is not present. This applies to files read both from Object Storage and HF repo.
  • For HF models, telemetry name is set as HF model name.
  • There was a validation added to check if model_type attribute from custom metadata matches the one in config.json. The metadata in service models don't have this field, hence any exception thrown was just ignored. We now log the details, and can update the code to throw an error when this field is added in all verified models.

Jira

More details on testing are in the ticket:
ODSC-65657

Testing

Register via HuggingFace

Scenario 1: Model has config.json file, user can proceed with registration.

ads aqua model register --model google/gemma-2-2b --os_path oci://<bucket_name>@<namespace>/prefix/ --download_from_hf True --compartment_id $PROJECT_COMPARTMENT_OCID --inference_container odsc-tgi-serving

Scenario 2: Model has no config.json, but is supported by vLLM. Validation does not allow registration to proceed.

ads aqua model register --model mistralai/Pixtral-12B-Base-2409 --os_path --os_path oci://<bucket_name>@<namespace>/prefix/ --download_from_hf True --compartment_id $PROJECT_COMPARTMENT_OCID  

Scenario 3: Model has no config.json, but with --ignore_model_artifact_check True parameter can proceed with registration.

ads aqua model register --model mistralai/Pixtral-12B-Base-2409 --os_path --os_path oci://<bucket_name>@<namespace>/prefix/ --download_from_hf True --compartment_id $PROJECT_COMPARTMENT_OCID --inference_container odsc-vllm-serving --ignore_model_artifact_check True

Register via Object Storage

Scenario 4: Model comes from OSS and the path is correct. Validation says that there is no config.json file.

ads aqua model register --model mistralai/Pixtral-12B-Base-2409-from-OSS --os_path oci://<bucket_name>@<namespace>/prefix/ --download_from_hf False --compartment_id $PROJECT_COMPARTMENT_OCID --inference_container odsc-vllm-serving

Scenario 5: Model comes from OSS and the path is correct, and we use the override flag. Registration is allowed to proceed.

ads aqua model register --model mistralai/Pixtral-12B-Base-2409-from-OSS --os_path oci://<bucket_name>@<namespace>/prefix/ --download_from_hf False --compartment_id $PROJECT_COMPARTMENT_OCID --inference_container odsc-vllm-serving --ignore_model_artifact_check True

@oracle-contributor-agreement oracle-contributor-agreement bot added the OCA Verified All contributors have signed the Oracle Contributor Agreement. label Dec 12, 2024
@VipulMascarenhas VipulMascarenhas changed the base branch from ODSC-65517/tags_for_aqua_resources to main December 12, 2024 21:18
Copy link

📌 Cov diff with main:

Coverage-0%

📌 Overall coverage:

Coverage-20.12%

@VipulMascarenhas VipulMascarenhas changed the title [Testing] Add ignore validation flag while registering model Add ignore validation flag while registering model Dec 14, 2024
ads/aqua/model/model.py Outdated Show resolved Hide resolved
Copy link

📌 Cov diff with main:

Coverage-79%

📌 Overall coverage:

Coverage-58.51%

Copy link

📌 Cov diff with main:

Coverage-81%

📌 Overall coverage:

Coverage-58.50%

Copy link

📌 Cov diff with main:

Coverage-81%

📌 Overall coverage:

Coverage-58.50%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCA Verified All contributors have signed the Oracle Contributor Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants