Arrow-based artifact handlers for Lazyscribe
Project description
Arrow-based artifact handling for lazyscribe
lazyscribe-arrow is a lightweight package that adds the following artifact handlers for lazyscribe:
csv, andparquet.
Any data structure that implements the Arrow PyCapsule Interface will be compatible with the handlers in this library. Popular compatible open source data structures include
pandas.DataFramepolars.DataFramepolars.LazyFrame
This library also adds interchange methods to construct a pyarrow.Table from lazyscribe.Project and lazyscribe.Repository objects.
Installation
Python 3.10 and above is required. use pip to install:
$ python -m pip install lazyscribe-arrow
Usage
Artifact handlers
To use this library, simply log an artifact to a lazyscribe experiment or repository with
handler="csv"for a CSV output
import pyarrow as pa
from lazyscribe import Project
project = Project("project.json", mode="w")
with project.log("My experiment") as exp:
data = pa.Table.from_arrays([[0, 1, 2]], names=["a"])
exp.log_artifact(name="data", value=data, handler="csv")
project.save()
Interchange
To convert your lazyscribe.Project to a pyarrow.Table object, call lazyscribe_arrow.interchange.to_table:
import pyarrow as pa
from lazyscribe import Project
from lazyscribe_arrow.interchange import to_table
project = Project("project.json", mode="w")
with project.log("My experiment") as exp:
data = pa.Table.from_arrays([[0, 1, 2]], names=["a"])
exp.log_artifact(name="data", value=data, handler="csv")
table = to_table(project)
The same function works for lazyscribe.Repository objects.
import pyarrow as pa
from lazyscribe import Repository
from lazyscribe_arrow.interchange import to_table
repo = Repository("repository.json", mode="w")
data = pa.Table.from_arrays([[0, 1, 2]], names=["a"])
repo.log_artifact(name="data", value=data, handler="csv")
table = to_table(repo)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lazyscribe_arrow-0.3.2.tar.gz.
File metadata
- Download URL: lazyscribe_arrow-0.3.2.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
06d2bce1e68a7acbedbd7f50d868b85d60cf03f55f7452fd4cd755fbbbe0d9eb
|
|
| MD5 |
10fd18c2bb1e5b295c1f6e582af37955
|
|
| BLAKE2b-256 |
a6dd61aa536e6c4ce555a10700e0b9b7101a2a0cb333703434a6025c132b749a
|
File details
Details for the file lazyscribe_arrow-0.3.2-py3-none-any.whl.
File metadata
- Download URL: lazyscribe_arrow-0.3.2-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: uv/0.11.4 {"installer":{"name":"uv","version":"0.11.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0643828b9d29bbbdbaf0f5c7018edcbca25be377191200f6dce3ef802bcd0dc1
|
|
| MD5 |
de1527175c38912907df6bbca24c56fa
|
|
| BLAKE2b-256 |
088931279e5c39e286d5f87ca9249078c319def7ed2e43ee65396daa0f113a96
|