Skip to main content

Drop-in tinker compatibility shim backed by the loops SDK

Project description

loops-tinker

Drop-in compatibility shim that provides the tinker package namespace backed by the loops SDK.

Installation

pip install loops-tinker

Usage

Existing code that uses import tinker works without modification:

import tinker

service_client = tinker.ServiceClient(training_project_id="proj_abc123")
training_client = service_client.create_lora_training_client(
    base_model="Qwen/Qwen3-8B", rank=16,
)
sampling_client = service_client.create_sampling_client(model="Qwen/Qwen3-8B")

All types are also available under tinker.types:

from tinker.types import SamplingParams, Datum, ModelInput
from tinker.types.tensor_data import TensorData

Using with tinker-cookbook

tinker-cookbook depends on tinker, but you can swap in loops-tinker using uv's override-dependencies to prevent the original tinker from being installed.

First add the override to pyproject.toml before installing any dependencies (there is no CLI command for this). If tinker-cookbook is added first, the original tinker gets installed and its files conflict with loops-tinker:

[tool.uv]
override-dependencies = [
    "tinker ; python_version < '0'",
]

Then add the dependencies:

uv init
uv add tinker-cookbook
uv add "loops @ git+https://github.com/basetenlabs/loops#subdirectory=loops"
uv add "loops-tinker @ git+https://github.com/basetenlabs/loops#subdirectory=loops-tinker"

loops is a transitive dep of loops-tinker but must be listed directly because [tool.uv.sources] only applies to direct dependencies. This won't be needed once loops is published to PyPI.

The tinker namespace will be provided by loops-tinker instead of the original package.

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

baseten_loops_tinker-0.4.1.tar.gz (13.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

baseten_loops_tinker-0.4.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file baseten_loops_tinker-0.4.1.tar.gz.

File metadata

  • Download URL: baseten_loops_tinker-0.4.1.tar.gz
  • Upload date:
  • Size: 13.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for baseten_loops_tinker-0.4.1.tar.gz
Algorithm Hash digest
SHA256 e32b2cea1d4a5019cece7f1df8b149a238bdb14fea89ced3a6ee2c17af78d52a
MD5 31478763fc6df4d116f0a0fc4f4fb1fa
BLAKE2b-256 0469d8c5ed611b40c7b103442e9907334331a24d1eae1191f802a41d33867df8

See more details on using hashes here.

Provenance

The following attestation bundles were made for baseten_loops_tinker-0.4.1.tar.gz:

Publisher: publish.yml on basetenlabs/baseten-loops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file baseten_loops_tinker-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for baseten_loops_tinker-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7e0934e17745aa0e07ede1ab29f3d15e752c979cbc1168d108dc832bc2e648b6
MD5 ed36a2170b59800167b8775f1eba00dc
BLAKE2b-256 a73ff9471b1f31733b804e9f081c5c32f81aa7f9116a2425553f45f513a50ec8

See more details on using hashes here.

Provenance

The following attestation bundles were made for baseten_loops_tinker-0.4.1-py3-none-any.whl:

Publisher: publish.yml on basetenlabs/baseten-loops

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page