-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix: allow processing users to run code in s3 #1167
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
fix: allow processing users to run code in s3 #1167
Conversation
Add validation and unit tests for Processing
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 |
code_url = urlparse(code) | ||
return os.path.basename(code_url.path) | ||
|
||
def _handle_user_code_url(self, code): |
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.
Did you mean to also validate that the s3 path is a directory and not a file? As it stands that validation only occurs for elif code_url.scheme == "" or code_url.scheme == "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.
Did you mean to also validate that the s3 path is a directory and not a file
Nope, keeping the validation just to the "local" case is intentional. We'd have to make a service call to S3 to validate this in the S3 case, since the S3 path is a prefix to a collection of objects, and the file / directory distinction doesn't exist in S3.
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
Co-Authored-By: Karim Nakad <karimnakad@gmail.com>
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 |
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 |
Issue #, if available:
#1163
Description of changes:
ScriptProcessor
and its inheriting classes to let users specify and run code in S3 to fix issue 1163.code
, SKLearn versions, whether the file exists.code
schemes and new validationScriptProcessor
directly rather than throughSKLearnProcessor
.SKLearnProcessor
tests test added behavior added for SKLearn.Testing done:
tox -- tests/unit/test_processing.py
code
pointing to code in S3 in the processing sklearn notebookMerge 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.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.