Metadata-Version: 2.1
Name: scale-nucleus
Version: 0.4.5
Summary: The official Python client library for Nucleus, the Data Platform for AI
Home-page: https://scale.com/nucleus
License: MIT
Author: Scale AI Nucleus Team
Author-email: nucleusapi@scaleapi.com
Requires-Python: >=3.6.2,<4.0.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Requires-Dist: Sphinx (>=4.2.0,<5.0.0)
Requires-Dist: aiohttp (>=3.7.4,<4.0.0)
Requires-Dist: dataclasses (>=0.7,<0.8); python_full_version >= "3.6.1" and python_version < "3.7"
Requires-Dist: isort (>=5.10.1,<6.0.0)
Requires-Dist: nest-asyncio (>=1.5.1,<2.0.0)
Requires-Dist: pydantic (>=1.8.2,<2.0.0)
Requires-Dist: requests (>=2.23.0,<3.0.0)
Requires-Dist: tqdm (>=4.41.0,<5.0.0)
Project-URL: Documentation, https://dashboard.scale.com/nucleus/docs/api
Project-URL: Repository, https://github.com/scaleapi/nucleus-python-client
Description-Content-Type: text/markdown

# Nucleus

https://dashboard.scale.com/nucleus

Aggregate metrics in ML are not good enough. To improve production ML, you need to understand their qualitative failure modes, fix them by gathering more data, and curate diverse scenarios.

Scale Nucleus helps you:

- Visualize your data
- Curate interesting slices within your dataset
- Review and manage annotations
- Measure and debug your model performance

Nucleus is a new way—the right way—to develop ML models, helping us move away from the concept of one dataset and towards a paradigm of collections of scenarios.

## Installation

`$ pip install scale-nucleus`

## Common issues/FAQ

### Outdated Client

Nucleus is iterating rapidly and as a result we do not always perfectly preserve backwards compatibility with older versions of the client. If you run into any unexpected error, it's a good idea to upgrade your version of the client by running
```
pip install --upgrade scale-nucleus
```

## Usage

For the most up to date documentation, reference: https://dashboard.scale.com/nucleus/docs/api?language=python.

## For Developers

Clone from github and install as editable

```
git clone git@github.com:scaleapi/nucleus-python-client.git
cd nucleus-python-client
pip3 install poetry
poetry install
```

Please install the pre-commit hooks by running the following command:

```python
poetry run pre-commit install
```

When releasing a new version please add release notes to the changelog in `CHANGELOG.md`.

**Best practices for testing:**
(1). Please run pytest from the root directory of the repo, i.e.

```
poetry run pytest tests/test_dataset.py
```

(2) To skip slow integration tests that have to wait for an async job to start.

```
poetry run pytest -m "not integration"
```

**Updating documentation:**
We use [Sphinx](https://www.sphinx-doc.org/en/master/) to autogenerate our API Reference from docstrings.

To test your local docstring changes, run the following commands from the repository's root directory:
```
poetry shell
cd docs
sphinx-autobuild . ./_build/html --watch ../nucleus
```
`sphinx-autobuild` will spin up a server on localhost (port 8000 by default) that will watch for and automatically rebuild a version of the API reference based on your local docstring changes.

