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

feat: Reduce time between status checks for images. #94

Merged
merged 1 commit into from
Dec 11, 2023

Conversation

georgkoester
Copy link
Contributor

Specifically in redact_folder, adjust status check time for images, which can be done in 1.5-4s.

Copy link
Contributor

@radmiratbrighterai radmiratbrighterai left a comment

Choose a reason for hiding this comment

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

@georgkoester tested it, it works:

## usual main
(venv) () redact-client 2023-10-02 10:46:06 😎> redact_folder v4 --input-dir="downloads/images" --input-type=images --output-type=images --service=blur --api-key=<api_key> --redact-url=http://newdelhi.bai:1231 --output-dir=/home/ra/git/brighter/redact-client/results/
2023-10-02 10:46:32,415 | INFO | Anonymize files from /home/ra/git/brighter/redact-client/downloads/images ...
2023-10-02 10:46:32,415 | INFO | Found 10 images to process
2023-10-02 10:46:32,415 | INFO | Starting 1 parallel jobs to anonymize files ...
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [01:52<00:00, 11.23s/it]
2023-10-02 10:48:24,682 | INFO | Summary: 10 successful, 0 warnings, 0 failed in 112.3s (00:01:52) 
(venv) () redact-client 2023-10-02 10:48:24 😎> 

## parallel main
(venv) () redact-client 2023-10-02 10:50:42 😎> rredact_folder v4 --input-dir="downloads/images" --input-type=images --output-type=images --service=blur --api-key=<api_key> --redact-url=http://newdelhi.bai:1231 --output-dir=/home/ra/git/brighter/redact-client/results/ --n-parallel-jobs=10
2023-10-02 10:51:12,235 | INFO | Anonymize files from /home/ra/git/brighter/redact-client/downloads/images ...
2023-10-02 10:51:12,235 | INFO | Found 10 images to process
2023-10-02 10:51:12,235 | INFO | Starting 10 parallel jobs to anonymize files ...
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [00:20<00:00,  2.07s/it]
2023-10-02 10:51:32,905 | INFO | Summary: 10 successful, 0 warnings, 0 failed in 20.7s (00:00:20) 
## waiting time reduced
(venv) () redact-client 2023-10-02 10:54:01 😎> rredact_folder v4 --input-dir="downloads/images" --input-type=images --output-type=images --service=blur --api-key=<api_key> --redact-url=http://newdelhi.bai:1231 --output-dir=/home/ra/git/brighter/redact-client/results/
2023-10-02 10:54:18,362 | INFO | Anonymize files from /home/ra/git/brighter/redact-client/downloads/images ...
2023-10-02 10:54:18,362 | INFO | Found 10 images to process
2023-10-02 10:54:18,362 | INFO | Starting 1 parallel jobs to anonymize files ...
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [01:01<00:00,  6.11s/it]
2023-10-02 10:55:19,490 | INFO | Summary: 10 successful, 0 warnings, 0 failed in 61.1s (00:01:01) 
(venv) () redact-client 2023-10-02 10:55:19 😎> 

## waiting time reduced parallel
(venv) () redact-client 2023-10-02 10:55:19 😎> rredact_folder v4 --input-dir="downloads/images" --input-type=images --output-type=images --service=blur --api-key=<api_key> --redact-url=http://newdelhi.bai:1231 --output-dir=/home/ra/git/brighter/redact-client/results/ --n-parallel-jobs=10
2023-10-02 10:56:45,351 | INFO | Anonymize files from /home/ra/git/brighter/redact-client/downloads/images ...
2023-10-02 10:56:45,352 | INFO | Found 10 images to process
2023-10-02 10:56:45,352 | INFO | Starting 10 parallel jobs to anonymize files ...
100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [00:17<00:00,  1.72s/it]
2023-10-02 10:57:02,606 | INFO | Summary: 10 successful, 0 warnings, 0 failed in 17.3s (00:00:17) 
(venv) () redact-client 2023-10-02 10:57:02 😎> 

just small request, could you please post PRs into the #core_review slack channel in the future?

@radmiratbrighterai
Copy link
Contributor

@georgkoester could you please also check the failing tests? seems like they are legitimate fails

@georgkoester
Copy link
Contributor Author

Thanks for the review @radmiratbrighterai !

Specifically in redact_folder, adjust status check time
for images, which can be done in 1.5-4s.
@georgkoester georgkoester force-pushed the lower-waiting-time-for-images branch from f9d2061 to 5ab0826 Compare December 11, 2023 10:07
@georgkoester georgkoester merged commit 29bae6a into main Dec 11, 2023
11 checks passed
@georgkoester georgkoester deleted the lower-waiting-time-for-images branch December 11, 2023 13:21
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.

2 participants