-
Notifications
You must be signed in to change notification settings - Fork 64
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] Model uploader's jekins trigger parameter fix #402
[Fix] Model uploader's jekins trigger parameter fix #402
Conversation
… customize prefix. Signed-off-by: conggguan <[email protected]>
Signed-off-by: conggguan <[email protected]>
480e7cf
to
d134be6
Compare
if [[ -n "${{ github.event.inputs.upload_prefix }}" ]]; then | ||
model_prefix="ml-models/${{ github.event.inputs.model_source }}/${{ github.event.inputs.upload_prefix }}" | ||
else | ||
model_prefix="ml-models/${{ github.event.inputs.model_source }}/${model_id%%/*}" | ||
fi | ||
echo "model_folder=$model_prefix/${model_id##*/}" >> $GITHUB_OUTPUT |
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.
what is ##*
about? Can we add comment?
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.
"##" is used to match the longest {*/}.
For example:
model_id="opensearch-project/opensearch-neural-sparse-encoding-v1/tree/main"
output="${model_id##*/}"
echo $output
will generate a main, because the ##*/ matched the "opensearch-project/opensearch-neural-sparse-encoding-v1/tree/" and deleted it.
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.
Please add a comment in the code, what does the model_folder
look like for both cases (if and else)
…ders]. Signed-off-by: conggguan <[email protected]>
|
||
### Fixed | ||
- Fix the wrong input parameter for model_uploader's base_download_path in jekins trigger.([#402](https://github.com/opensearch-project/opensearch-py-ml/pull/402)) |
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.
[minor] jenkins
Description
Current model upload workflow has a parameter which can customize the prefix of the upload path. But the Jekins's release workflow are miss this point so that will failed.
In this PR, removed the redundant failed model update information and fixed this bug.
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.