Metadata-Version: 2.4
Name: aiondemand
Version: 0.3.1
Summary: Obtain and share AI resources with ease
Project-URL: Homepage, https://research.aiodp.eu
Project-URL: Documentation, https://aiondemand.github.io/aiondemand/
Project-URL: Repository, https://github.com/aiondemand/aiondemand
Project-URL: Issues, https://github.com/aiondemand/aiondemand/issues
Project-URL: Changelog, https://aiondemand.github.io/aiondemand/changelog/
Author-email: aiod developers <info@gcos.ai>, Jean Matias <smatias.jean@gmail.com>, Pieter Gijsbers <p.gijsbers@tue.nl>
Maintainer-email: aiod developers <info@gcos.ai>
License: MIT License
        
        Copyright (c) 2023, Jean Matias
        
        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.
        
License-File: LICENSE
Keywords: ai-on-demand,artificial-intelligence,data-science,machine-learning
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows
Classifier: Operating System :: POSIX
Classifier: Operating System :: Unix
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development
Requires-Python: <3.15,>=3.10
Requires-Dist: aiohttp
Requires-Dist: pandas
Requires-Dist: python-keycloak
Requires-Dist: requests
Requires-Dist: scikit-base
Requires-Dist: tomlkit
Provides-Extra: dev
Requires-Dist: aioresponses; extra == 'dev'
Requires-Dist: pre-commit; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Requires-Dist: pytest-asyncio; extra == 'dev'
Requires-Dist: responses; extra == 'dev'
Requires-Dist: ruff; extra == 'dev'
Provides-Extra: doc
Requires-Dist: mkdocs-jupyter; extra == 'doc'
Requires-Dist: mkdocs-material; extra == 'doc'
Requires-Dist: mkdocstrings-python; extra == 'doc'
Provides-Extra: tests-integrations
Requires-Dist: scikit-learn; extra == 'tests-integrations'
Description-Content-Type: text/markdown

# [AI-on-Demand](https://aiodp.eu) - obtain and share AI resources with ease

* quick instantiation of AI models from string IDs across the ecosystem
* cross-platform metadata catalogue for papers, projects, datasets, models
* marketplace features for sharing models and assets (under development)

