Skip to content
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

Allow output_path to be a s3 path #83

Merged
merged 1 commit into from
May 19, 2021
Merged

Conversation

katxiao
Copy link
Contributor

@katxiao katxiao commented May 17, 2021

If the user passes output_path as an s3_path (s3://<bucket-name>/path/to/dir), the results are stored in the corresponding path of the given bucket. If aws_key and aws_secret are provided, they will be used to authenticate the s3 requests.

✅ Ran with aws credentials and a private s3 bucket, and verified that the output file was uploaded.

Resolve #80

@katxiao katxiao requested a review from csala May 17, 2021 18:39
@katxiao katxiao linked an issue May 18, 2021 that may be closed by this pull request
if output_path:
scores.to_csv(output_path, index=False)

_write_output_to_csv(scores, output_path, aws_key, aws_secret)
Copy link
Contributor

Choose a reason for hiding this comment

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

After comments from #77 are addressed this can become a one line change to write_csv(scores, output_path)

Copy link
Contributor

@csala csala left a comment

Choose a reason for hiding this comment

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

Looks good!

@csala csala merged commit 21f2c72 into store-results-to-s3 May 19, 2021
@csala csala deleted the store-output-to-s3 branch May 19, 2021 18:28
@csala csala restored the store-output-to-s3 branch May 19, 2021 19:03
@csala csala deleted the store-output-to-s3 branch May 28, 2021 15:23
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.

Store SDGym results into an S3 bucket
2 participants