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

[DEVX-381]: Modified train params.yaml file structure #314

Merged
merged 3 commits into from
Mar 19, 2024

Conversation

mogith-pn
Copy link
Contributor

Why

How

  • Removed the key base_embed_model from params.yaml file, since the model training by default considers the base embed model which is set for the app and no need to define it again in params file.
  • Added concepts_mutually_exclusive parameter which is there in UI but missing from the existing yaml template.

Screenshot 2024-03-19 at 5 57 55 PM

Tests

  • Test was done with curl endpoint which fetches the model training info after it was trained.
curl -X GET "https://api.clarifai.com/v2/users/mogith-p-n/apps/transfer_learn/models/image_transfer_learn/versions/b9c41a42a29e4f639d7eacf115c2e3fe" \
    -H "Authorization: Key PAT"

Response

{"status":{"code":10000,"description":"Ok","req_id":"501d3c2f1740ea9eba624f20940e10cd"},"model_version":{"id":"b9c41a42a29e4f639d7eacf115c2e3fe","created_at":"2024-03-15T13:29:28.469350Z","status":{"code":21100,"description":"Model is trained and ready"},"active_concept_count":4,"total_input_count":20,"train_stats":{"loss_curve":[{"cost":1.3873892},{"epoch":25,"global_step":4,"cost":0.5949107},{"epoch":51,"global_step":8,"cost":0.0036175046},{"epoch":76,"global_step":12,"cost":0.0018137831},{"epoch":102,"global_step":16,"cost":0.0020436822},{"epoch":128,"global_step":20,"cost":0.0021939636},{"epoch":153,"global_step":24,"cost":0.0022796458},{"epoch":179,"global_step":28,"cost":0.0023247986},{"epoch":204,"global_step":32,"cost":0.0023464388},{"epoch":230,"global_step":36,"cost":0.0023552317}]},"completed_at":"2024-03-15T13:29:31.172301Z","visibility":{"gettable":10},"app_id":"transfer_learn","user_id":"mogith-p-n","metadata":{},"output_info":{"output_config":{"concepts_mutually_exclusive":true,"max_concepts":0,"min_value":0},"message":"Show output_info with: GET [/models/](https://file+.vscode-resource.vscode-cdn.net/models/){model_id}/output_info","params":{"max_concepts":20,"min_value":0,"select_concepts":[]}},"input_info":{"base_embed_model":{"id":"CLIP-ViT-L-14-DataComp-XL-s13B-b90K","app_id":"main","model_version":{"id":"54772a548e6f42509cb1fd9fc43762bb"},"user_id":"clarifai","model_type_id":"multimodal-embedder","toolkits":[],"use_cases":[],"languages":[],"languages_full":[],"check_consents":[]}},"train_info":{"params":{"dataset_id":"","dataset_version_id":"","enrich_dataset":"Automatic"}},"import_info":{}}}

Notes

Copy link
Contributor

@sanjaychelliah sanjaychelliah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a comment.

clarifai/utils/model_train.py Show resolved Hide resolved
Copy link
Contributor

@sanjaychelliah sanjaychelliah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@sanjaychelliah sanjaychelliah merged commit faa15b4 into master Mar 19, 2024
17 checks passed
@sanjaychelliah sanjaychelliah deleted the DEVX-381-Train-params branch March 19, 2024 15:03
@sanjaychelliah sanjaychelliah mentioned this pull request Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants