Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto
python-client/docs/** linguist-documentation
docs/** linguist-documentation
9 changes: 2 additions & 7 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,13 @@

version: 2
updates:
- package-ecosystem: "gradle"
directory: "/backend"
schedule:
interval: "monthly"

- package-ecosystem: "npm"
directory: "/frontend"
directory: "/"
schedule:
interval: "monthly"

- package-ecosystem: "pip"
directory: "/python-client"
directory: "/"
schedule:
interval: "monthly"

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
python-version: ${{ matrix.python-version }}
cache: true

- name: Set up Pandoc (needed for python-client doc)
- name: Set up Pandoc (needed for doc)
uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: '3.1.7' # https://github.com/jgm/pandoc/releases
Expand All @@ -92,7 +92,7 @@ jobs:
if: ${{ github.event_name == 'pull_request' || inputs.use-cache }}
with:
path: ~/.giskard
key: ${{ matrix.os }}-${{ matrix.python-version }}-python-test-resources-${{ hashFiles('python-client/tests/fixtures/**/*py')}}
key: ${{ matrix.os }}-${{ matrix.python-version }}-python-test-resources-${{ hashFiles('tests/fixtures/**/*py')}}
restore-keys: ${{ matrix.os }}-${{ matrix.python-version }}-python-giskard-test-resources

- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ repos:
files: '^.*\.py$'
args:
- "--config"
- "python-client/pyproject.toml"
- "pyproject.toml"

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.0.272
Expand All @@ -15,6 +15,6 @@ repos:
files: '^.*\.py$'
args:
- "--config"
- "python-client/pyproject.toml"
- "pyproject.toml"
- "--fix"
- "--exit-non-zero-on-fix"
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ build:
jobs:
post_create_environment:
- pip install pdm
- pdm export -p python-client --without-hashes -G doc,server -o requirements-sphinx.txt
- pdm export --without-hashes -G doc,server -o requirements-sphinx.txt

sphinx:
configuration: python-client/docs/conf.py
configuration: docs/conf.py

python:
install:
Expand Down
6 changes: 3 additions & 3 deletions README.dev.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Giskard developer readme

🚧 **WORK IN PROGRESS** 🚧
🚧 **WORK IN PROGRESS** 🚧
This readme is in process of creation, some information can be subject to change

## Requirements
Expand All @@ -19,7 +19,7 @@ After running the command above there will be 3 modules running:
- backend
- ml-worker

> When running Giskard in "dev mode" (as above) there's an H2 database that's used instead of a real one, the default location of this H2 database is `$HOME/giskard-home/database`
> When running Giskard in "dev mode" (as above) there's an H2 database that's used instead of a real one, the default location of this H2 database is `$HOME/giskard-home/database`

To build the project use
```shell
Expand Down Expand Up @@ -58,7 +58,7 @@ docker-compose logs backend
## Python client
To install the latest version of python library `giskard` the following script can be used:
```shell
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Giskard-AI/giskard/main/python-client/scripts/install-giskard-client-dev.sh)"
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Giskard-AI/giskard/main/scripts/install-giskard-client-dev.sh)"
```
it will use the default `pip` available in the environment. To install `giskard` using a specific `pip` you can modify the command above, like
```shell
Expand Down
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
</p>
<h3 align="center">
<a href="https://docs.giskard.ai/en/latest/getting-started/quickstart.html"><b>Documentation</b></a> &bull;
<a href="https://www.giskard.ai/knowledge-categories/blog/?utm_source=github&utm_medium=github&utm_campaign=github_readme&utm_id=readmeblog"><b>Blog</b></a> &bull;
<a href="https://www.giskard.ai/knowledge-categories/blog/?utm_source=github&utm_medium=github&utm_campaign=github_readme&utm_id=readmeblog"><b>Blog</b></a> &bull;
<a href="https://www.giskard.ai/?utm_source=github&utm_medium=github&utm_campaign=github_readme&utm_id=readmeblog"><b>Website</b></a> &bull;
<a href="https://gisk.ar/discord"><b>Discord Community</b></a> &bull;
<a href="https://www.giskard.ai/about?utm_source=github&utm_medium=github&utm_campaign=github_readme&utm_id=readmeblog#advisors"><b>Advisors</b></a>
Expand All @@ -38,7 +38,7 @@ pip install "giskard[server]>=2.0.0b" -U
```
We officially support Python 3.8, 3.9, 3.10 and 3.11.
## Try in Colab 📙
[Open Colab notebook](https://colab.research.google.com/github/giskard-ai/giskard/blob/main/python-client/docs/getting-started/quickstart.ipynb)
[Open Colab notebook](https://colab.research.google.com/github/giskard-ai/giskard/blob/main/docs/getting-started/quickstart.ipynb)

______________________________________________________________________

Expand All @@ -49,7 +49,7 @@ ______________________________________________________________________
Giskard is a Python library that automatically **detects vulnerabilities** of AI models, from tabular models to LLM, including: performance biases, data leakage, spurious correlation, hallucination, toxicity, security issues and many more.

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**.

<p align="center">
<img src="readme/scan_example.gif" alt="Scan Example" width="800">
</p>
Expand Down Expand Up @@ -156,7 +156,7 @@ If you are interested in learning more about Giskard's premium offering, please

## 1. Start the Giskard server

To start the **Giskard server**, run the following command:
To start the **Giskard server**, run the following command:
```sh
giskard server start
```
Expand All @@ -171,10 +171,10 @@ You can then **upload the test suite** created using the `giskard` Python librar
- Create more domain-specific tests relevant to your use-case
- Share results, and collaborate with your team to integrate business feedback

1. First, make sure Giskard server is installed
1. First, make sure Giskard server is installed
<details>
<summary>How to check if the Giskard server is running</summary>

- check if http://localhost:19000 is running
- or use `giskard server status`
</details>
Expand All @@ -190,9 +190,9 @@ You can then **upload the test suite** created using the `giskard` Python librar
client = giskard.GiskardClient(
url="http://localhost:19000", key=key # URL of your Giskard instance
)

my_project = client.create_project("my_project", "PROJECT_NAME", "DESCRIPTION")

# Upload to the current project
test_suite.upload(client, "my_project")
```
Expand All @@ -203,12 +203,12 @@ You can then **upload the test suite** created using the `giskard` Python librar
<details>
<summary>What is a ML worker?</summary>

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.
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.
</details>

