dspy-inspector


Namedspy-inspector JSON
Version 0.7.0 PyPI version JSON
download
home_pagehttps://github.com/neoxelox/dspy-inspector
SummaryDSPy program/pipeline inspector widget for Jupyter/VSCode Notebooks.
upload_time2024-02-15 12:46:56
maintainerAlex Rodriguez
docs_urlNone
authorAlex Rodriguez
requires_python>=3.11,<4.0
licenseGPL-3.0
keywords dspy inspector program pipeline plugin widget notebook jupyter vscode dspy-inspector
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # dspy-inspector πŸ” ![BETA](https://img.shields.io/badge/BETA-8b5cf6)

**`DSPy program/pipeline inspector widget for Jupyter/VSCode Notebooks.`** πŸ”­

> _**Note**: DSPy is going through a big refactor at this moment. Updates in the parsing logic are going to be halted in the meantime._

![Demo](demo.gif)

> Dark theme is coming soonβ„’.

## Install

πŸ‘‰ `pip install dspy-inspector`

## Usage

```python
from dspy_inspector import inspect

class MultiHopRAG(dspy.Module):
    def __init__(self, passages_per_hop=3, max_hops=2):
        ...

    def forward(self, question):
        ...

inspect(MultiHopRAG)

# Or πŸ‘‡

program = MultiHopRAG()
inspect(program) # Automatically updates
program("How many storeys are in the castle that David Gregory inherited?")
```

Check an example in the [`multi_hop_rag.ipynb`](examples/multi_hop_rag.ipynb) notebook.

> All example notebooks are cached, no calls to LLMs are needed to run them.

## Roadmap

This is a personal project I made to better understand what were my DSPy programs actually doing underneath. This extension is currently in **`BETA`**, so, expect bugs. For a roadmap on what things must be fixed or done check all the `TODOs` inside the source code.

## Developing

To setup the virtual developing environment, follow these steps:

1. Install dependencies: `poetry install`
2. Install tools: `poetry run inv tool.install --include "dev*"`
3. Create kernel: `poetry run python -m ipykernel install --user --name dspy-inspector --display-name "DSPy Inspector"`
4. Select `dspy-inspector` kernel in all notebooks

Run `poetry run inv help` for further commands and `poetry run inv <command> --help` for their usage.

## Contribute

Feel free to contribute to this project : ) .

## License

