Registry / ai-ml / tabpfn-common-utils

tabpfn-common-utils

JSON →
library0.2.21pypypi✓ verified 79d ago

TabPFN Common Utilities (tabpfn-common-utils) provides shared helper functions, primarily focusing on telemetry and logging, used across various TabPFN codebases. It is currently at version 0.2.19 and maintains a frequent release cadence, often with minor updates and bug fixes.

pip install tabpfn-common-utils
INSTALL
IMPORT
SIG · TABPFN-COMMON-UTIL
T
tabpfn-common-utils
ai-mlpythonv0.2.21
Install
14.7s avg
Import
Disk
362MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.2.21 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
build_error
glibc
py 3.103.910 runs
installs and imports cleanly · install 14.7s · import 0.000s · 349MB
362MB installed
● package 362MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

annotations
from tabpfn_common_utils import annotations
from tabpfn_common_utils import TelemetryClient

This quickstart demonstrates how to initialize the `TelemetryClient` and `TabPFNLogger`. The `TelemetryClient` is configured to use an environment variable for the PostHog API key, falling back to a dummy key for development. It then logs an informational message and captures a custom telemetry event.

import os from tabpfn_common_utils.telemetry.client import TelemetryClient from tabpfn_common_utils.telemetry.logger import TabPFNLogger # Initialize TelemetryClient (API key can be passed directly or via POSTHOG_API_KEY env var) # For local testing, set POSTHOG_API_KEY in your environment, or pass a dummy string. # Data won't be sent if API key is invalid or not set in a production context. telemetry_client = TelemetryClient( api_key=os.environ.get('POSTHOG_API_KEY', 'phc_dummy_key_for_dev'), project_group="quickstart", project_name="example" ) # Initialize TabPFNLogger logger = TabPFNLogger(telemetry_client=telemetry_client) # Log a message logger.info("Quickstart example executed.") # Capture a custom event telemetry_client.capture( event_name="quickstart_event", properties={ "data_point_count": 100, "model_type": "test_model" } ) print("Telemetry client and logger initialized and events captured (if API key is valid).")
Debug
Known issues
gotchaTelemetry data is sent to PostHog by default. If you need to disable or control this for privacy or compliance, ensure you configure the `TelemetryClient` appropriately or set environment variables like `TABPFN_DISABLE_TELEMETRY`.
fix
Consult the source code or documentation for specific environment variables or constructor arguments to disable or configure telemetry. For instance, setting `POSTHOG_API_KEY` to an empty string might effectively disable it, or checking for an explicit 'disable' flag in future versions.
affects: All versions with telemetry.
gotchaThe `TelemetryClient` relies on the `POSTHOG_API_KEY` environment variable or direct `api_key` argument for proper functioning. If not provided or incorrect, telemetry events may not be sent, or the client might fail silently.
fix
Ensure `POSTHOG_API_KEY` is set correctly in your environment, or pass the `api_key` explicitly when initializing `TelemetryClient`. Verify network access if events are still not reaching PostHog.
affects: All versions with `TelemetryClient`.
breakingOlder versions (prior to v0.2.14) had an issue with timezone awareness for timestamps. This could lead to incorrect timestamps in telemetry data if not handled carefully.
fix
Upgrade to version `0.2.14` or newer to ensure correct timezone handling for telemetry events. If on older versions, ensure all timestamps are explicitly timezone-aware before passing them to the utility functions.
affects: < 0.2.14
Upgrade
Version history
0.2.21latest on PyPI · released Apr 28, 2026
Audit
Dependencies
posthogrequiredRequired for telemetry functionality to send events.
Agent activity
15 hits · last 30 days
node
12
Amazon
1
OpenAI (training)
1
Resources