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

🧵 Safer downloads #673

Merged
merged 3 commits into from
Aug 14, 2023
Merged

🧵 Safer downloads #673

merged 3 commits into from
Aug 14, 2023

Conversation

blaginin
Copy link
Collaborator

@blaginin blaginin commented Aug 1, 2023

This pull request changes the way files are downloaded. They are first downloaded as temporary files and then transferred to the targeted location. This prevents corrupted files from being stored if the download is terminated.

@blaginin blaginin mentioned this pull request Aug 1, 2023
@blaginin blaginin self-assigned this Aug 1, 2023
@blaginin blaginin added the enhancement New feature or request label Aug 1, 2023
@shaneahmed shaneahmed added this to the Release v1.5.0 milestone Aug 1, 2023
@codecov
Copy link

codecov bot commented Aug 1, 2023

Codecov Report

Merging #673 (1abc3a4) into develop (8615181) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff            @@
##           develop     #673   +/-   ##
========================================
  Coverage    99.85%   99.85%           
========================================
  Files           64       64           
  Lines         7371     7374    +3     
  Branches      1423     1423           
========================================
+ Hits          7360     7363    +3     
  Misses           4        4           
  Partials         7        7           
Files Changed Coverage Δ
tiatoolbox/utils/misc.py 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@blaginin blaginin marked this pull request as ready for review August 12, 2023 13:39
@shaneahmed shaneahmed merged commit a157833 into TissueImageAnalytics:develop Aug 14, 2023
7 checks passed
shaneahmed pushed a commit that referenced this pull request Aug 23, 2023
Adds the ability to run tests using several workers using [pytest-xdist](https://github.com/pytest-dev/pytest-xdist), significantly improving processing time. For example, on M1 Max (no CUDA), processing time dropped **from 14 minutes to 4 minutes 💨💨💨.**

<img width="1614" alt="image" src="https://github.com/TissueImageAnalytics/tiatoolbox/assets/19199204/fbb607b0-3bf1-48c3-b14a-be4acf2b1ec3">


However, this optimization comes at a cost. Previously, tests depended on serial execution. For example, segmentation and prediction methods used to rely on "output" as a folder to store intermediate results. If many functions modified this folder at the same time, the result would be unpredictable. To address this, I made some tweaks alongside #641 and #673 so that functions will not depend on each other.

If we merge this pull request, we will need to start checking that new tests are ready for parallel execution.

**Depends on #641 and #673
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants