feltlabs


Namefeltlabs JSON
Version 0.5.1 PyPI version JSON
download
home_pagehttps://feltlabs.ai/
SummaryFELT python package intended for running federated learning on Ocean protocol.
upload_time2022-12-23 22:27:08
maintainerFELT Labs
docs_urlNone
authorFELT Labs
requires_python>=3.8
licenseGPL-3.0 License
keywords federated learning web3 machine learning
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            This code is intended to work closely with Ocean protocol. Algorithms from this code
should run on ocean provider. Training local models and aggregating them into global
model.

Entry commands:

```bash
felt-train
felt-aggregate
felt-export
```

## Common Usage

After installing this library you can load models trained using FELT as:
```python
from feltlabs.model import load_model

# Load scikit-learn model
model = load_model("final-model.json")

# Data shape must be: (number_of_samples, number_of_features)
data = [
  [1980, 2, 2, 2, 0, 0],
  [1700, 3, 2, 3, 1, 1],
  [2100, 3, 2, 3, 1, 0],
]

result = model.predict(data)
print(result)
# Use following line for analytics as mean, std...
# result = model.predict(None)
```

### Command: felt-export
You can use `felt-export` for converting trained models into pickle object:
Resulting file will then contain a pickled object of scikit-learn model.

```bash
felt-export --input "final-model-House Prices.json" --output "model.pkl"
```

Then you can use the created file as follows:

```python
import pickle

with open('model.pkl', 'rb') as f:
    model = pickle.load(object, f)
    
# See the above code example for data definition
model.predict(data)
```



            

Raw data

            {
    "_id": null,
    "home_page": "https://feltlabs.ai/",
    "name": "feltlabs",
    "maintainer": "FELT Labs",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "info@bretahajek.com",
    "keywords": "Federated Learning,Web3,Machine Learning",
    "author": "FELT Labs",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/ae/c3/cacae1f769863726fab8efd6651c048c96bee6ce7c76c32e0cfb1475cc19/feltlabs-0.5.1.tar.gz",
    "platform": "Windows",
    "description": "This code is intended to work closely with Ocean protocol. Algorithms from this code\nshould run on ocean provider. Training local models and aggregating them into global\nmodel.\n\nEntry commands:\n\n```bash\nfelt-train\nfelt-aggregate\nfelt-export\n```\n\n## Common Usage\n\nAfter installing this library you can load models trained using FELT as:\n```python\nfrom feltlabs.model import load_model\n\n# Load scikit-learn model\nmodel = load_model(\"final-model.json\")\n\n# Data shape must be: (number_of_samples, number_of_features)\ndata = [\n  [1980, 2, 2, 2, 0, 0],\n  [1700, 3, 2, 3, 1, 1],\n  [2100, 3, 2, 3, 1, 0],\n]\n\nresult = model.predict(data)\nprint(result)\n# Use following line for analytics as mean, std...\n# result = model.predict(None)\n```\n\n### Command: felt-export\nYou can use `felt-export` for converting trained models into pickle object:\nResulting file will then contain a pickled object of scikit-learn model.\n\n```bash\nfelt-export --input \"final-model-House Prices.json\" --output \"model.pkl\"\n```\n\nThen you can use the created file as follows:\n\n```python\nimport pickle\n\nwith open('model.pkl', 'rb') as f:\n    model = pickle.load(object, f)\n    \n# See the above code example for data definition\nmodel.predict(data)\n```\n\n\n",
    "bugtrack_url": null,
    "license": "GPL-3.0 License",
    "summary": "FELT python package intended for running federated learning on Ocean protocol.",
    "version": "0.5.1",
    "split_keywords": [
        "federated learning",
        "web3",
        "machine learning"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "98382f67c41d710e24499d44fd74339e",
                "sha256": "6af0066de2a1cf12a909d50d67b341e28f1d5e2ba615c3c5f46632bde20bbdf7"
            },
            "downloads": -1,
            "filename": "feltlabs-0.5.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "98382f67c41d710e24499d44fd74339e",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 44255,
            "upload_time": "2022-12-23T22:27:07",
            "upload_time_iso_8601": "2022-12-23T22:27:07.377986Z",
            "url": "https://files.pythonhosted.org/packages/70/38/80c7aa41370636f665e4d08c3b9917b3ca68ae96d2f0afaa2826548f71da/feltlabs-0.5.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "43b9bc6ff851e064e7997786d48bd2ab",
                "sha256": "1e35e48631e7a28acec461e70e417cde1a150292a50221769d036f5d20a3f9f7"
            },
            "downloads": -1,
            "filename": "feltlabs-0.5.1.tar.gz",
            "has_sig": false,
            "md5_digest": "43b9bc6ff851e064e7997786d48bd2ab",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 34309,
            "upload_time": "2022-12-23T22:27:08",
            "upload_time_iso_8601": "2022-12-23T22:27:08.595389Z",
            "url": "https://files.pythonhosted.org/packages/ae/c3/cacae1f769863726fab8efd6651c048c96bee6ce7c76c32e0cfb1475cc19/feltlabs-0.5.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-23 22:27:08",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "feltlabs"
}
        
Elapsed time: 0.03063s