Skip to main content


These are the top-level functions in the import weave namespace.

function init

init(project_name: str) → GraphClient

Initialize weave tracking, logging to a wandb project.

Logging is initialized globally, so you do not need to keep a reference to the return value of init.

Following init, calls of weave.op() decorated functions will be logged to the specified project.


  • project_name: The name of the Weights & Biases project to log to.

Returns: A Weave client.

function publish

publish(obj: Any, name: str) → Ref

Save and version a python object.

If an object with name already exists, and the content hash of obj does not match the latest version of that object, a new version will be created.


  • obj: The object to save and version.
  • name: The name to save the object under.

Returns: A weave Ref to the saved object.

function ref

ref(location: str) → Ref

Construct a Ref to a Weave object.

TODO: what happens if obj does not exist


  • location: A fully-qualified weave ref URI, or if weave.init() has been called, "name:version" or just "name" ("latest" will be used for version in this case).

Returns: A weave Ref to the object.