Skip to content

Conversation

@cbechir
Copy link
Contributor

@cbechir cbechir commented May 3, 2023

Issue #, if available:
N.A

Description of changes:
This change allows Autopilot customers to now provide a sample weight column when creating an Autopilot job with ENSEMBLING mode only. If specified, this column name indicates which column of the dataset should be treated as sample weights for use by the objective metric during the training, evaluation, and the selection of the best model.

Testing done:

  • Ran all unit tests and ensured they pass.
  • Modified unit tests to account for the new optional field
  • Conducted a manual test by creating, via the locally updated Python SDK, an autopilot job with sample weight and verified in the Autopilot backend that the job was successfully created and that the sample weights were used.

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
  • [n/a] I have passed the region in to all S3 and STS clients that I've initialized as part of this change.
  • 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.

@cbechir cbechir requested a review from a team as a code owner May 3, 2023 13:17
@cbechir cbechir requested review from mufaddal-rohawala and removed request for a team May 3, 2023 13:17
@cbechir cbechir changed the title feature: support for Sample Weights for SageMaker Flintstone (Autopilot) feature: support for Sample Weights for SageMaker Autopilot (Autopilot) May 3, 2023
@cbechir cbechir changed the title feature: support for Sample Weights for SageMaker Autopilot (Autopilot) feature: support for Sample Weights for SageMaker Autopilot (Flintstone) May 3, 2023
@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@codecov-commenter
Copy link

codecov-commenter commented May 3, 2023

Codecov Report

Merging #3833 (c19c209) into master (4ca7d41) will decrease coverage by 0.75%.
The diff coverage is 72.72%.

@@            Coverage Diff             @@
##           master    #3833      +/-   ##
==========================================
- Coverage   89.89%   89.14%   -0.75%     
==========================================
  Files        1060      247     -813     
  Lines      101188    25050   -76138     
==========================================
- Hits        90961    22331   -68630     
+ Misses      10227     2719    -7508     
Impacted Files Coverage Δ
src/sagemaker/session.py 78.22% <ø> (ø)
src/sagemaker/automl/automl.py 89.96% <62.50%> (ø)
src/sagemaker/remote_function/client.py 96.86% <100.00%> (ø)

... and 1304 files with indirect coverage changes

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

self,
inputs,
target_attribute_name,
sample_weight_attribute_name=None,
Copy link
Member

Choose a reason for hiding this comment

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

Generally its not recommended to have a new argument added in the middle for backwards compatibility reasons as it can break the existing code of our customers using this functionality without keyword arguments, can we move this argument to the end?

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

@mufaddal-rohawala
Copy link
Member

closing as this was merged as part of - #3835

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.

4 participants