neptune-experimental


Nameneptune-experimental JSON
Version 0.3.4 PyPI version JSON
download
home_pagehttps://neptune.ai/
SummaryNeptune Client Experimental
upload_time2024-02-15 17:30:22
maintainer
docs_urlNone
authorneptune.ai
requires_python>=3.7,<4.0
licenseApache-2.0
keywords mlops ml experiment tracking ml model registry ml model store ml metadata store
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Neptune Experimental Package

This package consists of experimental features that are not yet ready for production use. The API is subject to change without notice.

# Neptune Fetcher

Neptune Fetcher is a Python package designed for efficient fetching and manipulation of data from Neptune projects and runs. It provides classes and methods for interacting with Neptune data in a read-only manner.

## Installation
```bash
pip install --upgrade neptune neptune-experimental
```

## Usage

### Importing

```python
from neptune_fetcher import ReadOnlyProject
```

### Overview of Classes
- `ReadOnlyProject`: A lightweight, read-only class for handling basic project information.
    - _Constructor Parameters_:
        - `project`: Optional string specifying the project name.
        - `workspace`: Optional string specifying the workspace.
        - `api_token`: Optional string for the API token.
        - `proxies`: Optional dictionary for proxy configuration.
    - _Methods_:
        - `list_runs()`: Yields dictionaries with basic information about each run, including `sys/id` and `sys/name`.
        - `fetch_read_only_runs(with_ids: List[str])`: Returns a generator for `ReadOnlyRun` instances for specified run IDs.
        - `fetch_runs()`: Fetches runs as a DataFrame with default columns.
        - `fetch_runs_df(columns, with_ids, states, owners, tags, trashed)`: Fetches runs as a DataFrame based on specified filters.

- _`ReadOnlyProject.ReadOnlyRun`_: Represents a single Neptune run with read-only access.
    - _Methods_:
        - `__getitem__(item)`: Accesses a field by its path.
        - `__delitem__(key)`: Removes a field from the local cache.
        - `field_names`: Yields the names of all available fields in the run.
        - `prefetch(paths: List[str])`: Loads values of specified fields into local cache.


## Examples
### Fetching Project Metadata

```python
from neptune_fetcher import ReadOnlyProject

project = ReadOnlyProject(workspace="some", project="project")
```

### Listing Runs in a Project

```python
from neptune_fetcher import ReadOnlyProject

project = ReadOnlyProject(workspace="some", project="project")
ids = list(map(lambda row: row["sys/id"], project.list_runs()))
```

### Filtering and Processing Runs

```python
from neptune_fetcher import ReadOnlyProject

project = ReadOnlyProject(workspace="some", project="project")
df = project.fetch_runs_df()

matches = df["sys/name"].str.match("metrics.*")
ids = df[matches]["sys/id"]
```

### Iterating Over Runs

```python
from neptune_fetcher import ReadOnlyProject

project = ReadOnlyProject(workspace="some", project="project")
for run in project.fetch_read_only_runs(with_ids=["PROJ-2"]):
    for field in run.field_names:
        if field.startswith("param"):
            print(run[field].fetch())
        if field.startswith("metric"):
            print(run[field].fetch_values())
```

### Prefetching Values

```python
run.prefetch(["metric1", "metric2"])
print(run["metric1"].fetch(), run["metric2"].fetch())  # This will use the local cache
```

### Purging Local Cache

```python
del run["metric1"]
```


### Example
A full example can be found in `examples/fetch_api.py`.

## License

This project is licensed under the Apache License Version 2.0. For more details, see [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).


            

