run
The term "run" refers to the SwanLabRun
object returned by swanlab.init()
. This section introduces some of the methods available for the run.
(Updating gradually...)
public
The public
attribute stores some public information about the SwanLabRun
, including:
project_name
: The name of the projectversion
: The versionrun_id
: The experiment IDswanlog_dir
: The path to the swanlog directoryrun_dir
: The path to the run directorycloud
: Cloud-related informationproject_name
: The project name (only valid in cloud mode)project_url
: The URL of the project in the cloud (only valid in cloud mode)experiment_name
: The experiment name (only valid in cloud mode)experiment_url
: The URL of the experiment in the cloud (only valid in cloud mode)
To retrieve the public
information as a dictionary:
python
import swanlab
run = swanlab.init()
print(run.public.json())
For example, if you want to get the experiment's URL, you can do this:
python
print(run.public.cloud.experiment_url)