cloudexplain


Namecloudexplain JSON
Version 0.1.0rc4 PyPI version JSON
download
home_pageNone
SummaryA package for explaining cloud-based solutions provided by cloudexplain GmbH.
upload_time2024-11-21 15:05:47
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseMIT License Copyright (c) 2024 cloudexplain GmbH Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords cloud explain machine learning ai
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ### Cloudexplain

This is the open source cloudexplain package (or what it is going to be). This just uploads your current data to the azure account you are currently logged in via az.

#### Azure
To install this for azure run:
```bash
pip install cloudexplain[azure]
```
In order to run it on azure you must have write rights on the `cloudexplainmodels` storage account on the resource group `cloudexplain` on your subscription and must be logged in via
```bash
az login
```

#### Example Usage
##### Training mode

In training mode you need to specify the `y` argument.

```python
import shap
import sklearn
import cloudexplain

X, y = shap.datasets.adult(n_points=100)
X["adult_id"] = list(range(len(X)))
dtc = sklearn.tree.DecisionTreeClassifier()
dtc.fit(X, y)


with cloudexplain.azure.explain(model=dtc,
                                X=X,
                                y=y,
                                model_version="0.0.1",
                                model_description="This is a new model.",
                                resource_group_name="mycomp-cloudexplain-tf",
                                explanation_name="dummy_name",
                                explanation_env="dev",
                                data_source="shap_adult_dataset",
                                observation_id_column="adult_id") as run:
    print("This is the run uuid", run.run_uuid)
    pred = dtc.predict(X)
```

##### Inference mode

To run in inference mode, just don't specify `y`.

```python
with cloudexplain.azure.explain(model=dtc,
                                X=X,
                                model_version="0.0.1",
                                model_description="This is a new model.",
                                resource_group_name="mycomp-cloudexplain-tf",
                                explanation_name="dummy_name",
                                explanation_env="dev",
                                data_source="shap_adult_dataset",
                                observation_id_column="adult_id") as run:
    print("This is the run uuid", run.run_uuid)
    pred = dtc.predict(X)
```

#### Troubleshooting
When logged in with multiple accounts it can be the case that the permissions are not handled correctly. Signing out of all users
except for the one who has the correct rights helps.
```bash
az logout
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "cloudexplain",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "cloud, explain, machine learning, AI",
    "author": null,
    "author_email": "cloudexplain <info@cloudexplain.eu>",
    "download_url": "https://files.pythonhosted.org/packages/b7/d2/2382875da7407be40be08bf51608023b047b6d6c1e84be6da34ea281c7e9/cloudexplain-0.1.0rc4.tar.gz",
    "platform": null,
    "description": "### Cloudexplain\n\nThis is the open source cloudexplain package (or what it is going to be). This just uploads your current data to the azure account you are currently logged in via az.\n\n#### Azure\nTo install this for azure run:\n```bash\npip install cloudexplain[azure]\n```\nIn order to run it on azure you must have write rights on the `cloudexplainmodels` storage account on the resource group `cloudexplain` on your subscription and must be logged in via\n```bash\naz login\n```\n\n#### Example Usage\n##### Training mode\n\nIn training mode you need to specify the `y` argument.\n\n```python\nimport shap\nimport sklearn\nimport cloudexplain\n\nX, y = shap.datasets.adult(n_points=100)\nX[\"adult_id\"] = list(range(len(X)))\ndtc = sklearn.tree.DecisionTreeClassifier()\ndtc.fit(X, y)\n\n\nwith cloudexplain.azure.explain(model=dtc,\n                                X=X,\n                                y=y,\n                                model_version=\"0.0.1\",\n                                model_description=\"This is a new model.\",\n                                resource_group_name=\"mycomp-cloudexplain-tf\",\n                                explanation_name=\"dummy_name\",\n                                explanation_env=\"dev\",\n                                data_source=\"shap_adult_dataset\",\n                                observation_id_column=\"adult_id\") as run:\n    print(\"This is the run uuid\", run.run_uuid)\n    pred = dtc.predict(X)\n```\n\n##### Inference mode\n\nTo run in inference mode, just don't specify `y`.\n\n```python\nwith cloudexplain.azure.explain(model=dtc,\n                                X=X,\n                                model_version=\"0.0.1\",\n                                model_description=\"This is a new model.\",\n                                resource_group_name=\"mycomp-cloudexplain-tf\",\n                                explanation_name=\"dummy_name\",\n                                explanation_env=\"dev\",\n                                data_source=\"shap_adult_dataset\",\n                                observation_id_column=\"adult_id\") as run:\n    print(\"This is the run uuid\", run.run_uuid)\n    pred = dtc.predict(X)\n```\n\n#### Troubleshooting\nWhen logged in with multiple accounts it can be the case that the permissions are not handled correctly. Signing out of all users\nexcept for the one who has the correct rights helps.\n```bash\naz logout\n```\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 cloudexplain GmbH  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "A package for explaining cloud-based solutions provided by cloudexplain GmbH.",
    "version": "0.1.0rc4",
    "project_urls": {
        "Homepage": "https://www.cloudexplain.eu",
        "Repository": "https://github.com/cloudexplain/cloudexplain"
    },
    "split_keywords": [
        "cloud",
        " explain",
        " machine learning",
        " ai"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9042dc801e199ff09e67e42ed999c4e4faea25c383682c7a7b441541122cce4f",
                "md5": "3771b28c8e067fc4ba2ef5405621bd86",
                "sha256": "58748522969b1bd93bd1a4c784f8892d1afb017416131f9b00ce9e7a384cd189"
            },
            "downloads": -1,
            "filename": "cloudexplain-0.1.0rc4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3771b28c8e067fc4ba2ef5405621bd86",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 8775,
            "upload_time": "2024-11-21T15:05:46",
            "upload_time_iso_8601": "2024-11-21T15:05:46.016766Z",
            "url": "https://files.pythonhosted.org/packages/90/42/dc801e199ff09e67e42ed999c4e4faea25c383682c7a7b441541122cce4f/cloudexplain-0.1.0rc4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b7d22382875da7407be40be08bf51608023b047b6d6c1e84be6da34ea281c7e9",
                "md5": "d86b4b3a3a305c3a8f3966f238607810",
                "sha256": "072a84a858a86e91832c8ca2b6999916d222cfba43da6c4ee3b770d10c537128"
            },
            "downloads": -1,
            "filename": "cloudexplain-0.1.0rc4.tar.gz",
            "has_sig": false,
            "md5_digest": "d86b4b3a3a305c3a8f3966f238607810",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 9009,
            "upload_time": "2024-11-21T15:05:47",
            "upload_time_iso_8601": "2024-11-21T15:05:47.278822Z",
            "url": "https://files.pythonhosted.org/packages/b7/d2/2382875da7407be40be08bf51608023b047b6d6c1e84be6da34ea281c7e9/cloudexplain-0.1.0rc4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-21 15:05:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cloudexplain",
    "github_project": "cloudexplain",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "cloudexplain"
}
        
Elapsed time: 0.78395s