This project is licensed under the [GPL-3.0 License](https://opensource.org/licenses/GPL-3) - read the [LICENSE](LICENSE) file for details.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/neoxelox/dspy-inspector",
    "name": "dspy-inspector",
    "maintainer": "Alex Rodriguez",
    "docs_url": null,
    "requires_python": ">=3.11,<4.0",
    "maintainer_email": "me@arn.sh",
    "keywords": "dspy,inspector,program,pipeline,plugin,widget,notebook,jupyter,vscode,dspy-inspector",
    "author": "Alex Rodriguez",
    "author_email": "me@arn.sh",
    "download_url": "https://files.pythonhosted.org/packages/a0/5c/f0eca5a3347932ac00a6b9e1be96282fd013e28ff1152e90a55e744b3857/dspy_inspector-0.7.0.tar.gz",
    "platform": null,
    "description": "# dspy-inspector \ud83d\udd0d ![BETA](https://img.shields.io/badge/BETA-8b5cf6)\n\n**`DSPy program/pipeline inspector widget for Jupyter/VSCode Notebooks.`** \ud83d\udd2d\n\n> _**Note**: DSPy is going through a big refactor at this moment. Updates in the parsing logic are going to be halted in the meantime._\n\n![Demo](demo.gif)\n\n> Dark theme is coming soon\u2122.\n\n## Install\n\n\ud83d\udc49 `pip install dspy-inspector`\n\n## Usage\n\n```python\nfrom dspy_inspector import inspect\n\nclass MultiHopRAG(dspy.Module):\n    def __init__(self, passages_per_hop=3, max_hops=2):\n        ...\n\n    def forward(self, question):\n        ...\n\ninspect(MultiHopRAG)\n\n# Or \ud83d\udc47\n\nprogram = MultiHopRAG()\ninspect(program) # Automatically updates\nprogram(\"How many storeys are in the castle that David Gregory inherited?\")\n```\n\nCheck an example in the [`multi_hop_rag.ipynb`](examples/multi_hop_rag.ipynb) notebook.\n\n> All example notebooks are cached, no calls to LLMs are needed to run them.\n\n## Roadmap\n\nThis is a personal project I made to better understand what were my DSPy programs actually doing underneath. This extension is currently in **`BETA`**, so, expect bugs. For a roadmap on what things must be fixed or done check all the `TODOs` inside the source code.\n\n## Developing\n\nTo setup the virtual developing environment, follow these steps:\n\n1. Install dependencies: `poetry install`\n2. Install tools: `poetry run inv tool.install --include \"dev*\"`\n3. Create kernel: `poetry run python -m ipykernel install --user --name dspy-inspector --display-name \"DSPy Inspector\"`\n4. Select `dspy-inspector` kernel in all notebooks\n\nRun `poetry run inv help` for further commands and `poetry run inv <command> --help` for their usage.\n\n## Contribute\n\nFeel free to contribute to this project : ) .\n\n## License\n\nThis project is licensed under the [GPL-3.0 License](https://opensource.org/licenses/GPL-3) - read the [LICENSE](LICENSE) file for details.\n",
    "bugtrack_url": null,
    "license": "GPL-3.0",
    "summary": "DSPy program/pipeline inspector widget for Jupyter/VSCode Notebooks.",
    "version": "0.7.0",
    "project_urls": {
        "Documentation": "https://github.com/neoxelox/dspy-inspector",
        "Homepage": "https://github.com/neoxelox/dspy-inspector",
        "Repository": "https://github.com/neoxelox/dspy-inspector"
    },
    "split_keywords": [
        "dspy",
        "inspector",
        "program",
        "pipeline",
        "plugin",
        "widget",
        "notebook",
        "jupyter",
        "vscode",
        "dspy-inspector"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "1bddd83782176590e7e9c2d70ad48dbbd0790f006ae2e024ae5f326b7457c452",
                "md5": "ab883a9823bc6500652f48b0201afa75",
                "sha256": "0b1ef0922607d158b36726efe007e1b986d831cf179f222a4933638ea6b6eb95"
            },
            "downloads": -1,
            "filename": "dspy_inspector-0.7.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ab883a9823bc6500652f48b0201afa75",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11,<4.0",
            "size": 27029,
            "upload_time": "2024-02-15T12:46:54",
            "upload_time_iso_8601": "2024-02-15T12:46:54.969372Z",
            "url": "https://files.pythonhosted.org/packages/1b/dd/d83782176590e7e9c2d70ad48dbbd0790f006ae2e024ae5f326b7457c452/dspy_inspector-0.7.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a05cf0eca5a3347932ac00a6b9e1be96282fd013e28ff1152e90a55e744b3857",
                "md5": "c867de3ea463c9e739a71c77411ad205",
                "sha256": "bce4b5ff37ec7f0242db99fb99ddda3c2f44ae5ad7aba1a80a575896d6685ca9"
            },
            "downloads": -1,
            "filename": "dspy_inspector-0.7.0.tar.gz",
            "has_sig": false,
            "md5_digest": "c867de3ea463c9e739a71c77411ad205",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11,<4.0",
            "size": 26860,
            "upload_time": "2024-02-15T12:46:56",
            "upload_time_iso_8601": "2024-02-15T12:46:56.156311Z",
            "url": "https://files.pythonhosted.org/packages/a0/5c/f0eca5a3347932ac00a6b9e1be96282fd013e28ff1152e90a55e744b3857/dspy_inspector-0.7.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-15 12:46:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "neoxelox",
    "github_project": "dspy-inspector",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "dspy-inspector"
}
        
Elapsed time: 0.45906s