Skip to main content

astra-augment

PyPI Python License: MIT

SFT data augmentation via conversation truncation for tool-calling trajectories.

Part of the Astra ecosystem — a data factory for high-quality multi-turn tool-calling conversation trajectories.

Install

pip install astra-augment

Usage

# Expand last 20% of tool calls into separate training samples
astra-augment expand input.jsonl -o output.jsonl --ratio 0.2 --mode tool_call

# Expand last 40% of assistant responses
astra-augment expand input.jsonl -o output.jsonl --ratio 0.4 --mode response

Modes

  • tool_call: Truncates conversations at assistant tool-call positions (skips those followed by failed responses)
  • response: Truncates at assistant response positions (excludes the final one to avoid duplicating the original)

Parameters

Parameter Description
--ratio Fraction of tail positions to expand (0, 1]
--mode Truncation mode: tool_call or response
--format Dataset format (default: qwen3)
-o Output JSONL path

Development

# Clone and set up
git clone https://github.com/zhangdw156/astra-augment.git
cd astra-augment
uv sync --all-groups

# Run tests
uv run pytest

# Lint
uv run ruff check .

License

MIT

Metadata

Release files for astra-augment 0.7.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for astra-augment 0.7.0
File Size Uploaded Provenance Actions
astra_augment-0.7.0.tar.gz 21.8 kB Without provenance Details for astra_augment-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for astra-augment 0.7.0
File Interpreter ABI Platform Actions
astra_augment-0.7.0-py3-none-any.whl Python 3 none any Details for astra_augment-0.7.0-py3-none-any.whl

Total release size: 28.7 kB

Release files / astra_augment-0.7.0.tar.gz

Download URL astra_augment-0.7.0.tar.gz
Size 21.8 kB
Tags Source
SHA-256 checksum
How to use checksums
815b6609abecf8b8e3917262f89a2112a156ebc25aadccf5b56889203899bdd2
BLAKE2b-256 checksum
How to use checksums
c88ec2b454681147bbae0e5fa0b4f63ca25da5c6f27fd899ca4fc44dd858c918
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","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}

Release files / astra_augment-0.7.0-py3-none-any.whl

Download URL astra_augment-0.7.0-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
af5cb95142554fc261c691fd9882689aa8c26cb2a8245639b2443faf5b6d0221
BLAKE2b-256 checksum
How to use checksums
1468387234a8a887d1087c82316caa4639082d10cb2d661e0a8c551cb12846fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.12 {"installer":{"name":"uv","version":"0.11.12","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}

Security for astra-augment 0.7.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page