Skip to content

change: make v2 migration script add py_version when needed #1598

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

Closed
wants to merge 1 commit into from

Conversation

metrizable
Copy link
Contributor

Issue #, if available: #1465

Description of changes:

  • modifies ast nodes if they are calls to framework or model constructors without either py_version or image/image_name

note: similar logic will be extended in a subsequent PR to framework_version regarding image/image_name

Testing done:

unit:

% tox --parallel 4 tests/unit
✔ OK black-format in 8.171 seconds
✔ OK twine in 13.687 seconds
✔ OK flake8 in 26.562 seconds
✔ OK pylint in 39.273 seconds
✔ OK doc8 in 33.231 seconds
✔ OK py36 in 47.818 seconds
✔ OK py37 in 46.684 seconds
✔ OK py38 in 33.758 seconds
✔ OK sphinx in 1 minute, 58.018 seconds
✔ OK py27 in 2 minutes, 17.254 seconds

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 used the commit message format described in CONTRIBUTING
  • I have passed the region in to any/all 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 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.

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

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

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

Comment on lines +114 to +130
def test_node_should_be_modified_fw_constructor_no_version(constructors_no_version):
_test_modified(constructors_no_version, should_be=True)


def test_node_should_be_modified_fw_constructor_with_version(constructors_with_version):
_test_modified(constructors_with_version, should_be=False)


def test_node_should_be_modified_fw_constructor_with_image_name(constructors_with_image_name):
_test_modified(constructors_with_image_name, should_be=False)


def test_node_should_be_modified_fw_constructor_with_image(constructors_with_image):
_test_modified(constructors_with_image, should_be=False)


def test_node_should_be_modified_fw_constructor_not_needed(constructors_version_not_needed):
Copy link
Contributor

Choose a reason for hiding this comment

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

it doesn't seem like any of these fixtures are used in multiple tests, so I'm not sure what the benefit is to defining fixtures for them rather than just creating the iterable in the test directly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i was envisioning using them with framework_version tests in a separate pr.

Copy link
Contributor

Choose a reason for hiding this comment

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

gotcha - that makes sense!

@sagemaker-bot
Copy link
Collaborator

AWS CodeBuild CI Report

  • CodeBuild project: sagemaker-python-sdk-notebook-tests
  • Commit ID: af2b6d5
  • 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-zwei-pr
  • Commit ID: af2b6d5
  • 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-local-mode-tests
  • Commit ID: af2b6d5
  • Result: FAILED
  • Build Logs (available for 30 days)

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

@metrizable metrizable closed this Jun 17, 2020
@metrizable metrizable deleted the populate-py-version branch June 18, 2020 19:05
pintaoz-aws pushed a commit that referenced this pull request Dec 4, 2024
pintaoz-aws pushed a commit that referenced this pull request Dec 4, 2024
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.

3 participants