Dataset Preview
The full dataset viewer is not available (click to read why). Only showing a preview of the rows.
The dataset generation failed because of a cast error
Error code: DatasetGenerationCastError
Exception: DatasetGenerationCastError
Message: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 1 new columns ({'Unnamed: 0'})
This happened while the csv dataset builder was generating data using
hf://datasets/towardsai-tutors/buster-ai-tutor-data-csv/advanced_rag_course.csv (at revision dd024716ca6aa7b94ea7150f5a3a9501f95f90ff)
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)
Traceback: Traceback (most recent call last):
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2013, in _prepare_split_single
writer.write_table(table)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/arrow_writer.py", line 585, in write_table
pa_table = table_cast(pa_table, self._schema)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2302, in table_cast
return cast_table_to_schema(table, schema)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/table.py", line 2256, in cast_table_to_schema
raise CastError(
datasets.table.CastError: Couldn't cast
Unnamed: 0: int64
title: string
content: string
source: string
url: string
-- schema metadata --
pandas: '{"index_columns": [{"kind": "range", "name": null, "start": 0, "' + 820
to
{'title': Value(dtype='string', id=None), 'url': Value(dtype='string', id=None), 'content': Value(dtype='string', id=None), 'source': Value(dtype='string', id=None)}
because column names don't match
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1396, in compute_config_parquet_and_info_response
parquet_operations = convert_to_parquet(builder)
File "/src/services/worker/src/worker/job_runners/config/parquet_and_info.py", line 1045, in convert_to_parquet
builder.download_and_prepare(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1029, in download_and_prepare
self._download_and_prepare(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1124, in _download_and_prepare
self._prepare_split(split_generator, **prepare_split_kwargs)
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 1884, in _prepare_split
for job_id, done, content in self._prepare_split_single(
File "/src/services/worker/.venv/lib/python3.9/site-packages/datasets/builder.py", line 2015, in _prepare_split_single
raise DatasetGenerationCastError.from_cast_error(
datasets.exceptions.DatasetGenerationCastError: An error occurred while generating the dataset
All the data files must have the same columns, but at some point there are 1 new columns ({'Unnamed: 0'})
This happened while the csv dataset builder was generating data using
hf://datasets/towardsai-tutors/buster-ai-tutor-data-csv/advanced_rag_course.csv (at revision dd024716ca6aa7b94ea7150f5a3a9501f95f90ff)
Please either edit the data files to have matching columns, or separate them into different configurations (see docs at https://hf.co/docs/hub/datasets-manual-configuration#multiple-configurations)Need help to make the dataset viewer work? Make sure to review how to configure the dataset viewer, and open a discussion for direct support.
title string | url string | content string | source string |
|---|---|---|---|
Deep Lake as a Vector Store for LLM Applications | https://docs.activeloop.ai/#deep-lake-as-a-vector-store-for-llm-applications | Store and search embeddings and their metadata including text, jsons, images, audio, video, and more. Save the data locally, in your cloud, or on Deep Lake storage.Build LLM Apps using or integrations with LangChain and LlamaIndexRun computations locally or on our Managed Tensor Database | activeloop |
Deep Lake as a Data Lake For Deep Learning | https://docs.activeloop.ai/#deep-lake-as-a-data-lake-for-deep-learning | Store images, audios, videos, text and their metadata (i.e. annotations) in a data format optimized for Deep Learning. Save the data locally, in your cloud, or on Activeloop storage.Rapidly train PyTorch and TensorFlow models while streaming data with no boilerplate code.Run version control, dataset queries, and distri... | activeloop |
To start using Deep Lake ASAP, check out our Vector Store Quickstart, Deep Learning Quickstart, Getting Started Guides, Tutorials, and Playbooks. | https://docs.activeloop.ai/ | Please check out Deep Lake's GitHub repository and give us a ⭐ if you like the project. Join our Slack Community if you need help or have suggestions for improving documentation! | activeloop |
Deep Lake Docs Overview | https://docs.activeloop.ai/#deep-lake-docs-overview | Vector Store QuickstartDeep Learning QuickstartStorage & CredentialsGetting StartedTutorials (w Colab)PlaybooksDataset VisualizationBest PracticesLow-Level API Summary | activeloop |
Deep Lake API Reference | https://docs.deeplake.ai/en/latest/#deep-lake-api-reference | Deep Lake is an open-source database for AI.Getting Started Installation Key Concepts Datasets Creating Datasets Loading Datasets Deleting and Renaming Datasets Copying Datasets Dataset Operations Dataset Visualization Dataset Credentials Dataset Properties Dataset Version Control Dataset Views Vector Store Creating a ... | activeloop |
Indices and tables | https://docs.deeplake.ai/en/latest/#indices-and-tables | Index Module Index Search Page | activeloop |
How to Get Started with Vector Search in Deep Lake in Under 5 Minutes | https://docs.activeloop.ai/quickstart#how-to-get-started-with-vector-search-in-deep-lake-in-under-5-minutes | If you prefer to use Deep Lake with LangChain, check out this tutorial. This quickstart focuses on vector storage and search, instead of end-2-end LLM apps, and it offers more customization and search options compared to the LangChain integration. | activeloop |
Installing Deep Lake | https://docs.activeloop.ai/quickstart#installing-deep-lake | Deep Lake can be installed using pip. By default, Deep Lake does not install dependencies for the compute engine, google-cloud, and other features. Details on all installation options are available here. This quickstart also requires OpenAI.!pip3 install deeplake!pip3 install openai | activeloop |
Performing Vector Search | https://docs.activeloop.ai/quickstart#performing-vector-search | Deep Lake offers highly-flexible vector search and hybrid search options discussed in detail in these tutorials. In this Quickstart, we show a simple example of vector search using default options, which performs cosine similarity search in Python on the client. prompt = 'What are the first programs he tried writing?'... | activeloop |
Creating Your First Vector Store | https://docs.activeloop.ai/quickstart#creating-your-first-vector-store | Let's embed and store one of Paul Graham's essays in a Deep Lake Vector Store stored locally. First, we download the data:Next, let's import the required modules and set the OpenAI environmental variables for embeddings:from deeplake.core.vectorstore import VectorStoreimport openaiimport osos.environ['OPENAI_API_KEY']... | activeloop |
Authentication | https://docs.activeloop.ai/quickstart#authentication | To use Deep Lake features that require authentication (Deep Lake storage, Tensor Database storage, connecting your cloud dataset to the Deep Lake UI, etc.) you should register in the Deep Lake App and authenticate on the client using the methods in the link below:User Authentication | activeloop |
Creating Vector Stores in the Deep Lake Managed Tensor Database | https://docs.activeloop.ai/quickstart#creating-vector-stores-in-the-deep-lake-managed-tensor-database | Deep Lake provides Managed Tensor Database that stores and runs queries on Deep Lake infrastructure, instead of the client. To use this service, specify runtime = {'tensor_db': True} when creating the Vector Store.# vector_store = VectorStore(# path = vector_store_path,# runtime = {'tensor_db': True}# )# vector_store.... | activeloop |
Next Steps | https://docs.activeloop.ai/quickstart#next-steps | Check out our Getting Started Guide for a comprehensive walk-through of Deep Lake Vector Stores. For scaling Deep Lake to production-level applications, check out our Managed Tensor Database and Support for Concurrent Writes.Congratulations, you've created a Vector Store and performed vector search using Deep Lake🤓 | activeloop |
Visualizing your Vector Store | https://docs.activeloop.ai/quickstart#visualizing-your-vector-store | Visualization is available for Vector Stores stored in or connected to Deep Lake. The vector store above is stored locally, so it cannot be visualized, but here's an example of visualization for a representative Vector Store. | activeloop |
Installing Deep Lake | https://docs.activeloop.ai/quickstart-dl#installing-deep-lake | Deep Lake can be installed using pip. By default, Deep Lake does not install dependencies for video, google-cloud, compute engine, and other features. Details on all installation options are available here. !pip3 install deeplake | activeloop |
Reading Samples From a Deep Lake Dataset | https://docs.activeloop.ai/quickstart-dl#reading-samples-from-a-deep-lake-dataset | Data is not immediately read into memory because Deep Lake operates lazily. You can fetch data by calling the .numpy() or .data() methods:# Indexingimage = ds.images[0].numpy() # Fetch the first image and return a numpy arraylabels = ds.labels[0].data() # Fetch the labels in the first image# Slicingimg_list = ds.label... | activeloop |
Fetching Your First Deep Lake Dataset | https://docs.activeloop.ai/quickstart-dl#fetching-your-first-deep-lake-dataset | Let's load the Visdrone dataset, a rich dataset with many object detections per image. Datasets hosted by Activeloop are identified by the host organization id followed by the dataset name: activeloop/visdrone-det-train.import deeplakedataset_path = 'hub://activeloop/visdrone-det-train'ds = deeplake.load(dataset_path)... | activeloop |
Visualizing a Deep Lake Dataset | https://docs.activeloop.ai/quickstart-dl#visualizing-a-deep-lake-dataset | Deep Lake enables users to visualize and interpret large datasets. The tensor layout for a dataset can be inspected using:ds.summary()The dataset can be visualized in the Deep Lake UI, or using an iframe in a Jupyter notebook:ds.visualize()Visualizing datasets in the Deep Lake UI will unlock more features and faster pe... | activeloop |
Creating Your Own Deep Lake Datasets | https://docs.activeloop.ai/quickstart-dl#creating-your-own-deep-lake-datasets | You can access all of the features above and more with your own datasets! If your source data conforms to one of the formats below, you can ingest them directly with 1 line of code. The ingestion functions support source data from the cloud, as well as creation of Deep Lake datasets in the cloud.YOLOCOCOClassifica... | activeloop |
Authentication | https://docs.activeloop.ai/quickstart-dl#authentication | To use Deep Lake features that require authentication (Activeloop storage, Tensor Database storage, connecting your cloud dataset to the Deep Lake UI, etc.) you should register in the Deep Lake App and authenticate on the client using the methods in the link below:User Authentication | activeloop |
Next Steps | https://docs.activeloop.ai/quickstart-dl#next-steps | Check out our Getting Started Guide for a comprehensive walk-through of Deep Lake. Also check out tutorials on Running Queries, Training Models, and Creating Datasets, as well as Playbooks about powerful use-cases that are enabled by Deep Lake.Congratulations, you've got Deep Lake working on your local machine🤓 | activeloop |
Storing Datasets in Your Own Cloud | https://docs.activeloop.ai/storage-and-credentials#storing-datasets-in-your-own-cloud | Deep Lake can be used as a pure OSS package without any registration or relationship with Activeloop. However, registering with Activeloop offers several benefits:Storage provided by ActiveloopAccess to the Tensor Database for performant vector searchAccess to Deep Lake App, which provides dataset visualization, queryi... | activeloop |
Compute Engine offers high-performance implementations of compute-heavy Deep Lake features, such as distributed dataloading, large queries, and indexing. The engine is built in C++ and the user-interface is in Python. | https://docs.activeloop.ai/performance-features/introduction#compute-engine-offers-high-performance-implementations-of-compute-heavy-deep-lake-features-such-as-d | The Deep Lake Compute Engine is only accessible to registered and authenticated users, and it applies usage restrictions based on your Deep Lake Plan. | activeloop |
Features Optimized in the Compute Engine: | https://docs.activeloop.ai/performance-features/introduction#features-optimized-in-the-compute-engine | Performant DataloaderTensor Query Language (TQL)Index for ANN SearchManaged Tensor Database | activeloop |
How to use Deep Lake's performant Dataloader built and optimized in C++ | https://docs.activeloop.ai/performance-features/performant-dataloader#how-to-use-deep-lakes-performant-dataloader-built-and-optimized-in-c++ | Deep Lake offers an optimized dataloader implementation built in C++, which is 1.5-3X faster than the pure-python implementation, and it supports distributed training. The C++ and Python dataloaders can be used interchangeably, and their syntax varies as shown below. | activeloop |
Pure-Python Dataloader | https://docs.activeloop.ai/performance-features/performant-dataloader#pure-python-dataloader | train_loader = ds_train.pytorch(num_workers = 8, transform = transform, batch_size = 32, tensors=['images', 'labels'], shuffle = True) | activeloop |
C++ Dataloader | https://docs.activeloop.ai/performance-features/performant-dataloader#c++-dataloader | The C++ dataloader is only accessible to registered and authenticated users, and it applies usage restrictions based on your Deep Lake Plan.The Deep Lake query engine is only accessible to registered and authenticated users, and it applies usage restrictions based on your Deep Lake Plan. | activeloop |
TensorFlow | https://docs.activeloop.ai/performance-features/performant-dataloader#tensorflow | train_loader = ds.dataloader()\ .transform(transform)\ .batch(32)\ .shuffle(True)\ .offset(10000)\ .tensorflow(tensors=['images', 'labels'], num_workers = 8) | activeloop |
Further Information | https://docs.activeloop.ai/performance-features/performant-dataloader#further-information | Training ModelsTraining Reproducibility Using Deep Lake and Weights & Biases | activeloop |
PyTorch (returns PyTorch Dataloader) | https://docs.activeloop.ai/performance-features/performant-dataloader#pytorch-returns-pytorch-dataloader | train_loader = ds.dataloader()\ .transform(transform)\ .batch(32)\ .shuffle(True)\ .offset(10000)\ .pytorch(tensors=['images', 'labels'], num_workers = 8) | activeloop |
How to query datasets using the Deep Lake Tensor Query Language (TQL) | https://docs.activeloop.ai/performance-features/querying-datasets#how-to-query-datasets-using-the-deep-lake-tensor-query-language-tql | Querying datasets is a critical aspect of data science workflows that enables users to filter datasets and focus their work on the most relevant data. Deep Lake offers a highly-performant query engine built in C++ and optimized for the Deep Lake data format. The Deep Lake query engine is only accessible to registered a... | activeloop |
Querying in the Vector Store Python API | https://docs.activeloop.ai/performance-features/querying-datasets#querying-in-the-vector-store-python-api | view = vector_store.search(query = <query_string>, exec_option = 'compute_engine') | activeloop |
Query Syntax | https://docs.activeloop.ai/performance-features/querying-datasets#query-syntax | TQL Syntax | activeloop |
Querying in the low-level Python API | https://docs.activeloop.ai/performance-features/querying-datasets#querying-in-the-low-level-python-api | Queries can also be performed in the Python API using:view = ds.query(<query_string>) | activeloop |
Saving and utilizing dataset query results in the low-level Python API | https://docs.activeloop.ai/performance-features/querying-datasets#saving-and-utilizing-dataset-query-results-in-the-low-level-python-api | The query results (Dataset Views) can be saved in the UI as shown above, or if the view is generated in Python, it can be saved using the Python API below. Full details are available here.ds_view.save_view(message = 'Samples with monarchs')In order to maintain data lineage, Dataset Views are immutable and are connected... | activeloop |
How to Use Deep Memory to Improve Retrieval Accuracy in Your LLM Apps | https://docs.activeloop.ai/performance-features/deep-memory#how-to-use-deep-memory-to-improve-retrieval-accuracy-in-your-llm-apps | Deep Memory is a suite of tools that enables you to optimize your Vector Store for your use-case and achieve higher accuracy in your LLM apps. | activeloop |
Embedding Transformation | https://docs.activeloop.ai/performance-features/deep-memory#embedding-transformation | Deep Memory computes a transformation that converts your embeddings into an embedding space that is tailored for your use case. This increases the accuracy of your Vector Search by up to 22%, which significantly impacts the user experience of your LLM applications. Furthermore, Deep Memory can also be used to decrease ... | activeloop |
How Deep Lake Implements an Index for ANN Search | https://docs.activeloop.ai/performance-features/index-for-ann-search#how-deep-lake-implements-an-index-for-ann-search | Deep Lake implements the Hierarchical Navigable Small World (HSNW) index for Approximate Nearest Neighbor (ANN) search. The index is based on the OSS Hsnwlib package with added optimizations. The implementation enables users to run queries on >35M embeddings in less than 1 second. | activeloop |
Unique aspects of Deep Lake's HSNW implementation | https://docs.activeloop.ai/performance-features/index-for-ann-search#unique-aspects-of-deep-lakes-hsnw-implementation | Rapid index creation with multi-threading optimized for Deep LakeEfficient memory management that reduces RAM usage | activeloop |
Memory Management in Deep Lake | https://docs.activeloop.ai/performance-features/index-for-ann-search#memory-management-in-deep-lake | RAM Cost >> On-disk Cost >> Object Storage CostMinimizing RAM usage and maximizing object store significantly reduces costs of running a Vector Database. Deep Lake has a unique implementation of memory allocation that minimizes RAM requirement without any performance penalty:Memory Architecture for the Deep Lake Vector... | activeloop |
Limitations | https://docs.activeloop.ai/performance-features/index-for-ann-search#limitations | The following limitations of the index are being implemented in upcoming releases:Index does not support incremental updates. If any update is made to the dataset, the index is re-created.If the search is performed using a combination of attribute and vector search, the index is not used and linear search is applied in... | activeloop |
Using the Index | https://docs.activeloop.ai/performance-features/index-for-ann-search#using-the-index | By default, the index is turned off in Deep Lake. To enable the index, during Vector Store initialization or loading, specify the Vector Store length threshold above which the index will be applied:vectorstore = VectorStore(path, index_params = {threshold: <threshold_int>}) | activeloop |
LangChain and LlamaIndex | https://docs.activeloop.ai/performance-features/managed-database#langchain-and-llamaindex | To use the Managed Vector Database in LangChain or Llama Index, specify dataset_path = hub://org_id/dataset_name and runtime = {'tensor_db': True} during Vector Store creation. | activeloop |
Overview of Deep Lake's Managed Tensor Database | https://docs.activeloop.ai/performance-features/managed-database#overview-of-deep-lakes-managed-tensor-database | Deep Lake offers a serverless Managed Tensor Database that eliminates the complexity of self-hosting and substantially lowers costs. Currently, it only supports dataset queries, including vector search, but additional features for creating and modifying data being added in December 2023.Comparison of Deep Lake as a Man... | activeloop |
REST API | https://docs.activeloop.ai/performance-features/managed-database#rest-api | A standalone REST API is available for interacting with the Managed Database:REST API | activeloop |
Further Information: | https://docs.activeloop.ai/performance-features/managed-database#further-information | Migrating Datasets to the Tensor Database | activeloop |
Vector Store use-cases are implemented using an API that balances simplicity and customizability | https://docs.activeloop.ai/getting-started#vector-store-use-cases-are-implemented-using-an-api-that-balances-simplicity-and-customizability | Vector Store | activeloop |
Deep Learning use-cases are implemented using the low-level API that offers maximum customizability | https://docs.activeloop.ai/getting-started#deep-learning-use-cases-are-implemented-using-the-low-level-api-that-offers-maximum-customizability | Deep Learning | activeloop |
Deep Lake Tutorials Based on Use-Case: | https://docs.activeloop.ai/tutorials#deep-lake-tutorials-based-on-use-case | Vector Store TutorialsDeep Learning Tutorials | activeloop |
Playbooks are comprehensive examples of end-to-end workflows using Activeloop products | https://docs.activeloop.ai/playbooks#playbooks-are-comprehensive-examples-of-end-to-end-workflows-using-activeloop-products | Querying, Training and Editing Datasets with Data LineageEvaluating Model PerformanceTraining Reproducibility Using Deep Lake and Weights & BiasesWorking with Videos | activeloop |
Import and Installation | https://docs.activeloop.ai/api-basics#import-and-installation | By default, Deep Lake does not install dependencies for audio, video, google-cloud, and other features. Details on installation options are available here. !pip3 install deeplakeimport deeplake | activeloop |
Loading Deep Lake Datasets | https://docs.activeloop.ai/api-basics#loading-deep-lake-datasets | Deep Lake datasets can be stored at a variety of storage locations using the appropriate dataset_path parameter below. We support S3, GCS, Activeloop storage, and are constantly adding to the list.# Load a Deep Lake Datasetds = deeplake.load('dataset_path', creds = {'optional'}, token = 'optional') | activeloop |
Deleting Datasets | https://docs.activeloop.ai/api-basics#deleting-datasets | ds.delete()deeplake.delete('dataset_path', creds = {'optional'}, token = 'optional', token = 'optional')API deletions of Deep Lake Cloud datasets are immediate, whereas UI-initiated deletions are postponed by 5 minutes. Once deleted, dataset names can't be reused in the Deep Lake Cloud. | activeloop |
Creating Deep Lake Datasets | https://docs.activeloop.ai/api-basics#creating-deep-lake-datasets | # Create an empty Deep Lake datasetds = deeplake.empty('dataset_path', creds = {'optional'}, token = 'optional')# Create an Deep Lake Dataset with the same tensors as another datasetds = deeplake.like(ds_object or 'dataset_path', creds = {'optional'}, token = 'optional')# Automatically create a Deep Lake Dataset from... | activeloop |
Visualizing and Inspecting Datasets | https://docs.activeloop.ai/api-basics#visualizing-and-inspecting-datasets | ds.visualize()ds.summary() | activeloop |
Appending Data to Datasets | https://docs.activeloop.ai/api-basics#appending-data-to-datasets | ds.append({'tensor_1': np.ones((1,4)), 'tensor_2': deeplake.read('image.jpg')})ds.my_group.append({'tensor_1': np.ones((1,4)), 'tensor_2': deeplake.read('image.jpg')}) | activeloop |
Appending/Updating Data in Individual Tensors | https://docs.activeloop.ai/api-basics#appending-updating-data-in-individual-tensors | # Append a single sampleds.my_tensor.append(np.ones((1,4)))ds.my_tensor.append(deeplake.read('image.jpg'))# Append multiple samples. The first axis in the # numpy array is assumed to be the sample axis for the tensords.my_tensor.extend(np.ones((5,1,4)))# Editing or adding data at a specific indexds.my_tensor[i] = dee... | activeloop |
Deleting data | https://docs.activeloop.ai/api-basics#deleting-data | # Removing samples by indexds.pop[i]# Delete all data in a tensords.<tensor_name>.clear()# Delete tensor and all of its datads.delete_tensor(<tensor_name>) | activeloop |
Creating Tensors | https://docs.activeloop.ai/api-basics#creating-tensors | # Specifying htype is recommended for maximizing performance.ds.create_tensor('my_tensor', htype = 'bbox')# Specifiying the correct compression is critical for images, videos, audio and # other rich data types. ds.create_tensor('songs', htype = 'audio', sample_compression = 'mp3') | activeloop |
Appending Empty Samples or Skipping Samples | https://docs.activeloop.ai/api-basics#appending-empty-samples-or-skipping-samples | # Data appended as None will be returned as an empty arrayds.append('tensor_1': deeplake.read(...), 'tensor_2': None)ds.my_tensor.append(None)# Empty arrays can be explicitly appended if the length of the shape # of the empty array matches that of the other samplesds.boxes.append(np.zeros((0,4)) | activeloop |
Connecting Deep Lake Datasets to ML Frameworks | https://docs.activeloop.ai/api-basics#connecting-deep-lake-datasets-to-ml-frameworks | # PyTorch Dataloaderdataloader = ds.pytorch(batch_size = 16, transform = {'images': torchvision_tform, 'labels': None}, num_workers = 2, scheduler = 'threaded')# TensorFlow Datasetds_tensorflow = ds.tensorflow()# Enterprise Dataloaderdataloader = ds.dataloader().batch(batch_size = 64).pytorch(num_workers = 8) | activeloop |
Accessing Tensor Data | https://docs.activeloop.ai/api-basics#accessing-tensor-data | # Read the i-th tensor samplenp_array = ds.my_tensor[i].numpy()text = ds.my_text_tensor[i].data() # More comprehensive view of the databytes = ds.my_tensor[i].tobytes() # More comprehensive view of the data# Read the i-th dataset sample as a numpy arrayimage = ds[i].images.numpy()# Read the i-th labels as a numpy arr... | activeloop |
Creating Tensor Hierarchies | https://docs.activeloop.ai/api-basics#creating-tensor-hierarchies | ds.create_group('my_group')ds.my_group.create_tensor('my_tensor')ds.create_tensor('my_group/my_tensor') #Automatically creates the group 'my_group' | activeloop |
Querying Datasets and Saving Dataset Views | https://docs.activeloop.ai/api-basics#querying-datasets-and-saving-dataset-views | A full list of supported queries is shown here. view = ds.query('Select * where contains(labels, 'giraffe')')view.save_view(optimize = True)view = ds.load_view(id = 'query_id')# Return the original dataset indices that satisfied the query conditionindices = list(view.sample_indices) | activeloop |
Adding Tensor and Dataset-Level Metadata | https://docs.activeloop.ai/api-basics#adding-tensor-and-dataset-level-metadata | # Add or update dataset metadatads.info.update(key1 = 'text', key2 = number)# Also can run ds.info.update({'key1'='value1', 'key2' = num_value})# Add or update tensor metadatads.my_tensor.info.update(key1 = 'text', key2 = number)# Delete metadatads.info.delete() #Delete all metadatads.info.delete('key1') #Delete 1 ke... | activeloop |
Copying datasets | https://docs.activeloop.ai/api-basics#copying-datasets | # Fastest option - copies everything including version historyds = deeplake.deepcopy('src_dataset_path', 'dest_dataset_path', src_creds, dest_creds, token)# Slower option - copies only data on the last commitds = deeplake.copy('src_dataset_path', 'dest_dataset_path', src_creds, dest_creds, token) | activeloop |
Advanced | https://docs.activeloop.ai/api-basics#advanced | # Load a Deep Lake Dataset if it already exists (same as deeplake.load), or initialize # a new Deep Lake Dataset if it does not already exist (same as deeplake.empty)ds = deeplake.dataset('dataset_path', creds = {'optional'}, token = 'optional')# Append multiple samples using a listds.my_tensor.extend([np.ones((1,4))... | activeloop |
Versioning Datasets | https://docs.activeloop.ai/api-basics#versioning-datasets | # Commit datacommit_id = ds.commit('Added 100 images of trucks')# Print the commit loglog = ds.log()# Checkout a branch or commit ds.checkout('branch_name' or commit_id)# Create a new branchds.checkout('new_branch', create = True)# Examine differences between commitsds.diff()# Delete all changes since the previous... | activeloop |
Maximizing performance | https://docs.activeloop.ai/api-basics#maximizing-performance | Make sure to use the with context when making any updates to datasets. with ds: ds.create_tensor('my_tensor') for i in range(10): ds.my_tensor.append(i) | activeloop |
How to use Deep Lake at Scale with best practices | https://docs.activeloop.ai/technical-details/best-practices#how-to-use-deep-lake-at-scale-with-best-practices | | activeloop |
Tensors | https://docs.activeloop.ai/technical-details/data-layout#tensors | Deep Lake uses a columnar storage architecture, and the columns in Deep Lake are referred to as tensors. Data in the tensors can be added or modified, and the data in different tensors are independent of each other. | activeloop |
Hidden Tensors | https://docs.activeloop.ai/technical-details/data-layout#hidden-tensors | When data is appended to Deep Lake, certain important information is broken up and duplicated in a separate tensor, so that the information can be accessed and queried without loading all of the data. Examples include the shape of a sample (i.e. width, height, and number of channels for an image), or the metadata from ... | activeloop |
Indexing and Samples | https://docs.activeloop.ai/technical-details/data-layout#indexing-and-samples | Deep Lake datasets and their tensors are indexed, and data at a given index that spans multiple tensors are referred to as samples. Data at the same index are assumed to be related. For example, data in a bbox tensor at index 100 is assumed to be related to data in the tensor image at index 100. | activeloop |
Chunking | https://docs.activeloop.ai/technical-details/data-layout#chunking | Most data in Deep Lake format is stored in chunks, which are a blobs of data of a pre-defined size. The purpose of chunking is to accelerate the streaming of data across networks by increasing the amount of data that is transferred per network request.Each tensors has its own chunks, and the default chunk size is 8MB. ... | activeloop |
Groups | https://docs.activeloop.ai/technical-details/data-layout#groups | Multiple tensor can be combined into groups. Groups do not fundamentally change the way data is stored, but they are useful for helping Activeloop Platform understand how different tensors are related. | activeloop |
Length of a Dataset | https://docs.activeloop.ai/technical-details/data-layout#length-of-a-dataset | Deep Lake allows for ragged tensors (tensors of different length), so it is important to understand the terminology around dataset length:length (ds.len or len(ds)) - The length of the shortest tensor, as determined by its last index.minimum length (ds.min_len) - Same as lengthminimum length (ds.max_len) - The length o... | activeloop |
Understanding the Interaction Between Deep Lake's Versions, Queries, and Dataset Views. | https://docs.activeloop.ai/technical-details/version-control-and-querying#understanding-the-interaction-between-deep-lakes-versions-queries-and-dataset-views. | Version control is the core of the Deep Lake data format, and it interacts with queries and view as follows:Datasets have commits and branches, and they can be traversed or merged using Deep Lake's Python API. Queries are applied on top of commits, and in order to save a query result as a view, the dataset cannot be in... | activeloop |
Version Control HEAD Commit | https://docs.activeloop.ai/technical-details/version-control-and-querying#version-control-head-commit | Unlike Git, Deep Lake's dataset version control does not have a local staging area because all dataset updates are immediately synced with the permanent storage location (cloud or local). Therefore, any changes to a dataset are automatically stored in a HEAD commit on the current branch. This means that the uncommitted... | activeloop |
How to visualize machine learning datasets | https://docs.activeloop.ai/technical-details/dataset-visualization#how-to-visualize-machine-learning-datasets | Deep Lake has a web interface for visualizing, versioning, and querying machine learning datasets. It utilizes the Deep Lake format under-the-hood, and it can be connected to datasets stored in all Deep Lake storage locations. | activeloop |
Visualization can be performed in 3 ways: | https://docs.activeloop.ai/technical-details/dataset-visualization#visualization-can-be-performed-in-3-ways | 1.In the Deep Lake UI (most feature-rich and performant option)2.In the python API using ds.visualize()3.In your own application using our integration options. | activeloop |
Requirements for correctly visualizing your own datasets | https://docs.activeloop.ai/technical-details/dataset-visualization#requirements-for-correctly-visualizing-your-own-datasets | Deep Lake makes assumptions about underlying data types and relationships between tensors in order to display the data correctly. Understanding the following concepts is necessary in order to use the visualizer: 1.Data Types (htypes)2.Relationships between tensors | activeloop |
Downsampling Data for Faster Visualization | https://docs.activeloop.ai/technical-details/dataset-visualization#downsampling-data-for-faster-visualization | For faster visualization of images and masks, tensors can be downsampled during dataset creation. The downsampled data are stored in the dataset and are automatically rendered by the visualizer depending on the zoom level. To add downsampling to your tensors, specify the downsampling factor and the number of downsampli... | activeloop |
Indexing | https://docs.activeloop.ai/technical-details/tensor-relationships#indexing | Hub datasets and their tensors are indexed like ds[index] or ds.tensor_name[index], and data at the same index are assumed to be related. For example, a bounding_box at index 100 is assumed to apply to the image at index 100. | activeloop |
Relationships Between Tensors | https://docs.activeloop.ai/technical-details/tensor-relationships#relationships-between-tensors | For datasets with multiple tensors, it is important to follow the conventions below in order for the visualizer to correctly infer how tensors are related.By default, in the absence of groups, the visualizer assumes that all tensors are related to each other. This works well for simple use cases. For example, it is cor... | activeloop |
HTML iframe (Alpha) | https://docs.activeloop.ai/technical-details/visualizer-integration#html-iframe-alpha | To embed into your html page, you can use our iframe integration:<iframe src='https://app.activeloop.ai/visualizer/iframe?url=hub://activeloop/imagenet-train' width='800px' height='600px'>iframe URL: Params:url - The url of the dataset vs - Visualizer state, which can be obtained from the platform url token - User toke... | activeloop |
How to embed the Activeloop visualizer into your own web applications | https://docs.activeloop.ai/technical-details/visualizer-integration#how-to-embed-the-activeloop-visualizer-into-your-own-web-applications | Visualization engine allows the user to visualize, explore, and interact with Deep Lake datasets. In addition to using through the Activeloop UI or in Python, the Activeloop visualizer can also be embedded into your application. | activeloop |
Javascript API (Alpha) | https://docs.activeloop.ai/technical-details/visualizer-integration#javascript-api-alpha | To have more fine grained control, you can embed the visualizer using Javascript:<div id='container'></div><script src='https://app.activeloop.ai/visualizer/vis.js'></script><script> let container = document.getElementById('container') window.vis.visualize('hub://activeloop/imagenet-train', null, null, container, null)... | activeloop |
How Shuffling Works in Deep Lake's PyTorch DataLoader | https://docs.activeloop.ai/technical-details/shuffling-in-dataloaders#how-shuffling-works-in-deep-lakes-pytorch-dataloader | The Deep Lake shuffling algorithm is based upon a shuffle buffer that preloads a specified amount of data (in MB) determined by the buffer_size parameter in ds.pytorch(buffer_size = 2048). First, the dataloader randomly selects chunks from the applicable tensors until the shuffle buffer is full. Next, the indices in sh... | activeloop |
Providing Feedback | https://docs.activeloop.ai/technical-details/how-to-contribute#providing-feedback | We love feedback! Please join our Slack Community or raise an issue in Github. | activeloop |
Getting Started With Development | https://docs.activeloop.ai/technical-details/how-to-contribute#getting-started-with-development | Clone the repository:git clone https://github.com/activeloopai/deeplake cd deeplake If you are using Linux, install environment dependencies:apt-get -y updateapt-get -y install git wget build-essential python-setuptools python3-dev libjpeg-dev libpng-dev zlib1g-devapt install build-essentialIf you are planning to work ... | activeloop |
Using Docker (optional) | https://docs.activeloop.ai/technical-details/how-to-contribute#using-docker-optional | You can use docker-compose for running testsdocker-compose -f ./bin/docker-compose.yaml up --build localand even work inside the docker by building the image and bashing into.docker build -t activeloop-deeplake:latest -f ./bin/Dockerfile.dev .docker run -it -v $(pwd):/app activeloop-deeplake:latest bash$ python3 -c 'im... | activeloop |
Linting | https://docs.activeloop.ai/technical-details/how-to-contribute#linting | Deep Lake uses the black python linter. You can auto-format your code by running pip install black, and the run black . inside the directory you want to format. | activeloop |
Docstrings | https://docs.activeloop.ai/technical-details/how-to-contribute#docstrings | Deep Lake uses Google Docstrings. Please refer to this example to learn more. | activeloop |
Typing | https://docs.activeloop.ai/technical-details/how-to-contribute#typing | Deep Lake uses static typing for function arguments/variables for better code readability. Deep Lake has a GitHub action that runs mypy ., which runs similar to pytest . to check for valid static typing. You can refer to mypy documentation for more information. | activeloop |
Prerequisites | https://docs.activeloop.ai/technical-details/how-to-contribute#prerequisites | Understand how to write pytest tests.Understand what a pytest fixture is.Understand what pytest parametrizations are. | activeloop |
Testing | https://docs.activeloop.ai/technical-details/how-to-contribute#testing | Deep Lake uses pytest for tests. In order to make it easier to contribute, Deep Lake also has a set of custom options defined here. | activeloop |
Options | https://docs.activeloop.ai/technical-details/how-to-contribute#options | To see a list of Deep Lake's custom pytest options, run this command: pytest -h | sed -En '/custom options:/,/\[pytest\] ini\-options/p'. | activeloop |
Fixtures | https://docs.activeloop.ai/technical-details/how-to-contribute#fixtures | You can find more information on pytest fixtures here.memory_storage: If --memory-skip is provided, tests with this fixture will be skipped. Otherwise, the test will run with only a MemoryProvider.local_storage: If --local is not provided, tests with this fixture will be skipped. Otherwise, the test will run with only ... | activeloop |
Fixture Examples | https://docs.activeloop.ai/technical-details/how-to-contribute#fixture-examples | Single storage provider fixture:def test_memory(memory_storage): # Test will skip if `--memory-skip` is provided memory_storage['key'] = b'1234' # This data will only be stored in memorydef test_local(local_storage): # Test will skip if `--local` is not provided memory_storage['key'] = b'1234' # This data will only be... | activeloop |
Benchmarks | https://docs.activeloop.ai/technical-details/how-to-contribute#benchmarks | Deep Lake uses pytest-benchmark for benchmarking, which is a plugin for pytest. | activeloop |
End of preview.
No dataset card yet
- Downloads last month
- 69