launch
2 minute read
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 | |
---|---|
job |
string reference to a wandb.Job , such as wandb/test/my-job:latest . |
api |
An instance of a wandb Api from wandb.apis.internal . |
entry_point |
Entry 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. |
version |
For Git-based projects, either a commit hash or a branch name. |
name |
Name run under which to launch the run. |
resource |
Execution backend for the run. |
resource_args |
Resource related arguments for launching runs onto a remote backend. Will be stored on the constructed launch config under resource_args . |
project |
Target project to send launched run to. |
entity |
Target entity to send launched run to. |
config |
A dictionary containing the configuration for the run. May also contain resource specific arguments under the key resource_args" . |
synchronous |
Whether to block while waiting for a run to complete. Defaults to True. 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_id |
ID for the run (To ultimately replace the :name: field). |
repository |
string 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 about the launched run, wuch as the run ID. |
Raises | |
---|---|
wandb.exceptions.ExecutionError If a run launched in blocking mode is unsuccessful. |
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.