A web interface for assets is available through [the AIoD catalogue](https://catalogue.aiodp.eu) and the [Metadata Catalogue Editor](https://editor.aiodp.eu/) (under construction)

| Overview | **[AIoD Homepage](https://aiodp.eu)** · **[Tutorials](https://github.com/aiondemand/aiondemand/tree/main/docs/examples)** · **[Release Notes](https://github.com/aiondemand/aiondemand/releases)** |
|---|---|
| **Open Source** |  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/aiondemand/aiondemand/blob/main/LICENSE) |
| **Community** | [![!discord](https://img.shields.io/static/v1?logo=discord&label=discord&message=chat&color=lightgreen)](https://discord.gg/A7YDRyvqYE) |
| **CI/CD** | [![github-actions](https://img.shields.io/github/actions/workflow/status/aiondemand/aiondemand/release.yaml?logo=github)](https://github.com/aiondemand/aiondemand/actions/workflows/release.yaml) |
| **Code** |  [![!pypi](https://img.shields.io/pypi/v/aiondemand?color=orange)](https://pypi.org/project/aiondemand/) [![!python-versions](https://img.shields.io/pypi/pyversions/aiondemand)](https://www.python.org/) |

## Installation

Install from [PyPI](https://pypi.org/project/aiondemand/) via:

```bash
$ pip install aiondemand
```

## Quick start

### AI model instantiation

Also see the [AI model instantiation tutorial](https://github.com/aiondemand/aiondemand/blob/main/docs/examples/ai-on-demand.ipynb)

`aiod.get(id: str)` is the key entry point:

* `id` is a unique string describing a model
* return is the python object, or an exception informing the user of required dependencies

```python
from aiod import get

clf = get("RandomForestClassifier(n_estimators=42)")
clf
```

directly constructs the random forest from `scikit-learn`
```
RandomForestClassifier(n_estimators=42)
```

Works across the ecosystem! 

```python
from aiod import get

clf = get("XGBClassifier()")
clf
```

... constructs the `XGBClassifier`, or raises an informative error message to
install `xgboost` in the environment (if not available)

```
XGBClassifier()
```

Complex pipelines and composites are supported out-of-the-box:

```python
spec = """
pipe = Pipeline(steps=[
    ("imputer", SimpleImputer(strategy="mean")),
    ("scaler", StandardScaler()),
    ("classifier", RandomForestClassifier(n_estimators=100))])
cv = KFold(n_splits=5, shuffle=True, random_state=42)

return GridSearchCV(
    estimator=pipe,
    param_grid=[{
        "classifier__max_depth": [5, 10],
        "classifier__min_samples_split": [2, 5],
    },
    ],
    cv=cv,
    )
"""

get(spec)
```

* no more hassle with import statements!
* share your AI model specs as easy-to-handle strings!

#### Indexed libraries

The following libraries are indexed - the scope is expanding, roadmap contributions
are welcome!

##### `scikit-learn` tabular estimators

- `scikit-learn`
- `catboost`
- `feature-engine`
- `lightgbm`
- `imbalanced-learn`
- `mlxtend`
- `scikit-lego`
- `xgboost`

##### Probabilistic supervised learning and survival modelling

- `skpro`

##### Time series, forecasting

- `sktime`


### AI asset catalogue search

Also see the [AI metadata catalogue tutorial](https://github.com/aiondemand/aiondemand/blob/main/docs/examples/getting-started.ipynb)

You can directly access endpoints through the Python API, for example to browse datasets:
```python
import aiod

aiod.datasets.get_list()
```
And results will be returned as a [Pandas](https://pandas.pydata.org/docs/getting_started/overview.html) dataframe (though the `data_format` may be used to get JSON instead):
```bash
      platform platform_resource_identifier                    name       date_published                                            same_as  is_accessible_for_free  ...  relevant_link  relevant_resource relevant_to research_area scientific_domain identifier
0  huggingface       acronym_identification  acronym_identification  2022-03-02T23:29:22  https://huggingface.co/datasets/acronym_identi...                    True  ...             []                 []          []            []                []          1
...
9  huggingface              allegro_reviews         allegro_reviews  2022-03-02T23:29:22    https://huggingface.co/datasets/allegro_reviews                    True  ...             []                 []          []            []                []         10

[10 rows x 30 columns]
```

You can even query the elastic search endpoints:
```python
aiod.publications.search(query="Robotics")
```
```bash
      platform platform_resource_identifier                                               name date_published                                            same_as is_accessible_for_free  ... relevant_resource relevant_to      research_area  scientific_domain  type  identifier
0  robotics4eu                         1803  Responsible Robotics &amp; non-tech barriers t...           None  https://www.robotics4eu.eu/publications/respon...                   None  ...                []          []  [other materials]  [other materials]  None           4

[1 rows x 36 columns]
```
## Contributing

Interested in contributing? Check out the [contributing guidelines](contributing.md), then start with the [Developer Setup Guide](developer_setup.md) to set up your local development environment. Check out the complete documentation here: https://aiondemand.github.io/aiondemand/developer_setup
By contributing to this project, you agree to abide by our [Code of Conduct](conduct.md).

## Credits

The `aiondemand` package is being developed with funding from EU’s Horizon Europe research and innovation program under grant agreement [No. 101070000 (AI4EUROPE)](https://cordis.europa.eu/project/id/101070000).
Not all contributors are affiliated with this funding.

[`cookiecutter`](https://cookiecutter.readthedocs.io/en/latest/) and the `py-pkgs-cookiecutter` [template](https://github.com/py-pkgs/py-pkgs-cookiecutter) were used to create the repository structure.
