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

add sagemaker predict PoC to eland #2

Merged
merged 30 commits into from
Sep 9, 2022
Merged

Conversation

LEFTA98
Copy link
Contributor

@LEFTA98 LEFTA98 commented Sep 6, 2022

  • Add integration with sagemaker for doing real-time prediction with opensearch data
  • Add custom index to filter opensearch-py-ml DataFrames by instead of defaulting to _doc as indexing field

Original PR, for those with access: https://github.com/LEFTA98/opensearch-py-ml-thomaym/pull/2

Please note that the CI checks are failing; this is expected due to the renaming of many objects. We will add our own CI checks back in future release.

):
df = query_compiler._es_results_to_pandas(hits)
df = self._apply_df_post_processing(df, post_processing)
# i += 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remove debug code?


from sagemaker import RealTimePredictor, Session

DEFAULT_UPLOAD_CHUNK_SIZE = 1000
Copy link
Collaborator

@ylwu-amzn ylwu-amzn Sep 8, 2022

Choose a reason for hiding this comment

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

This is for uploading data to sagemaker only? If yes, how about change this constant name to "DEFAULT_SAGEMAKER_UPLOAD_CHUNK_SIZE"

Update: ignore this comment, just saw you have changed in another PR #4

@LEFTA98 LEFTA98 merged commit a813c64 into eland_to_opensearch Sep 9, 2022
LEFTA98 added a commit that referenced this pull request Sep 9, 2022
fixed aggregatable field name tests
@dhrubo-os dhrubo-os deleted the sagemaker_predict branch February 8, 2023 18:00
dhrubo-os pushed a commit that referenced this pull request Aug 22, 2023
#210)

* Initiate PR #2 Model Listing & Uploading

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Add comment

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Correct linting

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Revert "Correct demo_ml_commons_integration.ipynb (#208)"

This reverts commit c67f969.

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Removed a modified file from pull request

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Removed a modified file from pull request

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Add steps.checkout_pr_branch.outcome

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Remove old config json

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Minor change

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Allow non-st

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Add tests for PR2

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Create __init__.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Create __init__.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update noxfile.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update noxfile.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update setup.cfg

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update noxfile.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Add more test to improve coverage

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Improve test cov

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Make it extensible

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update update_model_listing.yml

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Avoid crashing if folder does not exists

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Debug update_model_listing.yml

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update update_model_listing.yml

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Wrap with update_pretrained_model_listing_main

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update update_model_listing.yml

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Remove unused variables

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Remove unnecessary variable

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

---------

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>
opensearch-trigger-bot bot pushed a commit that referenced this pull request Aug 22, 2023
#210)

* Initiate PR #2 Model Listing & Uploading

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Add comment

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Correct linting

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Revert "Correct demo_ml_commons_integration.ipynb (#208)"

This reverts commit c67f969.

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Removed a modified file from pull request

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Removed a modified file from pull request

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Add steps.checkout_pr_branch.outcome

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Remove old config json

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Minor change

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Allow non-st

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Add tests for PR2

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Create __init__.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Create __init__.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update noxfile.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update noxfile.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update setup.cfg

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update noxfile.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Add more test to improve coverage

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Improve test cov

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Make it extensible

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update update_model_listing.yml

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Avoid crashing if folder does not exists

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Debug update_model_listing.yml

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update update_model_listing.yml

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Wrap with update_pretrained_model_listing_main

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update update_model_listing.yml

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Remove unused variables

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Remove unnecessary variable

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

---------

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>
(cherry picked from commit 205a0fd)
dhrubo-os pushed a commit that referenced this pull request Aug 22, 2023
#210) (#238)

* Initiate PR #2 Model Listing & Uploading

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Add comment

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Correct linting

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update CHANGELOG.md

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Revert "Correct demo_ml_commons_integration.ipynb (#208)"

This reverts commit c67f969.

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Removed a modified file from pull request

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Removed a modified file from pull request

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Add steps.checkout_pr_branch.outcome

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Remove old config json

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Minor change

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Allow non-st

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Add tests for PR2

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Create __init__.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Create __init__.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update noxfile.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update noxfile.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update setup.cfg

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update noxfile.py

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Add more test to improve coverage

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Improve test cov

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Make it extensible

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update update_model_listing.yml

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Avoid crashing if folder does not exists

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Debug update_model_listing.yml

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update update_model_listing.yml

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Wrap with update_pretrained_model_listing_main

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Update update_model_listing.yml

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Remove unused variables

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

* Remove unnecessary variable

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>

---------

Signed-off-by: Thanawan Atchariyachanvanit <latchari@amazon.com>
(cherry picked from commit 205a0fd)

Co-authored-by: Thanawan Atchariyachanvanit <latchari@amazon.com>
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.

2 participants