Skip to content

Delete the downloaded zip and folder in retrieve_dataset #2150

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

gaugup
Copy link
Contributor

@gaugup gaugup commented Jun 27, 2023

Description

Delete the downloaded zip and folder in retrieve_dataset

Checklist

  • I have added screenshots above for all UI changes.
  • I have added e2e tests for all UI changes.
  • Documentation was updated if it was needed.

Signed-off-by: Gaurav Gupta <gaugup@microsoft.com>
@codecov-commenter
Copy link

codecov-commenter commented Jun 27, 2023

Codecov Report

Attention: Patch coverage is 90.90909% with 1 line in your changes missing coverage. Please review.

Project coverage is 92.21%. Comparing base (4aa5fb0) to head (6537c28).
Report is 320 commits behind head on main.

Files with missing lines Patch % Lines
rai_test_utils/rai_test_utils/utilities/utils.py 90.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2150      +/-   ##
==========================================
+ Coverage   91.02%   92.21%   +1.19%     
==========================================
  Files         115      103      -12     
  Lines        6058     5141     -917     
==========================================
- Hits         5514     4741     -773     
+ Misses        544      400     -144     
Flag Coverage Δ
unittests 92.21% <90.90%> (+1.19%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

import uuid

DOWNLOADED_DATASET_DIR = 'datasets.4.27.2021'
Copy link
Contributor

Choose a reason for hiding this comment

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

That seems oddly specific. Isn't it going to change?

Copy link
Contributor

Choose a reason for hiding this comment

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

we use a specific zip folder with the date it was created for these datasets (that are put on our blob storage for tests)

Copy link
Contributor

Choose a reason for hiding this comment

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

Right, so if the dataset changes this need to be updated. How will we remember?

@@ -29,7 +32,7 @@ def retrieve_dataset(dataset, **kwargs):
:rtype: object
"""
# if data not extracted, download zip and extract
outdirname = 'datasets.4.27.2021'
outdirname = DOWNLOADED_DATASET_DIR
if not os.path.exists(outdirname):
Copy link
Contributor

Choose a reason for hiding this comment

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

if the dataset is downloaded we don't re-download it here... we just re-use the downloaded one

else:
raise Exception('Unrecognized file extension: ' + extension)

shutil.rmtree(outdirname)
Copy link
Contributor

Choose a reason for hiding this comment

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

won't this increase network calls and also chance tests fail due to networking issues? also I think this might increase test time a lot? we currently just re-use the downloaded file in all test cases instead of re-downloading it every time

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.

4 participants