fix: refine troubleshooting script
What does this merge request do and why?
For https://gitlab.com/gitlab-com/request-for-help/-/issues/2277, because Support had trouble running the troubleshoot
command since the options are confusing.
To resolve this, I've made a few changes:
-
The arguments to the command now directly corresponds to what we show in the UI when creating a self-hosted model.
-
--model-key
has been renamed to--api-key
-
--model-name
has been renamed to--model-family
-
-
provider
specific checks are made only if the provider isbedrock
. This is required because, at times when the user inputsmodel-identifier
as, say,custom_openai/Mixtral-8x7B-Instruct-v0.1
,platform
will be set tocustom_openai
, and the script would just error out withValueError: Provider Custom_openai is not a supported provider.
. This is an unwarranted check to perform anyway.
After this change, the usage of the command looks like:
Examples:
For a claude_3
model running on AWS Bedrock:
poetry run troubleshoot \
--model-family=claude_3 \
--model-identifier=bedrock/anthropic.claude-3-5-sonnet-20240620-v1:0
For a mixtral
model running on vLLM:
poetry run troubleshoot \
--model-family=mixtral \
--model-identifier=custom_openai/Mixtral-8x7B-Instruct-v0.1 \
--api-key=your-api-key \
--model-endpoint=http://<your-model-endpoint>/v1
Complementary doc changes added at: gitlab-org/gitlab!179973 (merged)
How to set up and validate locally
Numbered steps to set up and validate the change are strongly suggested.
Merge request checklist
-
Tests added for new functionality. If not, please raise an issue to follow up. -
Documentation added/updated, if needed.
Merge request reports
Activity
changed milestone to %17.9
added groupcustom models typemaintenance labels
assigned to @manojmj
added devopsai-powered sectiondata-science labels
Reviewer roulette
To spread load more evenly across eligible reviewers, Danger has picked a candidate for each review slot. Feel free to override these selections if you think someone else would be better-suited or use the GitLab Review Workload Dashboard to find other available reviewers.
To read more on how to use the reviewer roulette, please take a look at the Engineering workflow and code review guidelines.
Once you've decided who will review this merge request, mention them as you normally would! Danger does not automatically notify them for you.
Reviewer Maintainer @squadri
(UTC+0, 5.5 hours behind author)
@michaelangeloio
(UTC-5, 10.5 hours behind author)
If needed, you can retry the
danger-review
job that generated this comment.Generated by
DangerEdited by ****mentioned in merge request gitlab-org/gitlab!179973 (merged)
- Resolved by Tan Le
@eduardobonet could you please review?
requested review from @eduardobonet
- Resolved by Tan Le
- Resolved by Tan Le
- Resolved by Tan Le
- Resolved by Tan Le
requested review from @tle_gitlab
added maintenancerefactor workflowin review labels
reset approvals from @eduardobonet by pushing to the branch
@tle_gitlab thank you for the review, I have addressed your comments. Please take a look
removed review request for @eduardobonet
213 215 214 parser = argparse.ArgumentParser(description="Test AI Gateway and model access") 216 parser = argparse.ArgumentParser( 217 description="Test AI Gateway and model access", 218 formatter_class=argparse.ArgumentDefaultsHelpFormatter, 219 ) 215 220 parser.add_argument( 216 "--endpoint", default="localhost:5052", help="AI Gateway endpoint" 221 "--endpoint", 222 default="localhost:5052", 223 help="AI Gateway endpoint.", 217 224 ) 218 225 parser.add_argument( 219 "--model-name", required=False, help="Name of the model to test" 226 "--model-family", 227 required=False, 229 help="Family of the model to test.", 220 230 ) 221 231 parser.add_argument( 222 232 "--model-endpoint", 223 233 required=False, 224 234 default="http://localhost:4000", 225 help="Endpoint of the model. Example: http://localhost:4000. " 235 help="Endpoint of the model." 226 236 "When using a model from an online provider like Bedrock, " 227 "this can be left empty.", 237 "this can be left empty. When using a model hosted via vLLM, the /v1 suffix is required.", 228 238 ) 229 239 parser.add_argument( 230 "--model-identifier", required=False, help="Identifier of the model" 240 "--model-identifier", 241 required=False, 215 220 parser.add_argument( 216 "--endpoint", default="localhost:5052", help="AI Gateway endpoint" 221 "--endpoint", 222 default="localhost:5052", 223 help="AI Gateway endpoint.", 217 224 ) 218 225 parser.add_argument( 219 "--model-name", required=False, help="Name of the model to test" 226 "--model-family", 227 required=False, 228 choices=SUPPORTED_MODEL_FAMILIES, 229 help="Family of the model to test.", 220 230 ) 221 231 parser.add_argument( 222 232 "--model-endpoint", 223 233 required=False, started a merge train
mentioned in commit c2385d45