zama-ai / concrete-ml

Concrete ML: Privacy Preserving ML framework built on top of Concrete, with bindings to traditional ML frameworks.
Other
851 stars 122 forks source link

fix: dynamic import of `transformers` in hybrid model #762

Closed fd0r closed 1 week ago

fd0r commented 1 week ago

We currently have an import to transformers in the hybrid model source code but we don't have the library as a requirement, only a development dependency.

Importing the library dynamically should fix this.

jfrery commented 1 week ago

Hmm we should have another model tested in the hybrid model to fix coverage

fd0r commented 1 week ago

Hmm we should have another model tested in the hybrid model to fix coverage

We would need to somehow modify dynamically the running python env to not use the transformers library.

I'll do a quick check to see if this is easy to implement but otherwise I'll just use a pragma no cover

github-actions[bot] commented 1 week ago

Coverage passed ✅

Coverage details

``` ---------- coverage: platform linux, python 3.8.18-final-0 ----------- Name Stmts Miss Cover Missing ------------------------------------- TOTAL 7886 0 100% 60 files skipped due to complete coverage. ```

andrei-stoian-zama commented 1 week ago

We decided to move the Conv1d stuff to the use case, we can close this PR, but thanks for the quick response