Skip to content

Commit

Permalink
Merge branch 'main' into task/gsk-2701-add-documentation-advanced-scan
Browse files Browse the repository at this point in the history
  • Loading branch information
mattbit committed May 21, 2024
2 parents 984ced2 + a093292 commit c777f96
Show file tree
Hide file tree
Showing 119 changed files with 9,579 additions and 1,874 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ jobs:
pandas_v1: false
langchain_minimal: false
- python-version: "3.10"
os: macos-latest
os: macos-12
pydantic_v1: false
pandas_v1: false
langchain_minimal: false
Expand Down Expand Up @@ -144,7 +144,7 @@ jobs:
df -h
- name: Re-install lightgbm from sources for MacOS
if: ${{ matrix.os == 'macos-latest' }}
if: ${{ matrix.os == 'macos-12' }}
run: |
pdm run pip uninstall lightgbm -y
pdm run pip install --no-binary lightgbm lightgbm --config-settings=cmake.define.USE_OPENMP=OFF
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ jobs:

- name: "@slack Release process started"
id: slack
uses: slackapi/slack-github-action@v1.25.0
uses: slackapi/slack-github-action@v1.26.0
with:
channel-id: ${{ vars.SLACK_CHANNEL_ID }}
slack-message: |-
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/post-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
- name: "@slack Share release process completion"
# cancellable always() https://docs.github.com/en/actions/learn-github-actions/expressions#status-check-functions
if: ${{ !cancelled() }}
uses: slackapi/slack-github-action@v1.25.0
uses: slackapi/slack-github-action@v1.26.0
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
ON_SUCCESS: |-
Expand Down
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ An awesome feature request addresses the following points:

## Style guide

We use `black` to format the code and `isort` to sort the imports. You can automatically enforce this style using the pre-commit hooks. You can find the instructions to install the pre-commit hooks [here](https://docs.giskard.ai/en/latest/community/contribution_guidelines/dev-environment.html).
We use `black` to format the code and `isort` to sort the imports. You can automatically enforce this style using the
pre-commit hooks. You can find the instructions to install the pre-commit
hooks [here](https://docs.giskard.ai/en/stable/community/contribution_guidelines/dev-environment.html).

For documentation strings, Giskard follows the [numpydoc](https://numpydoc.readthedocs.io/en/latest/format.html#docstring-standard) style.

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

</div>
<h3 align="center">
<a href="https://docs.giskard.ai/en/latest/getting_started/index.html"><b>Docs</b></a> &bull;
<a href="https://docs.giskard.ai/en/stable/getting_started/index.html"><b>Docs</b></a> &bull;
<a href="https://www.giskard.ai/knowledge-categories/news/?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</b></a>
Expand Down
Binary file added docs/assets/scan_vision.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 5 additions & 5 deletions docs/assets/scan_widget.html
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
&lt;li&gt;Drift between your training set and test set&lt;/li&gt;
&lt;/ul&gt;
&lt;p class=&quot;mt-1&quot;&gt;
To learn more about causes and solutions, check our &lt;a href=&quot;https://docs.giskard.ai/en/latest/getting-started/key_vulnerabilities/performance_bias/index.html&quot; target=&quot;_blank&quot;&gt;guide on performance bias.&lt;/a&gt;
To learn more about causes and solutions, check our &lt;a href=&quot;https://docs.giskard.ai/en/stable/getting-started/key_vulnerabilities/performance_bias/index.html&quot; target=&quot;_blank&quot;&gt;guide on performance bias.&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
Expand Down Expand Up @@ -1129,7 +1129,7 @@
&lt;li&gt;Use of complex models with large number of parameters that tend to overfit the training data&lt;/li&gt;
&lt;/ul&gt;
&lt;p class=&quot;mt-1&quot;&gt;
To learn more about causes and solutions, check our &lt;a href=&quot;https://docs.giskard.ai/en/latest/getting-started/key_vulnerabilities/robustness/index.html&quot; target=&quot;_blank&quot;&gt;guide on robustness issues.&lt;/a&gt;
To learn more about causes and solutions, check our &lt;a href=&quot;https://docs.giskard.ai/en/stable/getting-started/key_vulnerabilities/robustness/index.html&quot; target=&quot;_blank&quot;&gt;guide on robustness issues.&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
Expand Down Expand Up @@ -1257,7 +1257,7 @@
class&lt;/li&gt;
&lt;/ul&gt;
&lt;p class=&quot;mt-1&quot;&gt;
To learn more about causes and solutions, check our &lt;a href=&quot;https://docs.giskard.ai/en/latest/getting-started/key_vulnerabilities/overconfidence/index.html&quot; target=&quot;_blank&quot;&gt;guide on overconfidence issues.&lt;/a&gt;
To learn more about causes and solutions, check our &lt;a href=&quot;https://docs.giskard.ai/en/stable/getting-started/key_vulnerabilities/overconfidence/index.html&quot; target=&quot;_blank&quot;&gt;guide on overconfidence issues.&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
Expand Down Expand Up @@ -2233,7 +2233,7 @@
&lt;li&gt;Data noise: the training set contains anomalies that are unrelated to the underlying problem (data collection, measurement biases, data preprocessing issues, etc.)&lt;/li&gt;
&lt;/ul&gt;
&lt;p class=&quot;mt-1&quot;&gt;
To learn more about causes and solutions, check our &lt;a href=&quot;https://docs.giskard.ai/en/latest/getting-started/key_vulnerabilities/spurious/index.html&quot; target=&quot;_blank&quot;&gt;guide on spurious correlation.&lt;/a&gt;
To learn more about causes and solutions, check our &lt;a href=&quot;https://docs.giskard.ai/en/stable/knowledge/key_vulnerabilities/spurious/index.html&quot; target=&quot;_blank&quot;&gt;guide on spurious correlation.&lt;/a&gt;
&lt;/p&gt;
&lt;/div&gt;
Expand Down Expand Up @@ -3026,4 +3026,4 @@
}), z = {}, window.jQuery !== d && q(window.jQuery), "function" == typeof define && define.amd ? define([], n) : "object" == (typeof module === "undefined" ? "undefined" : _typeof(module)) && "object" == _typeof(module.exports) && (module.exports = n()), window.iFrameResize = window.iFrameResize || n());
}();
(function(){iFrameResize({ checkOrigin: false }, '#scan-140417288606800');})();
</script>
</script>
2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@

