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

[Fix] Model uploader's jekins trigger parameter fix #402

Merged
merged 4 commits into from
Aug 8, 2024

Conversation

conggguan
Copy link
Contributor

@conggguan conggguan commented Aug 7, 2024

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

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff

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.

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
Copy link
Collaborator

@dhrubo-os dhrubo-os Aug 7, 2024

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?

Copy link
Contributor Author

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.

Copy link
Collaborator

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)


### 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))
Copy link
Collaborator

Choose a reason for hiding this comment

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

[minor] jenkins

@dhrubo-os dhrubo-os merged commit d1d968d into opensearch-project:main Aug 8, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants