sagemaker-python-sdk icon indicating copy to clipboard operation
sagemaker-python-sdk copied to clipboard

feature: added _AnalysisConfigGenerator for clarify

Open dosatos opened this issue 1 year ago • 7 comments

Issue #, if available:

Description of changes:

  • Added _AnalysisConfigGenerator class to simplify maintainability of the config creation.
    • Also, with this generator, customers may reproduce the state of the config locally during debugging (i.e. without a need to opening it in the S3 bucket)
  • Simplified job_name creation part
  • Added a private method _last_analysis_config) to store last analysis_config used for a run (to be useful in case of debugging)
  • Extended the std out with the analysis config used for a run. Currently it already prints other values, like Job Name, Inputs, and Outputs:
Job Name:  Clarify-Bias-2022-07-22-09-00-31-294
Inputs:  [{...}]
Outputs:  [...}]

Testing done: Unit Tests

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

  • [x] I have read the CONTRIBUTING doc
  • [x] I certify that the changes I am introducing will be backword compatible, and I have discussed concerns about this, if any, with the Python SDK team
  • [x] I used the commit message format described in CONTRIBUTING
  • [ ] 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

  • [x] I have added tests that prove my fix is effective or that my feature works (if appropriate)
  • [x] I have added unit and/or integration tests as appropriate to ensure backward compatibility of the changes
  • [x] I have checked that my tests are not configured for a specific region or account (if appropriate)
  • [x] 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.

dosatos avatar Aug 01 '22 09:08 dosatos

Can you please add types?

Done, also created a backlog item to address this for the other/existing methods.

Can you please test a config including pre-post-explainability all at once? Can the generator synthetise the config for all the methods enabled + explainability?

So far there is no API to call for both Bias and Explainability at once. So I cannot. (Maybe I did not get the question?)

dosatos avatar Aug 03 '22 09:08 dosatos

weird, but analysis config supports having a job with explainability and bias at once, how is it that we can't do it with the SDK? or am I missing something?

larroy avatar Aug 04 '22 16:08 larroy

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 05 '22 19:08 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 05 '22 20:08 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 05 '22 20:08 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 05 '22 20:08 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 05 '22 20:08 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 11 '22 17:08 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 11 '22 17:08 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 11 '22 18:08 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 11 '22 18:08 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 11 '22 18:08 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 12 '22 10:08 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 12 '22 11:08 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 12 '22 11:08 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 12 '22 11:08 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 12 '22 11:08 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 12 '22 13:08 sagemaker-bot

Codecov Report

Merging #3271 (b50a44b) into master (284ddbe) will decrease coverage by 0.79%. The diff coverage is 97.67%.

@@            Coverage Diff             @@
##           master    #3271      +/-   ##
==========================================
- Coverage   89.82%   89.03%   -0.80%     
==========================================
  Files         645      203     -442     
  Lines       55518    18280   -37238     
==========================================
- Hits        49871    16276   -33595     
+ Misses       5647     2004    -3643     
Impacted Files Coverage Δ
src/sagemaker/clarify.py 95.52% <97.67%> (ø)
...python3.9/site-packages/sagemaker/xgboost/utils.py
...e-packages/sagemaker/automl/candidate_estimator.py
...n3.9/site-packages/sagemaker/wrangler/ingestion.py
...python3.7/site-packages/sagemaker/pytorch/model.py
...on3.8/site-packages/sagemaker/amazon/validation.py
...ite-packages/sagemaker/jumpstart/notebook_utils.py
.../sagemaker/huggingface/training_compiler/config.py
...thon3.7/site-packages/sagemaker/utilities/cache.py
.../cli/compatibility/v2/modifiers/training_params.py
... and 839 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

codecov-commenter avatar Aug 12 '22 13:08 codecov-commenter

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 12 '22 13:08 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 12 '22 13:08 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 12 '22 13:08 sagemaker-bot

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 12 '22 13:08 sagemaker-bot

PR check for serverless inference failing because of known backend issue, will override and merge this to unblock team.

shreyapandit avatar Aug 15 '22 23:08 shreyapandit

AWS CodeBuild CI Report

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

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

sagemaker-bot avatar Aug 16 '22 01:08 sagemaker-bot