UNOFFICIAL Weaviate demo data uploader
This is an educational project that aims to make it easy to upload demo data to your instance of Weaviate. The target audience is developers learning how to use Weaviate.
Usage
pip install -U weaviate-demo-datasets
Each dataset includes a default vectorizer configuration for convenience. The target Weaviate instance must include the specified vectorizer module.
Once you instantiate a dataset, you can upload it to Weaviate with the following:
import weaviate_datasets as wd
dataset = wd.JeopardyQuestions1k() # Instantiate dataset
dataset.upload_dataset(client) # Pass the Weaviate client instance
Where client is the instantiated weaviate.WeaviateClient object, such as:
import weaviate
import os
client = weaviate.connect_to_local(
headers={"X-OpenAI-Api-Key": os.getenv("OPENAI_APIKEY")}
)
To use a weaviate.Client object, use 0.5.x or older version of this package.
Built-in methods
.upload_dataset(client)- add defined classes to schema, adds objects.get_sample()- yields sample data object(s)
Available classes
-
Wiki100 (Top 100 Wikipedia articles)
WikiChunkcollection- Various chunking options available:
- Default:
wiki_sections(sections of the Wikipedia article) wiki_section_chunked(sections of the Wikipedia article, chunked into 200 character chunks)wiki_heading_only(only the headings of the Wikipedia article sections)fixed(fixed length chunks of 200 characters)
- Default:
- Use it as follows:
d = wd.Wiki100() d.collection_name = "WikiChunk" d.set_chunking("wiki_section_chunked") upload_responses = d.upload_dataset(client, overwrite=True)
-
WineReviews (50 wine reviews)
WineReviewcollection
-
WineReviewsNV (50 wine reviews)
WineReviewNVcollection, with named vectors ("title", "review_body", and "title_country")- "title_country" -> Vector from concatenation of "title" + "country"
-
WineReviewsMT (50 wine reviews)
WineReviewMTcollection, tenantstenantAandtenantB
-
JeopardyQuestions1k (1,000 Jeopardy questions & answers, vectorized with OpenAI
text-embedding-ada-002)JeopardyQuestionandJeopardyCategorycollections
-
JeopardyQuestions10k (10,000 Jeopardy questions & answers, vectorized with OpenAI
text-embedding-ada-002)JeopardyQuestionandJeopardyCategorycollections
-
NewsArticles (News articles, including their corresponding publications, authors & categories, vectorized with OpenAI
text-embedding-ada-002)
Available classes - V3 collection
These are available with a V3 suffix, and are compatible with the Weaviate Python client v3.x.
Not including vectors
- WineReviews (50 wine reviews)
- WineReviewsMT (50 wine reviews, multi-tenancy enabled)
Including vectors
- JeopardyQuestions1k (1,000 Jeopardy questions & answers, vectorized with OpenAI
text-embedding-ada-002) - JeopardyQuestions10k (10,000 Jeopardy questions & answers, vectorized with OpenAI
text-embedding-ada-002) - JeopardyQuestions1kMT (1,000 Jeopardy questions & answers, multi-tenancy enabled, vectorized with OpenAI
text-embedding-ada-002) - NewsArticles (News articles, including their corresponding publications, authors & categories, vectorized with OpenAI
text-embedding-ada-002)
Data sources
https://www.kaggle.com/datasets/zynicide/wine-reviews https://www.kaggle.com/datasets/tunguz/200000-jeopardy-questions https://github.com/weaviate/DEMO-NewsPublications
Source code
Metadata
Release files for weaviate-demo-datasets 0.8.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| weaviate_demo_datasets-0.8.1.tar.gz | 69.5 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| weaviate_demo_datasets-0.8.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 143.4 MB
Release files / weaviate_demo_datasets-0.8.1.tar.gz
| Download URL | weaviate_demo_datasets-0.8.1.tar.gz |
|---|---|
| Size | 69.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d2b23f138cf4c5c3f9142869be093a8ac645cd3c266a5106fb64b8d9b1f045a4
|
|
BLAKE2b-256 checksum How to use checksums |
ae6b558755735d030542b28c5a0a8c051691409930e4975983b97d2e8d926602
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|
Release files / weaviate_demo_datasets-0.8.1-py3-none-any.whl
| Download URL | weaviate_demo_datasets-0.8.1-py3-none-any.whl |
|---|---|
| Size | 73.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1495bd908200f0dac88c6c2aa4a8bc8c5a0b1b4636b407232a79be7ffd9a1291
|
|
BLAKE2b-256 checksum How to use checksums |
ffc9f78f61ea1745b16968b4ee343c7f00a8977d9577cf71e02ecdb8f518cd3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.10.12
|