<details>
<summary>How to get the API key</summary>

Access the API key in the Settings tab of the Giskard server.
</details>

Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
## Building the docs locally (continuously)
```
cd giskard
./gradlew :python-client:sphinx-autobuild
pdm run watch-doc
```
12 changes: 6 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@
"top_of_page_button": "edit",
"source_repository": "https://github.com/Giskard-AI/giskard",
"source_branch": "main",
"source_directory": "python-client/docs/",
"source_edit_link": "https://github.com/Giskard-AI/giskard/edit/main/python-client/docs/{filename}",
"source_directory": "docs/",
"source_edit_link": "https://github.com/Giskard-AI/giskard/edit/main/docs/{filename}",
}

add_function_parentheses = False
Expand All @@ -121,8 +121,8 @@
.. raw:: html

<div class="open-in-colab__wrapper">
<a href="https://colab.research.google.com/github/giskard-ai/giskard/blob/""" + branch + """/python-client/docs/{{ env.doc2path(env.docname, base=None) }}" target="_blank"><img src="https://colab.research.google.com/assets/colab-badge.svg" style="display: inline; margin: 0" alt="Open In Colab"/></a>
<a href="https://github.com/giskard-ai/giskard/tree/""" + branch + """/python-client/docs/{{ env.doc2path(env.docname, base=None) }}" target="_blank"><img src="https://img.shields.io/badge/github-view%20source-black.svg" style="display: inline; margin: 0" alt="View Notebook on GitHub"/></a>
<a href="https://colab.research.google.com/github/giskard-ai/giskard/blob/""" + branch + """/docs/{{ env.doc2path(env.docname, base=None) }}" target="_blank"><img src="https://colab.research.google.com/assets/colab-badge.svg" style="display: inline; margin: 0" alt="Open In Colab"/></a>
<a href="https://github.com/giskard-ai/giskard/tree/""" + branch + """/docs/{{ env.doc2path(env.docname, base=None) }}" target="_blank"><img src="https://img.shields.io/badge/github-view%20source-black.svg" style="display: inline; margin: 0" alt="View Notebook on GitHub"/></a>
</div>
"""
# fmt: on
Expand Down Expand Up @@ -171,5 +171,5 @@ def linkcode_resolve(domain, info):
else:
linespec = ""

filename = fn.split("python-client", 1)[-1]
return f"https://github.com/Giskard-AI/giskard/blob/feature/ai-test-v2-merged/python-client{filename}{linespec}"
filename = fn.split("main", 1)[-1]
return f"https://github.com/Giskard-AI/giskard/blob/main/{filename}{linespec}"
4 changes: 2 additions & 2 deletions docs/guides/scan/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Scan your model to detect vulnerabilities
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
.. hint::

If you want to try this interactively, you can find a ready-to-use `notebook here <https://colab.research.google.com/github/giskard-ai/giskard/blob/main/python-client/docs/getting-started/quickstart.ipynb>`_.
If you want to try this interactively, you can find a ready-to-use `notebook here <https://colab.research.google.com/github/giskard-ai/giskard/blob/main/docs/getting-started/quickstart.ipynb>`_.

To scan your model, wrap first your `model <../wrap_model/index.md>`_ & `dataset <../wrap_dataset/index.md>`_:

Expand Down Expand Up @@ -117,7 +117,7 @@ You can then upload the test suite to the local Giskard server. This will enable

.. code-block:: python

# Uploading the test suite will automatically save the model, dataset, tests, slicing & transformation functions inside the Giskard server that you previously installed locally, or on your internal servers.
# Uploading the test suite will automatically save the model, dataset, tests, slicing & transformation functions inside the Giskard server that you previously installed locally, or on your internal servers.
# Create a Giskard client after having installed the Giskard server (see documentation)

from giskard import GiskardClient
Expand Down
6 changes: 3 additions & 3 deletions docs/tutorials/libraries/tensorflow/classification_tfhub.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ from giskard import Dataset, Model
```
## Wrap dataset
```python
data_filtered = pd.read_csv('https://raw.githubusercontent.com/Giskard-AI/giskard/python-client/tests/tensorflow/test_text_classification_tfhub.csv').dropna(axis=0)
data_filtered = pd.read_csv('https://raw.githubusercontent.com/Giskard-AI/giskard/main/tests/models/tensorflow/test_text_classification_tfhub.csv').dropna(axis=0)

classification_labels_mapping = {'REGULATION': 0, 'INTERNAL': 1, 'CALIFORNIA CRISIS': 2, 'INFLUENCE': 3}

Expand All @@ -22,8 +22,8 @@ x_train, x_test, y_train, y_test = model_selection.train_test_split(x, y,
test_df = pd.DataFrame(list(zip(list(x_test), list(y_test))), columns=["Content", "Target"])
```
```python
wrapped_dataset = Dataset(test_df.head(),
name="test dataset",
wrapped_dataset = Dataset(test_df.head(),
name="test dataset",
target="Target")
```
## Wrap model
Expand Down