Skip to content

Commit dd9e387

Browse files
authored
Merge pull request #6 from RobGeada/READMEandEVAL
Flesh out readme, add optional llm eval module
2 parents b86417a + cded0cd commit dd9e387

File tree

8 files changed

+460
-10
lines changed

8 files changed

+460
-10
lines changed

Dockerfile

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,22 @@
22

33
FROM registry.access.redhat.com/ubi8/python-311:latest
44

5+
ARG EXTRAS=""
6+
7+
58
WORKDIR /app
69

7-
COPY pyproject.toml poetry.lock* ./
10+
COPY pyproject.toml poetry.lock* README.md ./
11+
12+
813

914
USER root
10-
RUN pip install poetry==1.6.1 && \
11-
poetry export -f requirements.txt --without dev > requirements.txt && \
12-
pip install --no-cache-dir -r requirements.txt
15+
RUN pip install uv==0.6.16 && \
16+
uv pip install .[$EXTRAS]
1317
COPY . .
1418
USER 1001
1519
EXPOSE 4443
1620

17-
#CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "4443", "--ssl-keyfile", "/etc/tls/internal/tls.key", "--ssl-certfile", "/etc/tls/internal/tls.crt", "--log-level", "trace"]
18-
CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "4443", "--ssl-keyfile", "/etc/tls/internal/tls.key", "--ssl-certfile", "/etc/tls/internal/tls.crt"]
21+
22+
CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "8080"]
23+
#CMD ["uvicorn", "src.main:app", "--host", "0.0.0.0", "--port", "4443", "--ssl-keyfile", "/etc/tls/internal/tls.key", "--ssl-certfile", "/etc/tls/internal/tls.crt"]

README.md

Lines changed: 70 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,70 @@
1-
# trustyai-service-v2
1+
# TrustyAI Service
2+
3+
👋 The TrustyAI Service is intended to a hub for all kinds of Responsible AI workflows, such as
4+
explainability, drift, and Large Language Model (LLM) evaluation. Designed as a REST server wrapping
5+
a core Python library, the TrustyAI service is intended to be a tool that can operate in a local
6+
environment, a Jupyter Notebook, or in Kubernetes.
7+
8+
---
9+
## Native Algorithms
10+
### 📈Drift 📉
11+
- Fourier Maximum Mean Discrepancy (FourierMMD)
12+
- Jensen-Shannon
13+
- Approximate Kolmogorov–Smirnov Test
14+
- Kolmogorov–Smirnov Test (KS-Test)
15+
- Meanshift
16+
17+
### ⚖️ Fairness ⚖️
18+
- Statistical Parity Difference
19+
- Disparate Impact Ratio
20+
- Average Odds Ratio (WIP)
21+
- Average Predictive Value Difference (WIP)
22+
- Individual Consistency (WIP)
23+
24+
---
25+
## Imported Algorithms/Libraries
26+
### 🔬Explainability 🔬
27+
- [LIME](https://github.com/marcotcr/lime) (WIP)
28+
- [SHAP](https://github.com/shap/shap) (WIP)
29+
30+
### 📋 LLM Evaluation 📋
31+
- [LM-Evaluation-Harness](https://github.com/EleutherAI/lm-evaluation-harness/tree/main)
32+
33+
---
34+
## 📦 Building 📦
35+
### Locally (Without Eval Support)
36+
```bash
37+
uv pip install .
38+
````
39+
40+
### Locally (With Eval Support)
41+
```bash
42+
uv pip install .[eval]
43+
````
44+
45+
### Container (Without Eval Support)
46+
```bash
47+
podman build -t $IMAGE_NAME .
48+
````
49+
50+
### Container (With Eval Support)
51+
```bash
52+
podman build -t $IMAGE_NAME --build-arg EXTRAS=eval .
53+
````
54+
55+
56+
## 🏃Running 🏃‍♀️
57+
### Locally
58+
```bash
59+
uv run uvicorn src.main --host 0.0.0.0 --port 8080
60+
```
61+
62+
### Container
63+
```bash
64+
podman run -t $IMAGE_NAME -p 8080:8080 .
65+
```
66+
67+
---
68+
## ☎️ API ☎️
69+
When the service is running, visit [localhost:8080](localhost:8080/docs) to see the OpenAPI documentation!
70+

pyproject.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ dependencies = [
2020
"h5py>=3.13.0,<4",
2121
]
2222

23-
[dependency-groups]
23+
[project.optional-dependencies]
2424
dev = [
2525
"pytest>=7.4.2,<8",
2626
"isort>=5.12.0,<6",
@@ -29,6 +29,11 @@ dev = [
2929
"pytest-cov>=4.1.0,<5",
3030
"httpx>=0.25.0,<0.26",
3131
]
32+
eval = [
33+
"lm-eval[api]==0.4.4",
34+
"fastapi-utils>=0.8.0",
35+
"typing-inspect==0.9.0",
36+
]
3237

3338
[tool.hatch.build.targets.sdist]
3439
include = ["src"]

src/endpoints/__init__.py

Whitespace-only changes.

src/endpoints/evaluation/__init__.py

Whitespace-only changes.

0 commit comments

Comments
 (0)