intel-ai-safety


Nameintel-ai-safety JSON
Version 0.0.0 PyPI version JSON
download
home_pagehttps://github.com/IntelAI/intel-xai-tools
SummaryExplainable AI Tooling (XAI). XAI is used to discover and explain a model's prediction in a way that is interpretable to the user. Relevant information in the dataset, featureset, and model's algorithms are exposed.
upload_time2024-04-23 02:52:49
maintainerNone
docs_urlNone
authorIntelAI
requires_pythonNone
licenseApache-2.0 license
keywords machine-learning ai deep-learing tensorflow pytorch explainable-ai
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # IntelĀ® Explainable AI Tools

This repository provides tools for data scientists and MLOps engineers that have requirements specific to AI model interpretability.

## Overview

The Intel Explainable AI Tools are designed to help users detect and mitigate against issues of fairness and interpretability, while running best on Intel hardware.
There are two Python* components in the repository:

* [Model Card Generator](intel_ai_safety/model_card_gen)
  * Creates interactive HTML reports containing model performance and fairness metrics
* [Explainer](explainer)
  * Runs post-hoc model distillation and visualization methods to examine predictive behavior for both TensorFlow* and PyTorch* models via a simple Python API including the following modules:
    * [Attributions](explainer/intel_ai_safety/explainer/attributions/): Visualize negative and positive attributions of tabular features, pixels, and word tokens for predictions
    * [CAM (Class Activation Mapping)](explainer/intel_ai_safety/explainer/cam/): Create heatmaps for CNN image classifications using gradient-weight class activation CAM mapping
    * [Metrics](explainer/intel_ai_safety/explainer/metrics/): Gain insight into models with the measurements and visualizations needed during the machine learning workflow

## Get Started

### Requirements
* Linux system or WSL2 on Windows (validated on Ubuntu* 20.04/22.04 LTS)
* Python 3.8, 3.9, 3.10
* Install required OS packages with `apt-get install build-essential python3-dev`
* git (only required for the "Developer Installation")

### Developer Installation with Poetry

Use these instructions to install the Intel AI Safety python library with a clone of the
GitHub repository. This can be done instead of the basic pip install, if you plan
on making code changes.

1. Clone this repo and navigate to the repo directory.

2. Allow poetry to create virtual envionment contained in `.venv` directory of current directory. 

   ```
   poetry lock
   ```
   In addtion, you can explicitly tell poetry which python instance to use
   
   ```
   poetry env use /full/path/to/python
   ```

3. Choose the `intel_ai_safety` subpackages and plugins that you wish to install.
   
   a. Install `intel_ai_safety` with all of its subpackages (e.g. `explainer` and `model_card_gen`) and plugins
   ```
   poetry install --extras all
   ```

   b. Install `intel_ai_safety` with just `explainer`
   ```
   poetry install --extras explainer
   ```
   
   c. Install `intel_ai_safety` with just `model_card_gen`
   ```
   poetry install --extras model-card
   ```
   
   d. Install `intel_ai_safety` with `explainer` and all of its plugins
   ```
   poetry install --extras explainer-all
   ```

   e. Install `intel_ai_safety` with `explainer` and just its pytorch implementations
   
   ```
   poetry install --extras explainer-pytorch
   ```
   
   f. Install `intel_ai_safety` with `explainer` and just its pytorch implementations
   
   ```
   poetry install --extras explainer-tensorflow
   ``` 

4. Activate the enviornment:

   ```
   source .venv/bin/activate
   ```

### Install to existing enviornment with Poetry

#### Create and activate a Python3 virtual environment
We encourage you to use a python virtual environment (virtualenv or conda) for consistent package management.
There are two ways to do this:
1. Choose a virtual enviornment to use:
   a. Using `virtualenv`:
      ```
      python3.9 -m virtualenv xai_env
      source xai_env/bin/activate
      ```

   b. Or `conda`:
      ```
      conda create --name xai_env python=3.9
      conda activate xai_env
      ```
2. Install to current enviornment
   ```
   poetry config virtualenvs.create false && poetry install --extras all
   ```

### Additional Feature-Specific Steps
Notebooks may require additional dependencies listed in their associated documentation.

### Verify Installation

Verify that your installation was successful by using the following commands, which display the Explainer and Model Card Generator versions:
```
python -c "from intel_ai_safety.explainer import version; print(version.__version__)"
python -c "from intel_ai_safety.model_card_gen import version; print(version.__version__)"
```

## Running Notebooks

