Skip to content

Commit 32ba413

Browse files
committed
update readme
1 parent ff85ff0 commit 32ba413

File tree

1 file changed

+45
-1
lines changed

1 file changed

+45
-1
lines changed

README.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,57 @@
11
# TorchDrift -- drift detection on PyTorch
22

3+
TorchDrift lets you monitor your PyTorch models to see if the data
4+
matches what it has been trained for. We focus on practical application
5+
and strive to seamlessly integrate with PyTorch.
36

7+
# Installation
8+
9+
To install the latest release version use
10+
11+
```
12+
pip install torchdrift
13+
```
14+
15+
To get the latest and greatest install from git with
16+
```
17+
pip install git+https://github.com/torchdrift/torchdrift/
18+
```
19+
20+
# Documentation
21+
22+
Our documentation is at [TorchDrift.org](https://torchdrift.org/).
23+
24+
# Examples
25+
26+
Check out [our worked example](https://torchdrift.org/notebooks/drift_detection_on_images.html) with an ImageNet-type classifier.
27+
28+
If you have a model (without head) as the feature extractor and a training dataloader you can fit the reference distribution as
29+
30+
```python
31+
drift_detector = torchdrift.detectors.KernelMMDDriftDetector()
32+
torchdrift.utils.fit(train_dataloader, feature_extractor, drift_detector)
33+
```
34+
35+
and then check drifts with
36+
37+
```python
38+
features = feature_extractor(inputs)
39+
score = drift_detector(features)
40+
p_val = drift_detector.compute_p_value(features)
41+
42+
if p_val < 0.01:
43+
raise RuntimeError("Drifted Inputs")
44+
```
45+
46+
Also check out our [deployment example](https://torchdrift.org/notebooks/deployment_monitoring_example.html) for integration of TorchDrift into
47+
inference with a model.
448

549
# Authors
650

751
TorchDrift is a joint project of Orobix Srl, Bergamo, Italy and
852
MathInf GmbH, Garching b. München, Germany.
953

10-
Authors: ...
54+
The TorchDrift Team: Thomas Viehmann, Luca Antiga, Daniele Cortinovis, Lisa Lozza
1155

1256
# Acknowledgements
1357

0 commit comments

Comments
 (0)