ETA (Extensible Toolkit for Analytics)
Voxel51 ETA (Extensible Toolkit for Analytics) is an internal Python library primarily designed to power the Voxel51 FiftyOne computer vision framework. It provides core utilities for data handling, media processing (video/image), and other analytical tasks. The current version is 0.15.5, with frequent patch and minor releases.
Common errors
-
ModuleNotFoundError: No module named 'eta'
cause The `voxel51-eta` package has not been installed in your current Python environment.fixInstall the library using pip: `pip install voxel51-eta` -
TypeError: fromstring() was called with a non-string type.
cause You are likely using an older version of `voxel51-eta` (prior to `0.15.3`) with `numpy>=2.0`, which deprecated `numpy.fromstring` in favor of `numpy.frombuffer` for bytes-like objects.fixUpgrade `voxel51-eta` to `0.15.3` or newer to fix `numpy` compatibility issues: `pip install --upgrade voxel51-eta` -
AttributeError: module 'eta.core.datasets' has no attribute 'ETADataset'
cause You are attempting to access a specific class or function (`ETADataset` in this case) that might have been renamed, moved, or removed in your version of `eta`. As an internal toolkit, its API can be less stable and more subject to change.fixConsult the `voxel51-eta` source code or `FiftyOne` documentation for the correct API. For typical use cases, consider using `FiftyOne` directly as it provides a stable and documented interface.
Warnings
- gotcha The `voxel51-eta` library is primarily an internal toolkit developed for Voxel51's FiftyOne computer vision framework. While public on PyPI, it is not typically used as a standalone library by end-users. Its APIs might be less stable or documented for independent development compared to external-facing libraries.
- breaking Python 2 compatibility was completely removed in `v0.15.0`. The library now strictly requires Python 3.9 or newer.
- gotcha Compatibility issues with `numpy>=2.0` were addressed in `v0.15.3`, specifically regarding video processing operations that used `numpy.fromstring` (now `numpy.frombuffer`). If you encounter errors related to `fromstring()` with recent NumPy versions, your `eta` version might be too old.
Install
-
pip install voxel51-eta
Imports
- Config
from eta.core.config import Config
- ETADataset
from eta.core.datasets import ETADataset
- get_eta_data_dir
from eta.core.utils import get_eta_data_dir
Quickstart
import os
from eta.core.utils import get_eta_data_dir
# ETA is primarily an internal toolkit for FiftyOne.
# This quickstart demonstrates a basic utility function.
try:
eta_data_dir = get_eta_data_dir()
print(f"ETA data directory: {eta_data_dir}")
if not os.path.exists(eta_data_dir):
print(f"Creating ETA data directory at: {eta_data_dir}")
os.makedirs(eta_data_dir)
# Example: creating a dummy file in the ETA data directory
dummy_file_path = os.path.join(eta_data_dir, "quickstart_dummy.txt")
with open(dummy_file_path, "w") as f:
f.write("This is a dummy file created by ETA quickstart.")
print(f"Dummy file created at: {dummy_file_path}")
except Exception as e:
print(f"An error occurred: {e}")
print("ETA is an internal toolkit; direct usage might require deeper knowledge of its integration with FiftyOne.")