rhino_health


Namerhino_health JSON
Version 0.2.27 PyPI version JSON
download
home_pageNone
SummaryStandard Development Kit for interacting with the Rhino Health Federated Learning Platform
upload_time2023-10-15 21:37:12
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords sdk rhino rhino health federated learning federated ai
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Rhino Health SDK

Programmatic interface for interacting with the **Rhino Health** Federated Learning Platform.

## Example Usage
Please see the sample notebook files provided to you by the Rhino Health Team for additional use cases.

### Create a session

```python
import rhino_health

my_username = "rhino_user@rhinohealth.com" # Replace me
my_password = "ASecurePasswordYouSet321" # Replace me
session = rhino_health.login(username=my_username, password=my_password)
```

There will be three ways to interact with the API after you have a session
1. Use defined endpoints under lib/endpoints for single actions
2. Use our library functions for commonly performed advanced features
3. Use our low level API Interface (advanced users)

### Interact with the API via defined endpoints

We've included convenience functions for our most commonly used endpoints in the library with required input and output
data classes. These can be found in `rhino_health/lib/endpoints`.

```python
my_projects = session.project.get_projects()
my_first_project = my_projects[0]
my_first_project.add_collaborator(collaborating_workgroup_uid)

my_cohort = session.cohort.get_cohort(my_cohort_uid)
cohort_project = my_cohort.project
my_cohort_info = my_cohort.cohort_info
```

### Library Functions

RhinoHealth also provides library functions which combine our basic building blocks to perform common actions.

Example:
```python
from rhino_health.lib.metrics import RocAucWithCI

metric_configuration = RocAucWithCI(y_true_variable="label", y_pred_variable="pred", confidence_interval=95, timeout_seconds=600)
"""
data_filters=[{
        "filter_column":"is_roc",
        "filter_value":1
    }]
"""
result = my_cohort.get_metric(metric_configuration)
print(f"{result.output}")
```

### Interact using the low level API

Please contact us for support with interacting with our low level API.

### Rate Limits
The Rhino SDK handles rate limits of the API for you if you use the same session between threads and will attempt to queue requests.
Excess requests will be sent with exponential backoff. If you send requests to our server from multiple locations
then you may run into exceptions.

## Development Notes

