Buckets:
API Reference
Run[[trackio.Run]]
class trackio.Runtrackio.Run
finishtrackio.Run.finish
init[[trackio.init]]
trackio.inittrackio.initstr) --
The name of the project (can be an existing project to continue tracking or
a new project to start tracking from scratch).
name (
str, optional) -- The name of the run (if not provided, a default name will be generated).group (
str, optional) -- The name of the group which this run belongs to in order to help organize related runs together. You can toggle the entire group's visibilitiy in the dashboard.space_id (
str, optional) -- If provided, the project will be logged to a Hugging Face Space instead of a local directory. Should be a complete Space name like"username/reponame"or"orgname/reponame", or just"reponame"in which case the Space will be created in the currently-logged-in Hugging Face user's namespace. If the Space does not exist, it will be created. If the Space already exists, the project will be logged to it.space_storage (SpaceStorage, optional) -- Choice of persistent storage tier.
dataset_id (
str, optional) -- If aspace_idis provided, a persistent Hugging Face Dataset will be created and the metrics will be synced to it every 5 minutes. Specify a Dataset with name like"username/datasetname"or"orgname/datasetname", or"datasetname"(uses currently-logged-in Hugging Face user's namespace), orNone(uses the same name as the Space but with the"_dataset"suffix). If the Dataset does not exist, it will be created. If the Dataset already exists, the project will be appended to it.config (
dict, optional) -- A dictionary of configuration options. Provided for compatibility withwandb.init().resume (
str, optional, defaults to"never") -- Controls how to handle resuming a run. Can be one of:"must": Must resume the run with the given name, raises error if run doesn't exist"allow": Resume the run if it exists, otherwise create a new run"never": Never resume a run, always create a new one
private (
bool, optional) -- Whether to make the Space private. If None (default), the repo will be public unless the organization's default is private. This value is ignored if the repo already exists.settings (
Any, optional) -- Not used. Provided for compatibility withwandb.init().embed (
bool, optional, defaults toTrue) -- If running inside a jupyter/Colab notebook, whether the dashboard should automatically be embedded in the cell when trackio.init() is called.0RunA Run object that can be used to log metrics and finish the run.
Creates a new Trackio project and returns a Run object.
log[[trackio.log]]
trackio.logtrackio.logdict) --
A dictionary of metrics to log.
- step (
int, optional) -- The step number. If not provided, the step will be incremented automatically.0
Logs metrics to the current run.
finish[[trackio.finish]]
trackio.finishtrackio.finish
Finishes the current run.
show[[trackio.show]]
trackio.showtrackio.showstr, optional) --
The name of the project whose runs to show. If not provided, all projects
will be shown and the user can select one.
- theme (
strorThemeClass, optional) -- A Gradio Theme to use for the dashboard instead of the default Gradio theme, can be a built-in theme (e.g.'soft','citrus'), a theme from the Hub (e.g."gstaff/xkcd"), or a custom Theme class. If not provided, theTRACKIO_THEMEenvironment variable will be used, or if that is not set, the default Gradio theme will be used. - mcp_server (
bool, optional) -- IfTrue, the Trackio dashboard will be set up as an MCP server and certain functions will be added as MCP tools. IfNone(default behavior), then theGRADIO_MCP_SERVERenvironment variable will be used to determine if the MCP server should be enabled (which is"True"on Hugging Face Spaces).0
Launches the Trackio dashboard.
import_csv[[trackio.import_csv]]
trackio.import_csvtrackio.import_csvstr or Path) --
The str or Path to the CSV file to import.
- project (
str) -- The name of the project to import the CSV file into. Must not be an existing project. - name (
str, optional) -- The name of the Run to import the CSV file into. If not provided, a default name will be generated. - name (
str, optional) -- The name of the run (if not provided, a default name will be generated). - space_id (
str, optional) -- If provided, the project will be logged to a Hugging Face Space instead of a local directory. Should be a complete Space name like"username/reponame"or"orgname/reponame", or just"reponame"in which case the Space will be created in the currently-logged-in Hugging Face user's namespace. If the Space does not exist, it will be created. If the Space already exists, the project will be logged to it. - dataset_id (
str, optional) -- If provided, a persistent Hugging Face Dataset will be created and the metrics will be synced to it every 5 minutes. Should be a complete Dataset name like"username/datasetname"or"orgname/datasetname", or just"datasetname"in which case the Dataset will be created in the currently-logged-in Hugging Face user's namespace. If the Dataset does not exist, it will be created. If the Dataset already exists, the project will be appended to it. If not provided, the metrics will be logged to a local SQLite database, unless aspace_idis provided, in which case a Dataset will be automatically created with the same name as the Space but with the"_dataset"suffix. - private (
bool, optional) -- Whether to make the Space private. If None (default), the repo will be public unless the organization's default is private. This value is ignored if the repo already exists.0
Imports a CSV file into a Trackio project. The CSV file must contain a "step"
column, may optionally contain a "timestamp" column, and any other columns will be
treated as metrics. It should also include a header row with the column names.
TODO: call init() and return a Run object so that the user can continue to log metrics to it.
import_tf_events[[trackio.import_tf_events]]
trackio.import_tf_eventstrackio.import_tf_eventsstr or Path) --
The str or Path to the directory containing TensorFlow Events files.
- project (
str) -- The name of the project to import the TensorFlow Events files into. Must not be an existing project. - name (
str, optional) -- The name prefix for runs (if not provided, will use directory names). Each subdirectory will create a separate run. - space_id (
str, optional) -- If provided, the project will be logged to a Hugging Face Space instead of a local directory. Should be a complete Space name like"username/reponame"or"orgname/reponame", or just"reponame"in which case the Space will be created in the currently-logged-in Hugging Face user's namespace. If the Space does not exist, it will be created. If the Space already exists, the project will be logged to it. - dataset_id (
str, optional) -- If provided, a persistent Hugging Face Dataset will be created and the metrics will be synced to it every 5 minutes. Should be a complete Dataset name like"username/datasetname"or"orgname/datasetname", or just"datasetname"in which case the Dataset will be created in the currently-logged-in Hugging Face user's namespace. If the Dataset does not exist, it will be created. If the Dataset already exists, the project will be appended to it. If not provided, the metrics will be logged to a local SQLite database, unless aspace_idis provided, in which case a Dataset will be automatically created with the same name as the Space but with the"_dataset"suffix. - private (
bool, optional) -- Whether to make the Space private. If None (default), the repo will be public unless the organization's default is private. This value is ignored if the repo already exists.0
Imports TensorFlow Events files from a directory into a Trackio project. Each subdirectory in the log directory will be imported as a separate run.
Table[[trackio.Table]]
class trackio.Tabletrackio.Tablelist[str], optional) --
Names of the columns in the table. Optional if data is provided. Not
expected if dataframe is provided. Currently ignored.
- data (
list[list[Any]], optional) -- 2D row-oriented array of values. - dataframe (
pandas.DataFrame``, optional) -- DataFrame object used to create the table. When set,dataandcolumnsarguments are ignored. - rows (
list[list[any]], optional) -- Currently ignored. - optional (
boolorlist[bool], optional, defaults toTrue) -- Currently ignored. - allow_mixed_types (
bool, optional, defaults toFalse) -- Currently ignored. - log_mode -- (
Literal["IMMUTABLE", "MUTABLE", "INCREMENTAL"]orNone, optional, defaults to"IMMUTABLE"): Currently ignored.0
Initializes a Table object.
Image[[trackio.TrackioImage]]
class trackio.TrackioImagetrackio.TrackioImagestr, Path, numpy.ndarray, or PIL.Image, optional) --
A path to an image, a PIL Image, or a numpy array of shape (height, width, channels).
If numpy array, should be of type np.uint8 with RGB values in the range [0, 255].
- caption (
str, optional) -- A string caption for the image.0
Initializes an Image object.
Example:
import trackio
import numpy as np
from PIL import Image
# Create an image from numpy array
image_data = np.random.randint(0, 255, (64, 64, 3), dtype=np.uint8)
image = trackio.Image(image_data, caption="Random image")
trackio.log({"my_image": image})
# Create an image from PIL Image
pil_image = Image.new('RGB', (100, 100), color='red')
image = trackio.Image(pil_image, caption="Red square")
trackio.log({"red_image": image})
# Create an image from file path
image = trackio.Image("path/to/image.jpg", caption="Photo from file")
trackio.log({"file_image": image})
Video[[trackio.TrackioVideo]]
class trackio.TrackioVideotrackio.TrackioVideostr, Path, or numpy.ndarray, optional) --
A path to a video file, or a numpy array.
If numpy array, should be of type np.uint8 with RGB values in the range [0, 255].
It is expected to have shape of either (frames, channels, height, width) or (batch, frames, channels, height, width).
For the latter, the videos will be tiled into a grid.
- caption (
str, optional) -- A string caption for the video. - fps (
int, optional) -- Frames per second for the video. Only used when value is an ndarray. Default is24. - format (
Literal["gif", "mp4", "webm"], optional) -- Video format ("gif", "mp4", or "webm"). Only used when value is an ndarray. Default is "gif".0
Initializes a Video object.
Example:
import trackio
import numpy as np
# Create a simple video from numpy array
frames = np.random.randint(0, 255, (10, 3, 64, 64), dtype=np.uint8)
video = trackio.Video(frames, caption="Random video", fps=30)
# Create a batch of videos
batch_frames = np.random.randint(0, 255, (3, 10, 3, 64, 64), dtype=np.uint8)
batch_video = trackio.Video(batch_frames, caption="Batch of videos", fps=15)
# Create video from file path
video = trackio.Video("path/to/video.mp4", caption="Video from file")
Xet Storage Details
- Size:
- 18.4 kB
- Xet hash:
- 904ef168933162a404623cde1c1b8e1c94dc1a5b82dd592f31463bf54a44a2a8
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.