Skip to content

feat: Introduce HF Transformers to ModelBuilder - #4368

Merged
erickb336 merged 14 commits into
aws:masterfrom
samruds:master
Feb 2, 2024
Merged

feat: Introduce HF Transformers to ModelBuilder#4368
erickb336 merged 14 commits into
aws:masterfrom
samruds:master

Conversation

@samruds

@samruds samruds commented Jan 10, 2024

Copy link
Copy Markdown
Collaborator

Issue #, if available: #4284

Description of changes:

Introduce the HF Model Builder
Add unit tests

Testing done:
Tested changes using Local and Sagemaker endpoint mode

Merge Checklist

Put an x in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your pull request.

General

  • I have read the CONTRIBUTING doc
  • I certify that the changes I am introducing will be backward compatible, and I have discussed concerns about this, if any, with the Python SDK team
  • I used the commit message format described in CONTRIBUTING
  • I have updated any necessary documentation, including READMEs and API docs (if appropriate)

Tests

  • I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • I have added unit and/or integration tests as appropriate to ensure backward compatibility of the changes
  • I have checked that my tests are not configured for a specific region or account (if appropriate)
  • I have used unique_name_from_base to create resource names in integ tests (if appropriate)

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@samruds
samruds requested a review from a team as a code owner January 10, 2024 22:08
@samruds
samruds requested review from EvelynYan21 and removed request for a team January 10, 2024 22:08
Comment thread src/sagemaker/serve/builder/hf_dlc_builder.py Outdated
Comment thread src/sagemaker/serve/model_server/hf_dlc/server.py Outdated
Comment thread src/sagemaker/serve/builder/model_builder.py Outdated
Comment thread src/sagemaker/serve/builder/hf_dlc_builder.py Outdated
Comment thread src/sagemaker/serve/model_server/hf_dlc/server.py Outdated
Comment thread src/sagemaker/serve/builder/hf_dlc_builder.py Outdated
Comment thread src/sagemaker/serve/builder/hf_dlc_builder.py Outdated
Comment thread src/sagemaker/serve/model_server/hf_dlc/server.py Outdated
Comment thread src/sagemaker/serve/builder/hf_dlc_builder.py Outdated
Comment thread src/sagemaker/serve/builder/hf_dlc_builder.py Outdated
@gwang111

Copy link
Copy Markdown
Collaborator

please rename to feat: Introduce HF DLC to ModelBuilder

@gwang111

Copy link
Copy Markdown
Collaborator

i think we should also add additional unit testing. I don't see coverage for the new hf_dlc_builder.py

@samruds samruds closed this Jan 12, 2024
@samruds samruds changed the title Introduce HF DLC to Model Builder feat: Introduce HF DLC to ModelBuilder Jan 12, 2024
@samruds samruds reopened this Jan 12, 2024
@samruds

samruds commented Jan 16, 2024

Copy link
Copy Markdown
Collaborator Author

i think we should also add additional unit testing. I don't see coverage for the new hf_dlc_builder.py

Added UT

Comment thread src/sagemaker/serve/builder/hf_dlc_builder.py Outdated
Comment thread src/sagemaker/serve/builder/hf_dlc_builder.py Outdated
Comment thread src/sagemaker/serve/builder/hf_dlc_builder.py Outdated
Comment thread src/sagemaker/serve/builder/hf_dlc_builder.py Outdated
Comment thread src/sagemaker/serve/builder/hf_dlc_builder.py Outdated
Comment thread src/sagemaker/serve/builder/hf_dlc_builder.py Outdated
Comment thread src/sagemaker/serve/builder/hf_dlc_builder.py Outdated
Comment thread src/sagemaker/serve/builder/hf_dlc_builder.py Outdated
Comment thread src/sagemaker/serve/builder/hf_dlc_builder.py Outdated
Comment thread src/sagemaker/serve/model_server/hf_dlc/prepare.py
Comment thread src/sagemaker/serve/builder/hf_dlc_builder.py Outdated
@samruds
samruds force-pushed the master branch 6 times, most recently from 7ee395a to 6b307c0 Compare January 17, 2024 20:39
@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-slow-tests
  • Commit ID: c7aaf6d
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-unit-tests
  • Commit ID: c7aaf6d
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

Comment thread src/sagemaker/serve/builder/transformers_builder.py
"""Placeholder docstring"""
self.container = client.containers.run(
image,
"serve",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

For more information : SageMaker overrides default CMD statements in a container by specifying the serve argument after the image name. The serve argument overrides arguments that you provide with the CMD command in the Dockerfile.

https://docs.aws.amazon.com/sagemaker/latest/dg/your-algorithms-inference-code.html#your-algorithms-inference-code-run-image

Comment thread src/sagemaker/serve/model_server/multi_model_server/server.py
@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-pr
  • Commit ID: 3f778ad
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-local-mode-tests
  • Commit ID: 3f778ad
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-notebook-tests
  • Commit ID: 3f778ad
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-local-mode-tests
  • Commit ID: 617dc82
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-notebook-tests
  • Commit ID: 617dc82
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-pr
  • Commit ID: 617dc82
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-slow-tests
  • Commit ID: 617dc82
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-unit-tests
  • Commit ID: 617dc82
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-unit-tests
  • Commit ID: a2ab955
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-unit-tests
  • Commit ID: a06b406
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-unit-tests
  • Commit ID: f8e820d
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-unit-tests
  • Commit ID: faa93e5
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-unit-tests
  • Commit ID: 5bd854e
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-local-mode-tests
  • Commit ID: 5bd854e
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-unit-tests
  • Commit ID: 3d6636b
  • Result: FAILED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-notebook-tests
  • Commit ID: ba850c2
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-local-mode-tests
  • Commit ID: ba850c2
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-pr
  • Commit ID: ba850c2
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-slow-tests
  • Commit ID: ba850c2
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

@mufaddal-rohawala

Copy link
Copy Markdown
Member

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-unit-tests
  • Commit ID: ba850c2
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

Powered by github-codebuild-logs, available on the AWS Serverless Application Repository

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.

[HuggingFace] use default Hugging Face Inference DLC for non TGI models when using ModelBuilder

9 participants