class_docstr: A single queued run associated with an entity and project. Call `run = queued_run.wait_until_running()` or `run = queued_run.wait_until_finished()` to access the run.
class_docstr_tok: ["A","single","queued","run","associated","with","an","entity","and","project",".","Call","`","run","=","queued_run.wait_until_running","(",")","`","or","`","run","=","queued_run.wait_until_finished","(",")","`","to","access","the","run","."]
docstr: Delete the given queued run from the wandb backend.
docstr_tok: ["Delete","the","given","queued","run","from","the","wandb","backend","."]
code: def delete(self, delete_artifacts=False):
      """Delete the given queued run from the wandb backend."""
      query = gql(
          """
              query fetchRunQueuesFromProject($entityName: String!, $projectName: String!, $runQueueName: String!) {
                  project(name: $projectName, entityName: $entityName) {
                      runQueue(name: $runQueueName) {
                          id
                      }
                  }
              }
              """
      )
  
      res = self.client.execute(
          query,
          variable_values={
              "entityName": self.entity,
              "projectName": self.project_queue,
              "runQueueName": self.queue_name,
          },
      )
  
      if res["project"].get("runQueue") is not None:
          queue_id = res["project"]["runQueue"]["id"]
  
      mutation = gql(
          """
              mutation DeleteFromRunQueue(
                  $queueID: ID!,
                  $runQueueItemId: ID!
              ) {
                  deleteFromRunQueue(input: {
                      queueID: $queueID
                      runQueueItemId: $runQueueItemId
                  }) {
                      success
                      clientMutationId
                  }
              }
              """
      )
      self.client.execute(
          mutation,
          variable_values={
              "queueID": queue_id,
              "runQueueItemId": self._run_queue_item_id,
          },
      )
  
imports: import json
  import os
  import shutil
  import sys
  import time
  from typing import TYPE_CHECKING, Any, Dict, List, Mapping, Optional
  from wandb_gql import gql
  import wandb
  from wandb import util
  from wandb.apis import public
  from wandb.apis.normalize import normalize_exceptions
  from wandb.errors import CommError
  from wandb.sdk.artifacts.artifact_state import ArtifactState
  from wandb.sdk.data_types._dtypes import InvalidType, Type, TypeRegistry
  from wandb.sdk.launch.errors import LaunchError
  from wandb.sdk.launch.utils import LAUNCH_DEFAULT_PROJECT, _fetch_git_repo, apply_patch, convert_jupyter_notebook_to_script
label_desc: Use image node_id 10 for calling the QueuedRun obj's underlying member method code with example usage: obj.delete(delete_artifacts) without return types