Documentation Index
Fetch the complete documentation index at: https://wb-21fd5541-john-wbdocs-2044-rename-serverless-products.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Launch agent class which polls run given run queues and launches runs for wandb launch.
LaunchAgent(
api: Api,
config: Dict[str, Any]
)
| Arguments | Description |
|---|
api | Api object to use for making requests to the backend. |
config | Config dictionary for the agent. |
| Attributes | Description |
|---|
num_running_jobs | Return the number of jobs not including schedulers. |
num_running_schedulers | Return just the number of schedulers. |
thread_ids | Returns a list of keys running thread ids for the agent. |
Methods
check_sweep_state
View source
check_sweep_state(
launch_spec, api
)
Check the state of a sweep before launching a run for the sweep.
fail_run_queue_item
View source
fail_run_queue_item(
run_queue_item_id, message, phase, files=None
)
finish_thread_id
View source
finish_thread_id(
thread_id, exception=None
)
Removes the job from our list for now.
get_job_and_queue
View source
initialized
View source
@classmethod
initialized() -> bool
Return whether the agent is initialized.
loop
View source
Loop infinitely to poll for jobs and run them.
| Raises | Description |
|---|
KeyboardInterrupt | if the agent is requested to stop. |
name
View source
@classmethod
name() -> str
Return the name of the agent.
pop_from_queue
View source
Pops an item off the runqueue to run as a job.
| Arguments | Description |
|---|
queue | Queue to pop from. |
| Returns | Description |
|---|
| Item popped off the queue. | |
| Raises | Description |
|---|
Exception | if there is an error popping from the queue. |
print_status
View source
Prints the current status of the agent.
run_job
View source
run_job(
job, queue, file_saver
)
Set up project and run the job.
| Arguments | Description |
|---|
job | Job to run. |
task_run_job
View source
task_run_job(
launch_spec, job, default_config, api, job_tracker
)
update_status
View source
Update the status of the agent.
| Arguments | Description |
|---|
status | Status to update the agent to. |