The following links have Jupyter* notebooks showing how to use the Explainer and Model Card Generator APIs in various ML domains and use cases:
* [Model Card Generator Notebooks](notebooks#model-card-generator-tutorial-notebooks)
* [Explainer Notebooks](notebooks#explainer-tutorial-notebooks)

## Support

The Intel Explainable AI Tools team tracks bugs and enhancement requests using
[GitHub issues](https://github.com/intelai/intel-xai-tools/issues). Before submitting a
suggestion or bug report, search the existing GitHub issues to see if your issue has already been reported.

*Other names and brands may be claimed as the property of others. [Trademarks](http://www.intel.com/content/www/us/en/legal/trademarks.html)

#### DISCLAIMER
These scripts are not intended for benchmarking Intel platforms. For any performance and/or benchmarking information on specific Intel platforms, visit https://www.intel.ai/blog.
 
Intel is committed to the respect of human rights and avoiding complicity in human rights abuses, a policy reflected in the Intel Global Human Rights Principles. Accordingly, by accessing the Intel material on this platform you agree that you will not use the material in a product or application that causes or contributes to a violation of an internationally recognized human right.
 
#### License
IntelĀ® Explainable AI Tools is licensed under Apache License Version 2.0.
 
#### Datasets and Models
To the extent that any data, datasets, or models are referenced by Intel or accessed using tools or code on this site such data, datasets and models are provided by the third party indicated as the source of such content. Intel does not create the data, datasets, or models, provide a license to any third-party data, datasets, or models referenced, and does not warrant their accuracy or quality. By accessing such data, dataset(s) or model(s) you agree to the terms associated with that content and that your use complies with the applicable license. [DATASETS](DATASETS.md)

Intel expressly disclaims the accuracy, adequacy, or completeness of any data, datasets or models, and is not liable for any errors, omissions, or defects in such content, or for any reliance thereon. Intel also expressly disclaims any warranty of non-infringement with respect to such data, dataset(s), or model(s). Intel is not liable for any liability or damages relating to your use of such data, datasets, or models.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/IntelAI/intel-xai-tools",
    "name": "intel-ai-safety",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "machine-learning ai deep-learing tensorflow pytorch explainable-ai",
    "author": "IntelAI",
    "author_email": "intelai@intel.com",
    "download_url": null,
    "platform": null,
    "description": "# Intel\u00ae Explainable AI Tools\n\nThis repository provides tools for data scientists and MLOps engineers that have requirements specific to AI model interpretability.\n\n## Overview\n\nThe Intel Explainable AI Tools are designed to help users detect and mitigate against issues of fairness and interpretability, while running best on Intel hardware.\nThere are two Python* components in the repository:\n\n* [Model Card Generator](intel_ai_safety/model_card_gen)\n  * Creates interactive HTML reports containing model performance and fairness metrics\n* [Explainer](explainer)\n  * Runs post-hoc model distillation and visualization methods to examine predictive behavior for both TensorFlow* and PyTorch* models via a simple Python API including the following modules:\n    * [Attributions](explainer/intel_ai_safety/explainer/attributions/): Visualize negative and positive attributions of tabular features, pixels, and word tokens for predictions\n    * [CAM (Class Activation Mapping)](explainer/intel_ai_safety/explainer/cam/): Create heatmaps for CNN image classifications using gradient-weight class activation CAM mapping\n    * [Metrics](explainer/intel_ai_safety/explainer/metrics/): Gain insight into models with the measurements and visualizations needed during the machine learning workflow\n\n## Get Started\n\n### Requirements\n* Linux system or WSL2 on Windows (validated on Ubuntu* 20.04/22.04 LTS)\n* Python 3.8, 3.9, 3.10\n* Install required OS packages with `apt-get install build-essential python3-dev`\n* git (only required for the \"Developer Installation\")\n\n### Developer Installation with Poetry\n\nUse these instructions to install the Intel AI Safety python library with a clone of the\nGitHub repository. This can be done instead of the basic pip install, if you plan\non making code changes.\n\n1. Clone this repo and navigate to the repo directory.\n\n2. Allow poetry to create virtual envionment contained in `.venv` directory of current directory. \n\n   ```\n   poetry lock\n   ```\n   In addtion, you can explicitly tell poetry which python instance to use\n   \n   ```\n   poetry env use /full/path/to/python\n   ```\n\n3. Choose the `intel_ai_safety` subpackages and plugins that you wish to install.\n   \n   a. Install `intel_ai_safety` with all of its subpackages (e.g. `explainer` and `model_card_gen`) and plugins\n   ```\n   poetry install --extras all\n   ```\n\n   b. Install `intel_ai_safety` with just `explainer`\n   ```\n   poetry install --extras explainer\n   ```\n   \n   c. Install `intel_ai_safety` with just `model_card_gen`\n   ```\n   poetry install --extras model-card\n   ```\n   \n   d. Install `intel_ai_safety` with `explainer` and all of its plugins\n   ```\n   poetry install --extras explainer-all\n   ```\n\n   e. Install `intel_ai_safety` with `explainer` and just its pytorch implementations\n   \n   ```\n   poetry install --extras explainer-pytorch\n   ```\n   \n   f. Install `intel_ai_safety` with `explainer` and just its pytorch implementations\n   \n   ```\n   poetry install --extras explainer-tensorflow\n   ``` \n\n4. Activate the enviornment:\n\n   ```\n   source .venv/bin/activate\n   ```\n\n### Install to existing enviornment with Poetry\n\n#### Create and activate a Python3 virtual environment\nWe encourage you to use a python virtual environment (virtualenv or conda) for consistent package management.\nThere are two ways to do this:\n1. Choose a virtual enviornment to use:\n   a. Using `virtualenv`:\n      ```\n      python3.9 -m virtualenv xai_env\n      source xai_env/bin/activate\n      ```\n\n   b. Or `conda`:\n      ```\n      conda create --name xai_env python=3.9\n      conda activate xai_env\n      ```\n2. Install to current enviornment\n   ```\n   poetry config virtualenvs.create false && poetry install --extras all\n   ```\n\n### Additional Feature-Specific Steps\nNotebooks may require additional dependencies listed in their associated documentation.\n\n### Verify Installation\n\nVerify that your installation was successful by using the following commands, which display the Explainer and Model Card Generator versions:\n```\npython -c \"from intel_ai_safety.explainer import version; print(version.__version__)\"\npython -c \"from intel_ai_safety.model_card_gen import version; print(version.__version__)\"\n```\n\n## Running Notebooks\n\nThe following links have Jupyter* notebooks showing how to use the Explainer and Model Card Generator APIs in various ML domains and use cases:\n* [Model Card Generator Notebooks](notebooks#model-card-generator-tutorial-notebooks)\n* [Explainer Notebooks](notebooks#explainer-tutorial-notebooks)\n\n## Support\n\nThe Intel Explainable AI Tools team tracks bugs and enhancement requests using\n[GitHub issues](https://github.com/intelai/intel-xai-tools/issues). Before submitting a\nsuggestion or bug report, search the existing GitHub issues to see if your issue has already been reported.\n\n*Other names and brands may be claimed as the property of others. [Trademarks](http://www.intel.com/content/www/us/en/legal/trademarks.html)\n\n#### DISCLAIMER\nThese scripts are not intended for benchmarking Intel platforms. For any performance and/or benchmarking information on specific Intel platforms, visit https://www.intel.ai/blog.\n \nIntel is committed to the respect of human rights and avoiding complicity in human rights abuses, a policy reflected in the Intel Global Human Rights Principles. Accordingly, by accessing the Intel material on this platform you agree that you will not use the material in a product or application that causes or contributes to a violation of an internationally recognized human right.\n \n#### License\nIntel\u00ae Explainable AI Tools is licensed under Apache License Version 2.0.\n \n#### Datasets and Models\nTo the extent that any data, datasets, or models are referenced by Intel or accessed using tools or code on this site such data, datasets and models are provided by the third party indicated as the source of such content. Intel does not create the data, datasets, or models, provide a license to any third-party data, datasets, or models referenced, and does not warrant their accuracy or quality. By accessing such data, dataset(s) or model(s) you agree to the terms associated with that content and that your use complies with the applicable license. [DATASETS](DATASETS.md)\n\nIntel expressly disclaims the accuracy, adequacy, or completeness of any data, datasets or models, and is not liable for any errors, omissions, or defects in such content, or for any reliance thereon. Intel also expressly disclaims any warranty of non-infringement with respect to such data, dataset(s), or model(s). Intel is not liable for any liability or damages relating to your use of such data, datasets, or models.\n",
    "bugtrack_url": null,
    "license": "Apache-2.0 license",
    "summary": "Explainable AI Tooling (XAI). XAI is used to discover and explain a model's prediction in a way that is interpretable to the user. Relevant information in the dataset, featureset, and model's algorithms are exposed.",
    "version": "0.0.0",
    "project_urls": {
        "Homepage": "https://github.com/IntelAI/intel-xai-tools"
    },
    "split_keywords": [
        "machine-learning",
        "ai",
        "deep-learing",
        "tensorflow",
        "pytorch",
        "explainable-ai"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a683bb17bf3562c5f5fd94d88ca1701c88875a51c4f6c18c30c79d5ce67c3da3",
                "md5": "c83dc6f7297d41f9b90e5f907e9a726b",
                "sha256": "6a1020ef042dbcd28346acac1af709ad3bee5bc8aaa70aae59205c1ba83df496"
            },
            "downloads": -1,
            "filename": "intel_ai_safety-0.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c83dc6f7297d41f9b90e5f907e9a726b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5538,
            "upload_time": "2024-04-23T02:52:49",
            "upload_time_iso_8601": "2024-04-23T02:52:49.219468Z",
            "url": "https://files.pythonhosted.org/packages/a6/83/bb17bf3562c5f5fd94d88ca1701c88875a51c4f6c18c30c79d5ce67c3da3/intel_ai_safety-0.0.0-py3-none-any.whl",
            "yanked": true,
            "yanked_reason": "This is not a valid release!"
        }
    ],
    "upload_time": "2024-04-23 02:52:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "IntelAI",
    "github_project": "intel-xai-tools",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "intel-ai-safety"
}
        
Elapsed time: 0.23922s