Skip to main content

launch

Launch a W&B launch experiment.

launch(
api: Api,
job: Optional[str] = None,
entry_point: Optional[List[str]] = None,
version: Optional[str] = None,
name: Optional[str] = None,
resource: Optional[str] = None,
resource_args: Optional[Dict[str, Any]] = None,
project: Optional[str] = None,
entity: Optional[str] = None,
docker_image: Optional[str] = None,
config: Optional[Dict[str, Any]] = None,
synchronous: Optional[bool] = (True),
run_id: Optional[str] = None,
repository: Optional[str] = None
) -> AbstractRun
Arguments
jobstring reference to a wandb.Job eg: wandb/test/my-job:latest
apiAn instance of a wandb Api from wandb.apis.internal.
entry_pointEntry point to run within the project. Defaults to using the entry point used in the original run for wandb URIs, or main.py for git repository URIs.
versionFor Git-based projects, either a commit hash or a branch name.
nameName run under which to launch the run.
resourceExecution backend for the run.
resource_argsResource related arguments for launching runs onto a remote backend. Will be stored on the constructed launch config under resource_args.
projectTarget project to send launched run to
entityTarget entity to send launched run to
configA dictionary containing the configuration for the run. May also contain resource specific arguments under the key "resource_args".
synchronousWhether to block while waiting for a run to complete. Defaults to True. Note that if synchronous is False and backend is "local-container", this method will return, but the current process will block when exiting until the local run completes. If the current process is interrupted, any asynchronous runs launched via this method will be terminated. If synchronous is True and the run fails, the current process will error out as well.
run_idID for the run (To ultimately replace the :name: field)
repositorystring name of repository path for remote registry

Example:โ€‹

from wandb.sdk.launch import launch

job = "wandb/jobs/Hello World:latest"
params = {"epochs": 5}
# Run W&B project and create a reproducible docker environment
# on a local host
api = wandb.apis.internal.Api()
launch(api, job, parameters=params)
Returns
an instance ofwandb.launch.SubmittedRun exposing information (e.g. run ID) about the launched run.
Raises
wandb.exceptions.ExecutionError If a run launched in blocking mode is unsuccessful.
Was this page helpful?๐Ÿ‘๐Ÿ‘Ž