Skip to main content

Embedding Atlas

A Python package that provides a command-line tool to visualize a dataset with embeddings. It also includes a Python notebook (e.g., Jupyter) widget and a Streamlit widget.

Installation

pip install embedding-atlas

and then launch the command line tool:

embedding-atlas [OPTIONS] INPUTS...

Loading Data

You can load your data in two ways: locally or from Hugging Face.

Loading Local Data

To get started with your own data, run:

embedding-atlas path_to_dataset.parquet

Loading Hugging Face Data

You can instead load datasets from Hugging Face:

embedding-atlas huggingface_org/dataset_name

Visualizing Embedding Projections

To visualize embedding projections, pre-compute the X and Y coordinates, and specify the column names with --x and --y, such as:

embedding-atlas path_to_dataset.parquet --x projection_x --y projection_y

You may use the SentenceTransformers package to compute high-dimensional embeddings from text data, and then use the UMAP package to compute 2D projections.

Using Pre-computed Vectors

If you already have pre-computed embedding vectors (but not the 2D projections), you can specify the column containing the vectors with --vector:

embedding-atlas path_to_dataset.parquet --vector embedding_vectors

This will apply UMAP dimensionality reduction to your pre-existing vectors without recomputing embeddings. The vectors should be stored as lists or numpy arrays in your dataset.

You may also specify a column for pre-computed nearest neighbors:

embedding-atlas path_to_dataset.parquet --x projection_x --y projection_y --neighbors neighbors

The neighbors column should have values in the following format: {"ids": [id1, id2, ...], "distances": [d1, d2, ...]}. If this column is specified, you'll be able to see nearest neighbors for a selected point in the tool.

Local Development

Launch Embedding Atlas with a wine reviews dataset with ./start.sh and the MNIST dataset with ./start_image.sh.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

embedding_atlas-0.22.0-py3-none-any.whl (28.8 MB view details)

Uploaded Python 3

File details

Details for the file embedding_atlas-0.22.0-py3-none-any.whl.

File metadata

File hashes

Hashes for embedding_atlas-0.22.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f1df323de60ae9e073c84c5e5767a764d651145f1e1668c65c1d1e434746568a
MD5 d5b84158c4d168a43b0309ba8402e0ca
BLAKE2b-256 b234e9eba339bd197a5081fb1207ea70a938f01eddfc4d2baab48dfe290dcc37

See more details on using hashes here.

Provenance

The following attestation bundles were made for embedding_atlas-0.22.0-py3-none-any.whl:

Publisher: ci.yml on apple/embedding-atlas

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page