Please install libyaml required by our testing library (see https://vcrpy.readthedocs.io/en/latest/installation.html)
```sh
brew install libyaml
pip uninstall pyyaml
pip --no-cache-dir install pyyaml
```

You may need to use `pip install -r requirements.txt --no-cache-dir` on M1 Macs



            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "rhino_health",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "Rhino Health <rhino-sdk@rhinohealth.com>",
    "keywords": "SDK,Rhino,Rhino Health,Federated Learning,Federated,AI",
    "author": null,
    "author_email": "Rhino Health <rhino-sdk@rhinohealth.com>",
    "download_url": "https://files.pythonhosted.org/packages/c8/3c/f0383f179c3e1b60b94eb12c828f0e4646f4744f8140498600067d60b139/rhino_health-0.2.27.tar.gz",
    "platform": null,
    "description": "# Rhino Health SDK\n\nProgrammatic interface for interacting with the **Rhino Health** Federated Learning Platform.\n\n## Example Usage\nPlease see the sample notebook files provided to you by the Rhino Health Team for additional use cases.\n\n### Create a session\n\n```python\nimport rhino_health\n\nmy_username = \"rhino_user@rhinohealth.com\" # Replace me\nmy_password = \"ASecurePasswordYouSet321\" # Replace me\nsession = rhino_health.login(username=my_username, password=my_password)\n```\n\nThere will be three ways to interact with the API after you have a session\n1. Use defined endpoints under lib/endpoints for single actions\n2. Use our library functions for commonly performed advanced features\n3. Use our low level API Interface (advanced users)\n\n### Interact with the API via defined endpoints\n\nWe've included convenience functions for our most commonly used endpoints in the library with required input and output\ndata classes. These can be found in `rhino_health/lib/endpoints`.\n\n```python\nmy_projects = session.project.get_projects()\nmy_first_project = my_projects[0]\nmy_first_project.add_collaborator(collaborating_workgroup_uid)\n\nmy_cohort = session.cohort.get_cohort(my_cohort_uid)\ncohort_project = my_cohort.project\nmy_cohort_info = my_cohort.cohort_info\n```\n\n### Library Functions\n\nRhinoHealth also provides library functions which combine our basic building blocks to perform common actions.\n\nExample:\n```python\nfrom rhino_health.lib.metrics import RocAucWithCI\n\nmetric_configuration = RocAucWithCI(y_true_variable=\"label\", y_pred_variable=\"pred\", confidence_interval=95, timeout_seconds=600)\n\"\"\"\ndata_filters=[{\n        \"filter_column\":\"is_roc\",\n        \"filter_value\":1\n    }]\n\"\"\"\nresult = my_cohort.get_metric(metric_configuration)\nprint(f\"{result.output}\")\n```\n\n### Interact using the low level API\n\nPlease contact us for support with interacting with our low level API.\n\n### Rate Limits\nThe Rhino SDK handles rate limits of the API for you if you use the same session between threads and will attempt to queue requests.\nExcess requests will be sent with exponential backoff. If you send requests to our server from multiple locations\nthen you may run into exceptions.\n\n## Development Notes\n\nPlease install libyaml required by our testing library (see https://vcrpy.readthedocs.io/en/latest/installation.html)\n```sh\nbrew install libyaml\npip uninstall pyyaml\npip --no-cache-dir install pyyaml\n```\n\nYou may need to use `pip install -r requirements.txt --no-cache-dir` on M1 Macs\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Standard Development Kit for interacting with the Rhino Health Federated Learning Platform",
    "version": "0.2.27",
    "project_urls": {
        "Documentation": "https://rhinohealth.github.io/rhino_sdk_docs/html/autoapi/index.html",
        "Homepage": "https://www.rhinohealth.com/"
    },
    "split_keywords": [
        "sdk",
        "rhino",
        "rhino health",
        "federated learning",
        "federated",
        "ai"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c9af2705abf7553ecb6e442160ff5f755295c50d8490e69ca3ff38db91e1b0c5",
                "md5": "7c19a04f3f9b67e4644f09f02cd986cd",
                "sha256": "2ee94db82f3daae9bc4ad17d029f17993a08b9ff2de7b14016ddbcf602ea2c2b"
            },
            "downloads": -1,
            "filename": "rhino_health-0.2.27-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "7c19a04f3f9b67e4644f09f02cd986cd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 86333,
            "upload_time": "2023-10-15T21:37:10",
            "upload_time_iso_8601": "2023-10-15T21:37:10.727979Z",
            "url": "https://files.pythonhosted.org/packages/c9/af/2705abf7553ecb6e442160ff5f755295c50d8490e69ca3ff38db91e1b0c5/rhino_health-0.2.27-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "c83cf0383f179c3e1b60b94eb12c828f0e4646f4744f8140498600067d60b139",
                "md5": "a45157f2eb99d96c8179eecd0de6f943",
                "sha256": "543d0908b484938773d32d1f1e5d3a63571ad522fe55a5ba64e2911d9d960f2e"
            },
            "downloads": -1,
            "filename": "rhino_health-0.2.27.tar.gz",
            "has_sig": false,
            "md5_digest": "a45157f2eb99d96c8179eecd0de6f943",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 74807,
            "upload_time": "2023-10-15T21:37:12",
            "upload_time_iso_8601": "2023-10-15T21:37:12.687682Z",
            "url": "https://files.pythonhosted.org/packages/c8/3c/f0383f179c3e1b60b94eb12c828f0e4646f4744f8140498600067d60b139/rhino_health-0.2.27.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-15 21:37:12",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "rhino_health"
}
        
Elapsed time: 0.13961s