Raw data

            {
    "_id": null,
    "home_page": "https://neptune.ai/",
    "name": "neptune-experimental",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "MLOps,ML Experiment Tracking,ML Model Registry,ML Model Store,ML Metadata Store",
    "author": "neptune.ai",
    "author_email": "contact@neptune.ai",
    "download_url": "https://files.pythonhosted.org/packages/c5/8e/9bbe0c18f53f2c6d7f667db7a36005b86df11b244a978abbb1bee0769280/neptune_experimental-0.3.4.tar.gz",
    "platform": null,
    "description": "# Neptune Experimental Package\n\nThis package consists of experimental features that are not yet ready for production use. The API is subject to change without notice.\n\n# Neptune Fetcher\n\nNeptune Fetcher is a Python package designed for efficient fetching and manipulation of data from Neptune projects and runs. It provides classes and methods for interacting with Neptune data in a read-only manner.\n\n## Installation\n```bash\npip install --upgrade neptune neptune-experimental\n```\n\n## Usage\n\n### Importing\n\n```python\nfrom neptune_fetcher import ReadOnlyProject\n```\n\n### Overview of Classes\n- `ReadOnlyProject`: A lightweight, read-only class for handling basic project information.\n    - _Constructor Parameters_:\n        - `project`: Optional string specifying the project name.\n        - `workspace`: Optional string specifying the workspace.\n        - `api_token`: Optional string for the API token.\n        - `proxies`: Optional dictionary for proxy configuration.\n    - _Methods_:\n        - `list_runs()`: Yields dictionaries with basic information about each run, including `sys/id` and `sys/name`.\n        - `fetch_read_only_runs(with_ids: List[str])`: Returns a generator for `ReadOnlyRun` instances for specified run IDs.\n        - `fetch_runs()`: Fetches runs as a DataFrame with default columns.\n        - `fetch_runs_df(columns, with_ids, states, owners, tags, trashed)`: Fetches runs as a DataFrame based on specified filters.\n\n- _`ReadOnlyProject.ReadOnlyRun`_: Represents a single Neptune run with read-only access.\n    - _Methods_:\n        - `__getitem__(item)`: Accesses a field by its path.\n        - `__delitem__(key)`: Removes a field from the local cache.\n        - `field_names`: Yields the names of all available fields in the run.\n        - `prefetch(paths: List[str])`: Loads values of specified fields into local cache.\n\n\n## Examples\n### Fetching Project Metadata\n\n```python\nfrom neptune_fetcher import ReadOnlyProject\n\nproject = ReadOnlyProject(workspace=\"some\", project=\"project\")\n```\n\n### Listing Runs in a Project\n\n```python\nfrom neptune_fetcher import ReadOnlyProject\n\nproject = ReadOnlyProject(workspace=\"some\", project=\"project\")\nids = list(map(lambda row: row[\"sys/id\"], project.list_runs()))\n```\n\n### Filtering and Processing Runs\n\n```python\nfrom neptune_fetcher import ReadOnlyProject\n\nproject = ReadOnlyProject(workspace=\"some\", project=\"project\")\ndf = project.fetch_runs_df()\n\nmatches = df[\"sys/name\"].str.match(\"metrics.*\")\nids = df[matches][\"sys/id\"]\n```\n\n### Iterating Over Runs\n\n```python\nfrom neptune_fetcher import ReadOnlyProject\n\nproject = ReadOnlyProject(workspace=\"some\", project=\"project\")\nfor run in project.fetch_read_only_runs(with_ids=[\"PROJ-2\"]):\n    for field in run.field_names:\n        if field.startswith(\"param\"):\n            print(run[field].fetch())\n        if field.startswith(\"metric\"):\n            print(run[field].fetch_values())\n```\n\n### Prefetching Values\n\n```python\nrun.prefetch([\"metric1\", \"metric2\"])\nprint(run[\"metric1\"].fetch(), run[\"metric2\"].fetch())  # This will use the local cache\n```\n\n### Purging Local Cache\n\n```python\ndel run[\"metric1\"]\n```\n\n\n### Example\nA full example can be found in `examples/fetch_api.py`.\n\n## License\n\nThis project is licensed under the Apache License Version 2.0. For more details, see [Apache License Version 2.0](http://www.apache.org/licenses/LICENSE-2.0).\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Neptune Client Experimental",
    "version": "0.3.4",
    "project_urls": {
        "Documentation": "https://docs.neptune.ai/",
        "Homepage": "https://neptune.ai/",
        "Repository": "https://github.com/neptune-ai/neptune-client-experimental",
        "Tracker": "https://github.com/neptune-ai/neptune-client-experimental/issues"
    },
    "split_keywords": [
        "mlops",
        "ml experiment tracking",
        "ml model registry",
        "ml model store",
        "ml metadata store"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3c55b964885bcfe3f7130c97b40a80c5d2d8066afb05b9a12d1c222f343877bc",
                "md5": "91fa9a8d13aab0ea181a61010f13dae4",
                "sha256": "ff48462064b3733e3c0d1a557d4355f66b1328a9c08a371ab6bb09f9b52a6240"
            },
            "downloads": -1,
            "filename": "neptune_experimental-0.3.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "91fa9a8d13aab0ea181a61010f13dae4",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 31580,
            "upload_time": "2024-02-15T17:30:19",
            "upload_time_iso_8601": "2024-02-15T17:30:19.553974Z",
            "url": "https://files.pythonhosted.org/packages/3c/55/b964885bcfe3f7130c97b40a80c5d2d8066afb05b9a12d1c222f343877bc/neptune_experimental-0.3.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c58e9bbe0c18f53f2c6d7f667db7a36005b86df11b244a978abbb1bee0769280",
                "md5": "a8b6dddcac4dad945db61b8663bad506",
                "sha256": "3e78862ebae53036a455197cde3c1b4c08a6690f79102618ca02550a1355ef94"
            },
            "downloads": -1,
            "filename": "neptune_experimental-0.3.4.tar.gz",
            "has_sig": false,
            "md5_digest": "a8b6dddcac4dad945db61b8663bad506",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 20727,
            "upload_time": "2024-02-15T17:30:22",
            "upload_time_iso_8601": "2024-02-15T17:30:22.136350Z",
            "url": "https://files.pythonhosted.org/packages/c5/8e/9bbe0c18f53f2c6d7f667db7a36005b86df11b244a978abbb1bee0769280/neptune_experimental-0.3.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-15 17:30:22",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "neptune-ai",
    "github_project": "neptune-client-experimental",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "neptune-experimental"
}
        
Elapsed time: 0.24592s