huggingface / api-inference-community

Apache License 2.0
163 stars 61 forks source link

Integrate ThirdAI Library #425

Open dtr3 opened 4 months ago

dtr3 commented 4 months ago

Hello!

Overview

Looking to integrate the ThirdAI library for text and token classification

Details

ThirdAI is a model framework with native support for LSH sparse computations. Right now there are only a couple of models on huggingface but hope to have more in the future.

To the best of my knowledge I've followed the instructions in the README as well as this example thread for Setfit as a very helpful reference. Please let me know if there's anything else I should do from this point.

Questions

I am having trouble running tests locally (for all libraries) with the following errors:

For the malformed question tests: AssertionError: b'{"error":"404 Client Error. (Request ID: Root=1-665[174 chars]n."}' != b'{"error":"\'utf-8\' codec can\'t decode byte 0xc3 i[37 chars]te"}'

For the simple tests:

with TestClient(self.app) as client:
            response = client.post("/", json={"inputs": inputs})
>       self.assertEqual(
            response.status_code,
            200,
        )
E       AssertionError: 400 != 200

This is my first contribution so perhaps there is something obvious I am missing in the test setup maybe someone can point me in the right direction.

Related PR: https://github.com/huggingface/huggingface.js/pull/689

Thanks so much! -David

dtr3 commented 4 months ago

@osanseviero @Narsil Hello, sorry to bother you, would either of you know someone who might be able to take a look at this PR?