Skip to content

Commit fc8bdcd

Browse files
mathieuroquesjmsquareandreybavtluca-martialInokinoki
authored
Update README.md (#1310)
* Update README.md Numbers for Table of Content * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Add files via upload * Add files via upload * Update README.md * Update README.md * Update README.md * Update README.md * small typos * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Add files via upload * Delete scan_example.gif * Delete Screen_scan_cut.gif * Add files via upload * Delete scan_example.gif * Add files via upload * Delete scan_example.gif * Add files via upload * Add files via upload * Update README.md * Update README.md * Add files via upload * Update README.md * Delete architechture_giskard.png * Add files via upload * Delete architechture_giskard.png * Add files via upload * update build badge * clarify server section * edit premium offering * edit server instructions * edit faq section * Update README.md badge to show status of `build_backend.yml` --------- Co-authored-by: Jean-Marie John-Mathews <jeanmarie.johnmathews@sciencespo.fr> Co-authored-by: Andrey Avtomonov <andreybavt@gmail.com> Co-authored-by: Luca Martial <48870843+luca-martial@users.noreply.github.com> Co-authored-by: lucamartial <luca@giskard.ai> Co-authored-by: Inoki <weixuan@giskard.ai>
1 parent dd16b80 commit fc8bdcd

4 files changed

Lines changed: 132 additions & 79 deletions

File tree

README.md

Lines changed: 132 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
<a href="https://github.com/Giskard-AI/giskard/blob/main/LICENSE">
1212
<img alt="GitHub" src="https://img.shields.io/badge/License-Apache_2.0-blue.svg">
1313
</a>
14-
<a href="https://github.com/Giskard-AI/giskard/actions/workflows/build.yml?query=branch%3Amain">
15-
<img alt="build" src="https://github.com/Giskard-AI/giskard/actions/workflows/build.yml/badge.svg?branch=main"/>
14+
<a href="https://github.com/Giskard-AI/giskard/actions/workflows/build_backend.yml?query=branch%3Amain">
15+
<img alt="build" src="https://github.com/Giskard-AI/giskard/actions/workflows/build_backend.yml/badge.svg?branch=main"/>
1616
</a>
1717
<a href="https://sonarcloud.io/summary/new_code?id=giskard">
1818
<img alt="build" src="https://sonarcloud.io/api/project_badges/measure?project=giskard&metric=alert_status"/>
@@ -31,72 +31,59 @@
3131
</h3>
3232
<br />
3333

34-
## Table of contents
35-
* 🐢 **[Why Giskard?](#why-giskard)**
36-
* 📗 **[Getting started](#getting-started)**
37-
- [Install our Python library and testing server](#installation)
38-
- [Scan your model to detect vulnerabilities](#scan-your-model-to-detect-vulnerabilities)
39-
- [Automatically generate a test suite](#automatically-generate-a-test-suite-based-on-the-scan-results)
40-
- [Upload your test suite to the Giskard server](#upload-your-test-suite-to-the-giskard-server)
41-
* 👋 **[How to contribute](#how-to-contribute)**
42-
* 💖 **[Like what we're doing?](#like-what-were-doing)**
43-
44-
45-
## Why Giskard?
46-
**Giskard is an open-source testing framework dedicated to ML models, from tabular models to LLMs.**
47-
48-
Testing Machine Learning applications can be tedious. Since ML models depend on data, testing scenarios depend on the domain specificities and are often infinite.
34+
## Install Giskard 🐢
35+
You can install the latest version of Giskard from PyPi using pip :
36+
```sh
37+
pip install "giskard[server]>=2.0.0b" -U
38+
```
39+
We officially support Python 3.8, 3.9 and 3.10.
40+
## Try in Colab 📙
41+
[Open Colab notebook](https://colab.research.google.com/github/giskard-ai/giskard/blob/main/python-client/docs/getting-started/quickstart.ipynb)
4942

50-
<p align="center">
51-
<strong>Where to start testing? Which tests to implement? What issues to cover? How to implement the tests?</strong>
52-
</p>
43+
______________________________________________________________________
5344

5445
<p align="center">
55-
<img src="https://giskard.readthedocs.io/en/latest/_images/hey.png" alt="hey" width="20%">
46+
<img src="readme/architechture_giskard.png" alt="Giskard Architechture" width="800">
5647
</p>
5748

58-
At Giskard, we believe that Machine Learning needs its own testing framework. Created by ML engineers for ML engineers, Giskard enables you to:
49+
Giskard is a Python library that uses a variety of techniques to **detect vulnerabilities**, including:
5950

60-
- **Scan your model to find dozens of hidden vulnerabilities**: The Giskard scan automatically detects vulnerability issues such as performance bias, data leakage, unrobustness, spurious correlation, overconfidence, underconfidence, unethical issue, etc.
51+
- **Data slicing and transformation**: Giskard can automatically generate different data slices and transformations to test the robustness of your model.
52+
- **Statistical analysis**: Giskard can use statistical analysis to identify patterns and relationships in your data that could indicate a vulnerability.
6153

54+
It's a powerful tool that helps data scientists **save time and effort** drilling down on model issues, and produce more **reliable and trustworthy models**.
55+
6256
<p align="center">
63-
<img src="readme/scan_example.png" alt="Scan Example" width="700px">
57+
<img src="readme/scan_example.gif" alt="Scan Example" width="800">
6458
</p>
6559

66-
- **Instantaneously generate domain-specific tests**: Giskard automatically generates relevant tests based on the vulnerabilities detected by the scan. You can easily customize the tests depending on your use case by defining domain-specific data slicers and transformers as fixtures of your test suites.
60+
Instantaneously generate test suites for your models ⤵️
6761

6862
<p align="center">
69-
<img src="readme/test_suite_example.png" alt="Scan Example" width="700px">
63+
<img src="readme/suite_example.png" alt="Test Suite Example" width="800">
7064
</p>
7165

72-
- **Leverage the Quality Assurance best practices of the open-source community**: The Giskard catalog enables you to easily contribute and load data slicing & transformation functions such as AI-based detectors (toxicity, hate, etc.), generators (typos, paraphraser, etc.), or evaluators. Inspired by the Hugging Face philosophy, the aim of Giskard is to become the open-source hub of ML Quality Assurance.
7366

74-
<p align="center">
75-
<img src="readme/catalog_example.png" alt="Scan Example" width="700px">
76-
</p>
67+
Giskard works with any model, any environment and integrates seamlessly with your favorite tools ⤵️ <br/>
7768

78-
And of course, Giskard works with any model, any environment and integrates seamlessly with your favorite tools ⤵️ <br/>
7969
<p align="center">
8070
<img width='600' src="readme/tools.png">
8171
</p>
8272
<br/>
8373

8474

75+
# Contents
8576

86-
## Getting started
87-
88-
### Installation
89-
```sh
90-
pip install "giskard[server]>=2.0.0b" -U
91-
92-
giskard server start
93-
```
77+
1. 🤸‍♀️ **[Quickstart](#%EF%B8%8F-quickstart)**
78+
2. ⭐️ **[Premium features](#%EF%B8%8F-premium-features)**
79+
3.**[FAQ](#-faq)**
80+
4. 👋 **[Community](#-community)**
9481

95-
That's it. Access at http://localhost:19000
9682

97-
### Scan your model to detect vulnerabilities
83+
# 🤸‍♀️ Quickstart
9884

99-
After having wrapped your [model](https://docs.giskard.ai/en/latest/guides/wrap_model/index.html) & [dataset](https://docs.giskard.ai/en/latest/guides/wrap_dataset/index.html), you can scan your model for vulnerabilities using:
85+
## 1. 🔎 Scan your model
86+
Here's an example of Giskard scan on the famous titanic survival prediction dataset:
10087

10188
```python
10289
import giskard
@@ -105,7 +92,7 @@ import giskard
10592
df = giskard.demo.titanic_df()
10693
demo_demo_data_processing_function, demo_sklearn_model = giskard.demo.titanic_pipeline()
10794

108-
# Wrap your Pandas DataFrame with Giskard.Dataset (test set, a golden dataset, etc.). Check the dedicated doc page: https://docs.giskard.ai/en/latest/guides/wrap_dataset/index.html
95+
# Wrap your Pandas DataFrame with Giskard.Dataset (test set, a golden dataset, etc.).
10996
giskard_dataset = giskard.Dataset(
11097
df=df, # A pandas.DataFrame that contains the raw data (before all the pre-processing steps) and the actual ground truth variable (target).
11198
target="Survived", # Ground truth variable
@@ -122,74 +109,140 @@ def prediction_function(df):
122109
return demo_sklearn_model.predict_proba(preprocessed_df)
123110

124111
giskard_model = giskard.Model(
125-
model=prediction_function, # A prediction function that encapsulates all the data pre-processing steps and that could be executed with the dataset used by the scan.
112+
model=demo_model, # A prediction function that encapsulates all the data pre-processing steps and that could be executed with the dataset used by the scan.
126113
model_type="classification", # Either regression, classification or text_generation.
127114
name="Titanic model", # Optional
128115
classification_labels=demo_sklearn_model.classes_, # Their order MUST be identical to the prediction_function's output order
129116
feature_names=['PassengerId', 'Pclass', 'Name', 'Sex', 'Age', 'SibSp', 'Parch', 'Fare', 'Embarked'], # Default: all columns of your dataset
130-
# classification_threshold=0.5, # Default: 0.5
131117
)
132118

133-
# Then apply the scan
134-
results = giskard.scan(giskard_model, giskard_dataset)
135119
```
136120

121+
✨✨✨Then run giskard's magical scan✨✨✨
122+
```python
123+
results = giskard.scan(giskard_model, giskard_dataset)
124+
```
137125
Once the scan completes, you can display the results directly in your notebook:
138126

139127
```python
140-
display(scan_results) # in your notebook
128+
display(scan_results)
141129
```
130+
*If you're facing issues, check out our wrapping [model](https://docs.giskard.ai/en/latest/guides/wrap_model/index.html) & [dataset](https://docs.giskard.ai/en/latest/guides/wrap_dataset/index.html) docs for more information.*
131+
## 2. 🪄 Automatically generate a test suite
142132

143-
### Automatically generate a test suite based on the scan results
144-
145-
If the scan found potential issues in your model, you can automatically generate a test suite.
146-
147-
Generating a test suite from your scan results will enable you to:
148-
- Turn the issues you found into actionable tests that you can directly integrate in your CI/CD pipeline
149-
- Diagnose your vulnerabilities and debug the issues you found in the scan
133+
If the scan found potential issues in your model, you can automatically generate a **test suite** based on the vulnerabilities found:
150134

151135
```python
152136
test_suite = scan_results.generate_test_suite("My first test suite")
153-
154-
# You can run the test suite locally to verify that it reproduces the issues
137+
```
138+
You can then run the test suite locally to verify that it reproduces the issues:
139+
```python
155140
test_suite.run()
156141
```
157142

158-
### Upload your test suite to the Giskard server
143+
Test suites are reusable objects that provide a way to apply consistent checks on your models. To drill down on failing tests and get even more out of the giskard library, we recommend heading over to the Giskard server ⤵️
159144

160-
You can then upload the test suite to the local Giskard server. This will enable you to:
161-
- Compare the quality of different models to decide which one to promote
162-
- Debug your tests to diagnose the identified issues
163-
- Create more domain-specific tests relevant to your use case
164-
- Share results, and collaborate with your team to integrate business feedback
145+
# ⭐️ Premium Features
165146

166-
First, install the Giskard server by following [this documentation](https://docs.giskard.ai/en/latest/guides/installation_app/index.html)
147+
The Giskard server is Giskard's premium offering. It provides a number of additional capabilities that are not available in the open-source version of Giskard, including:
167148

168-
```python
169-
# Create a Giskard client after having installed the Giskard server (see documentation)
170-
token = "API_TOKEN" # Find it in Settings in the Giskard server
171-
client = GiskardClient(
172-
url="http://localhost:19000", token=token # URL of your Giskard instance
173-
)
149+
- **Advanced test generation**: This includes the ability to to diagnose failing tests, debug your models and create more domain-specific tests.
150+
- **Model comparison**: This includes the ability to compare models in order to decide which one to promote,
151+
- **Test hub**: This includes a place to gather all of your team's tests in one place to collaborate more efficiently.
152+
- **Business feedback**: This includes the ability to share your results and collect business feedback from your team.
174153

175-
my_project = client.create_project("my_project", "PROJECT_NAME", "DESCRIPTION")
154+
If you are interested in learning more about Giskard's premium offering, please [contact us](https://www.giskard.ai/contact).
176155

177-
# Upload to the current project
178-
test_suite.upload(client, "my_project")
156+
<p align="center">
157+
<img src="readme/catalog_example.png" alt="Scan Example" width="700px">
158+
</p>
159+
160+
## 1. Start the Giskard server
179161

162+
To start the **Giskard server**, run the following command:
163+
```sh
164+
giskard server start
180165
```
166+
167+
🚀 That's it! Access it at http://localhost:19000
168+
169+
## 2. Upload your test suite to the Giskard server
170+
171+
You can then **upload the test suite** created using the `giskard` Python library to the Giskard server. This will enable you to:
172+
- Compare the quality of different models to decide which one to promote
173+
- Debug your tests to diagnose identified vulnerabilities
174+
- Create more domain-specific tests relevant to your use-case
175+
- Share results, and collaborate with your team to integrate business feedback
176+
177+
1. First, make sure Giskard server is installed
178+
<details>
179+
<summary>How to check if the Giskard server is running</summary>
180+
181+
- check if http://localhost:19000 is running
182+
- or use `giskard server status`
183+
</details>
184+
185+
2. Then execute the ML worker in your notebook:
186+
```python
187+
!giskard worker start -d -k YOUR_TOKEN
188+
```
189+
190+
3. Finally upload your test suite to the giskard server using the following code:
191+
```python
192+
token = "API_TOKEN" # Find it in Settings in the Giskard server
193+
client = GiskardClient(
194+
url="http://localhost:19000", token=token # URL of your Giskard instance
195+
)
181196

182-
For more information on uploading to your local Giskard server, go to the [Upload an object to the Giskard server](https://docs.giskard.ai/en/latest/guides/upload/index.html) page.
197+
my_project = client.create_project("my_project", "PROJECT_NAME", "DESCRIPTION")
198+
199+
# Upload to the current project
200+
test_suite.upload(client, "my_project")
201+
```
183202

184-
## How to contribute
185-
We welcome contributions from the Machine Learning community!
203+
# ❓ Where can I get more help?
186204

187-
Read this [guide](CONTRIBUTING.md) to get started.
188205

189-
<br />
206+
<details>
207+
<summary>What is a ML worker?</summary>
208+
209+
Giskard executes your model using a worker that runs the model directly in your Python environment containing all the dependencies required by your model. You can either execute the ML worker from a local notebook, a Colab notebook or a terminal.
210+
</details>
211+
212+
<details>
213+
<summary>How to get the API key</summary>
214+
215+
Access the API key in the Settings tab of the Giskard server.
216+
</details>
217+
218+
<details>
219+
<summary>If Giskard server/ML worker is not installed</summary>
220+
221+
Go to the [Run the Giskard Server](https://docs.giskard.ai/en/latest/guides/installation_app/index.html) page.
222+
</details>
223+
224+
<details>
225+
<summary>If Giskard server is installed on an external server</summary>
190226

191-
## Like what we're doing?
227+
```python
228+
!giskard worker start -d -k YOUR_TOKEN -u http://ec2-13-50-XXXX.compute.amazonaws.com:19000/
229+
```
230+
</details>
231+
232+
<details>
233+
<summary>For more information on uploading to your local Giskard server</summary>
234+
235+
Go to the [Upload an object to the Giskard server](https://docs.giskard.ai/en/latest/guides/upload/index.html) page.
236+
</details>
237+
238+
For any other questions and doubts, head over to our [Discord](https://gisk.ar/discord).
239+
240+
# 👋 Community
241+
We welcome contributions from the Machine Learning community! Read this [guide](CONTRIBUTING.md) to get started.
242+
243+
Join our thriving community on our Discord server : [join Discord server](https://gisk.ar/discord)
192244

193245
🌟 [Leave us a star](https://github.com/Giskard-AI/giskard), it helps the project to get discovered by others and keeps us motivated to build awesome open-source tools! 🌟
194246

195247
❤️ You can also [sponsor us](https://github.com/sponsors/Giskard-AI) on GitHub. With a monthly sponsor subscription, you can get a sponsor badge and get your bug reports prioritized. We also offer one-time sponsoring if you want us to get involved in a consulting project, run a workshop, or give a talk at your company.
248+

readme/architechture_giskard.png

1.59 MB
Loading

readme/scan_example.gif

2.05 MB
Loading

readme/suite_example.png

83.9 KB
Loading

0 commit comments

Comments
 (0)