cpcdoy / rust-sbert

Rust port of sentence-transformers (https://github.com/UKPLab/sentence-transformers)
Apache License 2.0
106 stars 12 forks source link

Update style, dependencies, tests #18

Closed paulbricman closed 3 years ago

paulbricman commented 3 years ago
  1. Ran Prettier on all files to enforce style.
  2. Updated dependencies to match the torch environment used by the latest rust-bert 0.15.1 (i.e. the same libtorch version, tch-rs, rust-bert, etc.). Figured rust-sbert might want to stay in sync with rust-bert, more or less. This also makes it feasible to use both in the same project without different torch environments.
  3. When running the distiluse-... tests using the model downloaded using the instructions specified in the README, the test results would be slightly different, although really close. Maybe the tests were defined for a different version of that model? I tweaked them to match the model specified in the README.

:warning: I couldn't find the distilroberta-toxicity model used by the other tests in the online model directory, so I just ignored those.

paulbricman commented 3 years ago

I realized the tests were tailored for a model specified in the code, which is different than the one from the README conversion example. So I just reverted the tests for the checks to pass

paulbricman commented 3 years ago

Oops, I rushed with this one. I was tweaking this fork to match the torch environment with an unreleased version of rust-bert, so a bit too soon.