autoclass_content = "both"

# autodoc_mock_imports = ["giskard.ml_worker.generated"]
autodoc_mock_imports = ["ragas", "langchain_core"]
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

Expand Down
6 changes: 1 addition & 5 deletions docs/getting_started/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ Testing Machine Learning applications can be tedious. Since AI models depend on

To help you solve these challenges, Giskard library helps to:

- **Scan your model to find hidden vulnerabilitie automatically**: The `giskard` scan automatically detects vulnerabilities
- **Scan your model to find hidden vulnerabilities automatically**: The `giskard` scan automatically detects vulnerabilities
such as performance bias, hallucination, prompt injection, data leakage, spurious correlation, overconfidence, etc.
<br><br>
<iframe src="https://htmlpreview.github.io/?https://gist.githubusercontent.com/AbSsEnT/a67354621807f3c3a332fca7d8b9a5c8/raw/588f027dc6b14c88c7393c50ff3086fe1122e2e9/LLM_QA_IPCC_scan_report.html" width="700" height="400"></iframe>
Expand Down Expand Up @@ -62,7 +62,3 @@ An Enterprise Hub for teams to collaborate on top of the open-source Giskard lib
- 馃挰 **Collect business feedback** and **share your model results** with data scientists, QA teams and auditors.
<br><br>
![](../assets/credit_scoring_comment.png)


