-
Notifications
You must be signed in to change notification settings - Fork 72
infra: refactor toolkit tests. #56
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
Conversation
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
test-toolkit/conftest.py
Outdated
@@ -1,4 +1,4 @@ | |||
# Copyright 2019-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |||
# Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this because you copied from pytorch (training)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeap
test-toolkit/conftest.py
Outdated
parser.addoption('--region', default='us-west-2') | ||
parser.addoption('--framework-version', default=PyTorch.LATEST_VERSION) | ||
parser.addoption('--framework-version', default="1.4.0") | ||
parser.addoption('--py-version', choices=['2', '3'], default=str(sys.version_info.major)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we default to Python 3 since the Python 2 images weren't released?
test-toolkit/conftest.py
Outdated
parser.addoption('--instance-type') | ||
parser.addoption('--docker-base-name', default='pytorch') | ||
parser.addoption('--accelerator-type') | ||
parser.addoption('--docker-base-name', default='sagemaker-pytorch-training') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inference?
@@ -0,0 +1,10 @@ | |||
ARG region | |||
from 763104351884.dkr.ecr.$region.amazonaws.com/pytorch-inference:1.4.0-cpu-py3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: capitalize "FROM"
@@ -191,9 +190,6 @@ def save_model(model, model_dir): | |||
|
|||
|
|||
if __name__ == '__main__': | |||
# test opencv | |||
print(cv.__version__) | |||
|
|||
parser = argparse.ArgumentParser() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is all the training code in this file still needed?
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF | ||
# ANY KIND, either express or implied. See the License for the specific | ||
# language governing permissions and limitations under the License. | ||
# This file is intentionally left blank to utilize default_model_fn and default_predict_fn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd put a newline before line 13 just so that it's easier to tell there's a real comment after the license header. Also, maybe rename this file so that it's obvious it's empty.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bump
@@ -1,4 +1,4 @@ | |||
# Copyright 2019-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |||
# Copyright 2018-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
any particular reason why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the file was copied :)
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
test_loss, correct, len(test_loader.dataset), | ||
100. * correct / len(test_loader.dataset))) | ||
|
||
|
||
def model_fn(model_dir): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we actually need multiple copies now? (from a glance, the model_fn
s look the same across each "mnist" file?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't know why they were created. it happened for an unknown to me reason during the image split.
@@ -1,4 +1,4 @@ | |||
# Copyright 2019-2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. | |||
# Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: no need to change the copyright year 😂
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
print("HEY") | ||
print("HEY") | ||
print("HEY") | ||
print("HEY") | ||
print("HEY") | ||
print("HEY") | ||
print("HEY") | ||
print("HEY") | ||
print("HEY") | ||
print("HEY") | ||
print("HEY") | ||
print("HEY") | ||
print("HEY") | ||
print("HEY") | ||
print("HEY") | ||
print("HEY") | ||
print("HEY") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👋
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF | ||
# ANY KIND, either express or implied. See the License for the specific | ||
# language governing permissions and limitations under the License. | ||
# This file is intentionally left blank to utilize default_model_fn and default_predict_fn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bump
if accelerator_type is not None: | ||
predictor = pytorch.deploy(initial_instance_count=1, instance_type=instance_type, | ||
accelerator_type=accelerator_type, endpoint_name=endpoint_name) | ||
else: | ||
predictor = pytorch.deploy(initial_instance_count=1, instance_type=instance_type, | ||
endpoint_name=endpoint_name) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think deploy()
should do the right thing with accelerator_type=None
?
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Refactor toolkit tests from container tests:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.