segment-any-text / wtpsplit

Toolkit to segment text into sentences or other semantic units in a robust, efficient and adaptable way.
MIT License
667 stars 39 forks source link

Update session create #68

Closed lvaughn closed 2 years ago

lvaughn commented 2 years ago

onnxruntime has deprecated creating a session without setting a provider at creation time (the latest version fails). This PR fixes the session creation.

bminixhofer commented 2 years ago

Thanks for this PR!

The only issue I have with this is that it changes the behavior slightly:

So to preserve old behavior, providers should be ["CUDAExecutionProvider", "CPUExecutionProvider"] if use_cuda=None, only the latter if it is false and only the former if it is true.

lvaughn commented 2 years ago

Thanks for the feedback. I've updated the PR to reflect it.

bminixhofer commented 2 years ago

Thanks! LGTM.