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

Fine tune error message for model content changed #1630

Closed
ylwu-amzn opened this issue Nov 14, 2023 · 4 comments
Closed

Fine tune error message for model content changed #1630

ylwu-amzn opened this issue Nov 14, 2023 · 4 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ylwu-amzn
Copy link
Collaborator

ylwu-amzn commented Nov 14, 2023

When user upload model via URL and didn't provide model hash value, it will throw "model content changed" error, which is hard to understand. We should clearly tell user that model content has value not set.

POST /_plugins/_ml/models/_upload
{
  "name": "all-MiniLM-L6-v2",
  "version": "1.0.0",
  "description": "test model",
  "model_format": "TORCH_SCRIPT",
  "model_config": {
    "model_type": "bert",
    "embedding_dimension": 384,
    "framework_type": "sentence_transformers"
  },
  "url": "https://github.com/opensearch-project/ml-commons/raw/2.x/ml-algorithms/src/test/resources/org/opensearch/ml/engine/algorithms/text_embedding/all-MiniLM-L6-v2_torchscript_sentence-transformer.zip?raw=true"
}

Task

{
  "task_type": "REGISTER_MODEL",
  "function_name": "TEXT_EMBEDDING",
  "state": "FAILED",
  "worker_node": [
    "_QJb--HRS2-7lfq5DCWMiQ"
  ],
  "create_time": 1693505198395,
  "last_update_time": 1693505199947,
  "error": "model content changed",
  "is_async": true
}

Need to calcuate sha256 first

shasum -a 256 all-MiniLM-L6-v2_torchscript_sentence-transformer.zip

Then upload

POST /_plugins/_ml/models/_register
{
    "name": "all-MiniLM-L6-v2",
    "version": "1.0.0",
    "description": "test model",
    "model_format": "TORCH_SCRIPT",
    "model_group_id": "FTNlQ4gBYW0Qyy5ZoxfR",
    "model_content_hash_value": "c15f0d2e62d872be5b5bc6c84d2e0f4921541e29fefbef51d59cc10a8ae30e0f",
    "model_config": {
        "model_type": "bert",
        "embedding_dimension": 384,
        "framework_type": "sentence_transformers"
    },
    "url": "https://artifacts.opensearch.org/models/ml-models/huggingface/sentence-transformers/all-MiniLM-L6-v2/1.0.1/torch_script/sentence-transformers_all-MiniLM-L6-v2-1.0.1-torch_script.zip"
}
@ylwu-amzn ylwu-amzn added enhancement New feature or request untriaged labels Nov 14, 2023
@ylwu-amzn ylwu-amzn changed the title [FEATURE] Fine tune error message for model content changed Fine tune error message for model content changed Nov 14, 2023
@ylwu-amzn ylwu-amzn added the good first issue Good for newcomers label Nov 17, 2023
@ylwu-amzn ylwu-amzn moved this to On-deck in ml-commons projects Nov 17, 2023
@TrungBui59
Copy link
Contributor

@ylwu-amzn can you assign me to this issue? Thank you

@ylwu-amzn
Copy link
Collaborator Author

Sure, thanks @TrungBui59, assigned to you

@ylwu-amzn
Copy link
Collaborator Author

@TrungBui59 , any update ? We plan to fix this in 2.12, if you don't have enough bandwidth, will ask someone else to help.

@xinyual xinyual mentioned this issue Jan 31, 2024
5 tasks
@TrungBui59
Copy link
Contributor

@ylwu-amzn sorry for the delayed response, I was having some personal issues, so I wasn't checking frequently, I am still working on it but it seems like others have posted a PR for this issue

@mingshl mingshl closed this as completed Jul 2, 2024
@github-project-automation github-project-automation bot moved this from On-deck to Done in ml-commons projects Jul 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Development

No branches or pull requests

3 participants