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

Add num_workers to audonnx.Model and load() #81

Merged
merged 2 commits into from
Dec 15, 2023
Merged

Conversation

audeerington
Copy link
Contributor

@audeerington audeerington commented Dec 15, 2023

Closes #80

This adds the num_workers argument to audonnx.Model and audonnx.load(). It now only uses 1 thread by default, whereas before onnxruntime chose the number by default.

The num_workers argument was also added to audonnx.testing.create_model().

image

image

image

@audeerington audeerington requested a review from hagenw December 15, 2023 09:07
Copy link

codecov bot commented Dec 15, 2023

Codecov Report

Merging #81 (b9140cd) into main (8ea3b90) will not change coverage.
The diff coverage is 100.0%.

Additional details and impacted files
Files Coverage Δ
audonnx/core/api.py 100.0% <ø> (ø)
audonnx/core/model.py 100.0% <100.0%> (ø)
audonnx/core/testing.py 100.0% <ø> (ø)

Copy link
Member

@hagenw hagenw left a comment

Choose a reason for hiding this comment

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

Great, thanks for adding this.

tests/test_model.py Outdated Show resolved Hide resolved
tests/test_model.py Outdated Show resolved Hide resolved
@hagenw
Copy link
Member

hagenw commented Dec 15, 2023

Could you update the description of the pull request and mention, that you also added the argument to audonnx.testing.create_model().

And the title of the pull request is slightly too long (commit messages should be <=50 chars), so maybe change it to "Add num_workers to audonnx.Model and load()".

Co-authored-by: Hagen Wierstorf <[email protected]>
@audeerington audeerington changed the title Add num_workers to audonnx.Model and audonnx.load() Add num_workers to audonnx.Model and load() Dec 15, 2023
Copy link
Member

@hagenw hagenw left a comment

Choose a reason for hiding this comment

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

Everything looks good now, feel free to merge.

@audeerington audeerington merged commit 7d0d42c into main Dec 15, 2023
9 checks passed
@audeerington audeerington deleted the limit_threads branch December 15, 2023 11:02
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.

Limit number of used threads when model is run on CPU
2 participants