Get started **now** with our [demo HuggingFace Space](https://huggingface.co/spaces/giskardai/giskard) or
by following [installation instructions](../getting_started/quickstart/index.md)! 馃悽
12 changes: 8 additions & 4 deletions docs/getting_started/quickstart/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,17 @@
quickstart_llm
quickstart_tabular
quickstart_nlp
quickstart_vision
```


:::::{grid} 1 1 2 2


::::{grid-item-card} <br/><h3>馃摎 LLM Quickstart</h3>
::::{grid-item-card} <br/><h3>馃摎 LLM Quickstart</h3>
:text-align: center
:link: quickstart_llm.ipynb
::::

::::{grid-item-card} <br/><h3>馃搳 Tabular Quickstart</h3>
::::{grid-item-card} <br/><h3>馃搳 Tabular Quickstart</h3>
:text-align: center
:link: quickstart_tabular.ipynb
::::
Expand All @@ -29,4 +28,9 @@ quickstart_nlp
:link: quickstart_nlp.ipynb
::::

::::{grid-item-card} <br/><h3>馃摳 Vision Quickstart</h3>
:text-align: center
:link: quickstart_vision.ipynb
::::

:::::
4 changes: 2 additions & 2 deletions docs/getting_started/quickstart/quickstart_llm.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -1191,7 +1191,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"If you are running in a notebook, you can display the scan report directly in the notebook using `display(...)`, otherwise you can export the report to an HTML file. Check the [API Reference](https://docs.giskard.ai/en/latest/reference/scan/report.html#giskard.scanner.report.ScanReport) for more details on the export methods available on the `ScanReport` class."
"If you are running in a notebook, you can display the scan report directly in the notebook using `display(...)`, otherwise you can export the report to an HTML file. Check the [API Reference](https://docs.giskard.ai/en/stable/reference/scan/report.html#giskard.scanner.report.ScanReport) for more details on the export methods available on the `ScanReport` class."
]
},
{
Expand Down Expand Up @@ -1478,7 +1478,7 @@
"&lt;li&gt;Overreliance on spurious correlations like the presence of specific word&lt;/li&gt;\n",
"&lt;li&gt;Use of complex models with large number of parameters that tend to overfit the training data&lt;/li&gt;\n",
"&lt;/ul&gt;\n",
"&lt;p&gt;To learn more about causes and solutions, check our &lt;a href=&quot;https://docs.giskard.ai/en/latest/getting-started/key_vulnerabilities/robustness/index.html&quot;&gt;guide on robustness issues&lt;/a&gt;.&lt;/p&gt;\n",
"&lt;p&gt;To learn more about causes and solutions, check our &lt;a href=&quot;https://docs.giskard.ai/en/stable/getting-started/key_vulnerabilities/robustness/index.html&quot;&gt;guide on robustness issues&lt;/a&gt;.&lt;/p&gt;\n",
" &lt;/div&gt;\n",
" &lt;/div&gt;\n",
" &lt;/div&gt;\n",
Expand Down
14 changes: 7 additions & 7 deletions docs/getting_started/quickstart/quickstart_nlp.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@
"id": "3PGiyUwAJpdK"
},
"source": [
"To prepare for the vulnerability scan, make sure to wrap your dataset using Giskard's Dataset class. More details [here](https://docs.giskard.ai/en/latest/open_source/scan/scan_nlp/index.html#step-1-wrap-your-dataset)."
"To prepare for the vulnerability scan, make sure to wrap your dataset using Giskard's Dataset class. More details [here](https://docs.giskard.ai/en/stable/open_source/scan/scan_nlp/index.html#step-1-wrap-your-dataset)."
]
},
{
Expand Down Expand Up @@ -258,7 +258,7 @@
"id": "NwunAyRvJzOS"
},
"source": [
"To prepare for the vulnerability scan, make sure to wrap your model using Giskard's Model class. You can choose to either wrap the prediction function (preferred option) or the model object. More details [here](https://docs.giskard.ai/en/latest/open_source/scan/scan_nlp/index.html#step-2-wrap-your-model)."
"To prepare for the vulnerability scan, make sure to wrap your model using Giskard's Model class. You can choose to either wrap the prediction function (preferred option) or the model object. More details [here](https://docs.giskard.ai/en/stable/open_source/scan/scan_nlp/index.html#step-2-wrap-your-model)."
]
},
{
Expand Down Expand Up @@ -310,7 +310,7 @@
"source": [
"### Scan your model for vulnerabilities with Giskard\n",
"\n",
"Giskard's scan allows you to detect vulnerabilities in your model automatically. These include performance biases, unrobustness, data leakage, stochasticity, underconfidence, ethical issues, and more. For detailed information about the scan feature, please refer to our [scan documentation](https://docs.giskard.ai/en/latest/open_source/scan/scan_nlp/index.html)."
"Giskard's scan allows you to detect vulnerabilities in your model automatically. These include performance biases, unrobustness, data leakage, stochasticity, underconfidence, ethical issues, and more. For detailed information about the scan feature, please refer to our [scan documentation](https://docs.giskard.ai/en/stable/open_source/scan/scan_nlp/index.html)."
]
},
{
Expand All @@ -329,7 +329,7 @@
"cell_type": "markdown",
"metadata": {},
"source": [
"If you are running in a notebook, you can display the scan report directly in the notebook using `display(...)`, otherwise you can export the report to an HTML file. Check the [API Reference](https://docs.giskard.ai/en/latest/reference/scan/report.html#giskard.scanner.report.ScanReport) for more details on the export methods available on the `ScanReport` class."
"If you are running in a notebook, you can display the scan report directly in the notebook using `display(...)`, otherwise you can export the report to an HTML file. Check the [API Reference](https://docs.giskard.ai/en/stable/reference/scan/report.html#giskard.scanner.report.ScanReport) for more details on the export methods available on the `ScanReport` class."
],
"id": "9dd5baaaa6a7ee62"
},
Expand Down Expand Up @@ -442,7 +442,7 @@
"&lt;li&gt;Overreliance on spurious correlations like the presence of specific word&lt;/li&gt;\n",
"&lt;li&gt;Use of complex models with large number of parameters that tend to overfit the training data&lt;/li&gt;\n",
"&lt;/ul&gt;\n",
"&lt;p&gt;To learn more about causes and solutions, check our &lt;a href=&quot;https://docs.giskard.ai/en/latest/getting-started/key_vulnerabilities/robustness/index.html&quot;&gt;guide on robustness issues&lt;/a&gt;.&lt;/p&gt;\n",
"&lt;p&gt;To learn more about causes and solutions, check our &lt;a href=&quot;https://docs.giskard.ai/en/stable/getting-started/key_vulnerabilities/robustness/index.html&quot;&gt;guide on robustness issues&lt;/a&gt;.&lt;/p&gt;\n",
" &lt;/div&gt;\n",
" &lt;/div&gt;\n",
" &lt;/div&gt;\n",
Expand Down Expand Up @@ -1021,7 +1021,7 @@
"&lt;li&gt;Data is reflecting some structural biases and societal prejudices&lt;/li&gt;\n",
"&lt;li&gt;Use of complex models with large number of parameters that tend to overfit the training data&lt;/li&gt;\n",
"&lt;/ul&gt;\n",
"&lt;p&gt;To learn more about causes and solutions, check our &lt;a href=&quot;https://docs.giskard.ai/en/latest/getting-started/key_vulnerabilities/ethics/index.html&quot;&gt;guide on unethical behaviour.&lt;/a&gt;&lt;/p&gt;\n",
"&lt;p&gt;To learn more about causes and solutions, check our &lt;a href=&quot;https://docs.giskard.ai/en/stable/getting-started/key_vulnerabilities/ethics/index.html&quot;&gt;guide on unethical behaviour.&lt;/a&gt;&lt;/p&gt;\n",
" &lt;/div&gt;\n",
" &lt;/div&gt;\n",
" &lt;/div&gt;\n",
Expand Down Expand Up @@ -1835,7 +1835,7 @@
"* Slicing functions such as detectors of toxicity, hate, emotion, etc\n",
"* Transformation functions such as generators of typos, paraphrase, style tune, etc\n",
"\n",
"To create custom tests, refer to [this page](https://docs.giskard.ai/en/latest/open_source/customize_tests/test_model/index.html).\n",
"To create custom tests, refer to [this page](https://docs.giskard.ai/en/stable/open_source/customize_tests/test_model/index.html).\n",
"\n",
"For demo purposes, we will load a simple unit test (test_f1) that checks if the test F1 score is above the given threshold. For more examples of tests and functions, refer to the Giskard catalog."
]
Expand Down
Loading

0 comments on commit c777f96

Please sign in to comment.