Skip to content

fix: Fixing type hints for Spark processor that has instance type/count params in reverse order #3444

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

Merged

Conversation

ivan-khvostishkov
Copy link
Contributor

Issue #, if available:
#3167

Description of changes:

SparkProcessor and SparkJarProcessor, unlike all other processors, have instance_type and instance_count in constructor in reverse order. When the type hints were added in #3167, they were probably copy-pasted from other processors, hence str and int type hints got assigned in reverse order by mistake.

This is the fix to get correct type hints only, without changing the order of parameters and without breaking the backward compatibility.

Testing done:
Yes

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 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.

Copy link
Member

@mufaddal-rohawala mufaddal-rohawala left a comment

Choose a reason for hiding this comment

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

/bot run all

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-slow-tests
  • Commit ID: 296cd0d
  • 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-unit-tests
  • Commit ID: 296cd0d
  • 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 Nov 16, 2022

Codecov Report

Merging #3444 (296cd0d) into master (96e417f) will decrease coverage by 0.84%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3444      +/-   ##
==========================================
- Coverage   89.67%   88.82%   -0.85%     
==========================================
  Files         872      205     -667     
  Lines       78136    19300   -58836     
==========================================
- Hits        70067    17143   -52924     
+ Misses       8069     2157    -5912     
Impacted Files Coverage Δ
src/sagemaker/spark/processing.py 98.62% <ø> (ø)
...hon3.8/site-packages/sagemaker/pytorch/defaults.py
...thon3.8/site-packages/sagemaker/lineage/context.py
...3.7/site-packages/sagemaker/tensorflow/defaults.py
...n3.8/site-packages/sagemaker/workflow/functions.py
...9/site-packages/sagemaker/huggingface/estimator.py
...maker/cli/compatibility/v2/modifiers/predictors.py
.../sagemaker/cli/compatibility/v2/modifiers/serde.py
...python3.7/site-packages/sagemaker/lambda_helper.py
...gemaker/cli/compatibility/v2/modifiers/matching.py
... and 1068 more

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

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-local-mode-tests
  • Commit ID: 296cd0d
  • 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: 296cd0d
  • 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: 296cd0d
  • Result: SUCCEEDED
  • Build Logs (available for 30 days)

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

@vikas0203 vikas0203 requested review from a team, navinsoni and trajanikant and removed request for a team November 23, 2022 20:25
@navinsoni navinsoni force-pushed the spark-processor-type-hint-fix branch from 296cd0d to cd2a305 Compare December 1, 2022 22:01
@navinsoni navinsoni changed the title Fixing type hints for Spark processor that has instance type/count params in reverse order fix: Fixing type hints for Spark processor that has instance type/count params in reverse order Dec 2, 2022
@navinsoni navinsoni merged commit 6128618 into aws:master Dec 2, 2022
mizanfiu pushed a commit to mizanfiu/sagemaker-python-sdk that referenced this pull request Dec 13, 2022
JoseJuan98 pushed a commit to JoseJuan98/sagemaker-python-sdk that referenced this pull request Mar 4, 2023
nmadan pushed a commit to nmadan/sagemaker-python-sdk that referenced this pull request Apr 18, 2023
nmadan pushed a commit to nmadan/sagemaker-python-sdk that referenced this pull request Apr 18, 2023
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.

5 participants