class_docstr: Used for querying the wandb server.
  
  Examples:
      Most common way to initialize
      >>> wandb.Api()
  
  Arguments:
      overrides: (dict) You can set `base_url` if you are using a wandb server
          other than https://api.wandb.ai.
          You can also set defaults for `entity`, `project`, and `run`.
class_docstr_tok: ["Used","for","querying","the","wandb","server",".","Examples",":","Most","common","way","to","initialize",">",">",">","wandb.Api","(",")","Arguments",":","overrides",":","(","dict",")","You","can","set","`","base_url","`","if","you","are","using","a","wandb","server","other","than","https",":","\/\/api.wandb.ai",".","You","can","also","set","defaults","for","`","entity","`",",","`","project","`",",","and","`","run","`","."]
docstr: Return a set of runs from a project that match the filters provided.
  
  You can filter by `config.*`, `summary_metrics.*`, `tags`, `state`, `entity`, `createdAt`, etc.
  
  Examples:
      Find runs in my_project where config.experiment_name has been set to "foo"
      ```
      api.runs(path="my_entity/my_project", filters={"config.experiment_name": "foo"})
      ```
  
      Find runs in my_project where config.experiment_name has been set to "foo" or "bar"
      ```
      api.runs(
          path="my_entity/my_project",
          filters={"$or": [{"config.experiment_name": "foo"}, {"config.experiment_name": "bar"}]}
      )
      ```
  
      Find runs in my_project where config.experiment_name matches a regex (anchors are not supported)
      ```
      api.runs(
          path="my_entity/my_project",
          filters={"config.experiment_name": {"$regex": "b.*"}}
      )
      ```
  
      Find runs in my_project where the run name matches a regex (anchors are not supported)
      ```
      api.runs(
          path="my_entity/my_project",
          filters={"display_name": {"$regex": "^foo.*"}}
      )
      ```
  
      Find runs in my_project sorted by ascending loss
      ```
      api.runs(path="my_entity/my_project", order="+summary_metrics.loss")
      ```
  
  Arguments:
      path: (str) path to project, should be in the form: "entity/project"
      filters: (dict) queries for specific runs using the MongoDB query language.
          You can filter by run properties such as config.key, summary_metrics.key, state, entity, createdAt, etc.
          For example: {"config.experiment_name": "foo"} would find runs with a config entry
              of experiment name set to "foo"
          You can compose operations to make more complicated queries,
              see Reference for the language is at  https://docs.mongodb.com/manual/reference/operator/query
      order: (str) Order can be `created_at`, `heartbeat_at`, `config.*.value`, or `summary_metrics.*`.
          If you prepend order with a + order is ascending.
          If you prepend order with a - order is descending (default).
          The default order is run.created_at from newest to oldest.
  
  Returns:
      A `Runs` object, which is an iterable collection of `Run` objects.
docstr_tok: ["Return","a","set","of","runs","from","a","project","that","match","the","filters","provided",".","You","can","filter","by","`","config",".","*","`",",","`","summary_metrics",".","*","`",",","`","tags","`",",","`","state","`",",","`","entity","`",",","`","createdAt","`",",","etc",".","Examples",":","Find","runs","in","my_project","where","config.experiment_name","has","been","set","to","``","foo","''","``","`","api.runs","(","path=","''","my_entity\/my_project","''",",","filters=","{","``","config.experiment_name","''",":","``","foo","''","}",")","``","`","Find","runs","in","my_project","where","config.experiment_name","has","been","set","to","``","foo","''","or","``","bar","''","``","`","api.runs","(","path=","''","my_entity\/my_project","''",",","filters=","{","``","$","or","''",":","[","{","``","config.experiment_name","''",":","``","foo","''","}",",","{","``","config.experiment_name","''",":","``","bar","''","}","]","}",")","``","`","Find","runs","in","my_project","where","config.experiment_name","matches","a","regex","(","anchors","are","not","supported",")","``","`","api.runs","(","path=","''","my_entity\/my_project","''",",","filters=","{","``","config.experiment_name","''",":","{","``","$","regex","''",":","``","b",".","*","''","}","}",")","``","`","Find","runs","in","my_project","where","the","run","name","matches","a","regex","(","anchors","are","not","supported",")","``","`","api.runs","(","path=","''","my_entity\/my_project","''",",","filters=","{","``","display_name","''",":","{","``","$","regex","''",":","``","^foo",".","*","''","}","}",")","``","`","Find","runs","in","my_project","sorted","by","ascending","loss","``","`","api.runs","(","path=","''","my_entity\/my_project","''",",","order=","''","+summary_metrics.loss","''",")","``","`","Arguments",":","path",":","(","str",")","path","to","project",",","should","be","in","the","form",":","``","entity\/project","''","filters",":","(","dict",")","queries","for","specific","runs","using","the","MongoDB","query","language",".","You","can","filter","by","run","properties","such","as","config.key",",","summary_metrics.key",",","state",",","entity",",","createdAt",",","etc",".","For","example",":","{","``","config.experiment_name","''",":","``","foo","''","}","would","find","runs","with","a","config","entry","of","experiment","name","set","to","``","foo","''","You","can","compose","operations","to","make","more","complicated","queries",",","see","Reference","for","the","language","is","at","https",":","\/\/docs.mongodb.com\/manual\/reference\/operator\/query","order",":","(","str",")","Order","can","be","`","created_at","`",",","`","heartbeat_at","`",",","`","config",".","*",".value","`",",","or","`","summary_metrics.","*","`",".","If","you","prepend","order","with","a","+","order","is","ascending",".","If","you","prepend","order","with","a","-","order","is","descending","(","default",")",".","The","default","order","is","run.created_at","from","newest","to","oldest",".","Returns",":","A","`","Runs","`","object",",","which","is","an","iterable","collection","of","`","Run","`","objects","."]
code: def runs(
      self,
      path: Optional[str] = None,
      filters: Optional[Dict[str, Any]] = None,
      order: str = "-created_at",
      per_page: int = 50,
      include_sweeps: bool = True,
  ):
      """Return a set of runs from a project that match the filters provided.
  
      You can filter by `config.*`, `summary_metrics.*`, `tags`, `state`, `entity`, `createdAt`, etc.
  
      Examples:
          Find runs in my_project where config.experiment_name has been set to "foo"
          ```
          api.runs(path="my_entity/my_project", filters={"config.experiment_name": "foo"})
          ```
  
          Find runs in my_project where config.experiment_name has been set to "foo" or "bar"
          ```
          api.runs(
              path="my_entity/my_project",
              filters={"$or": [{"config.experiment_name": "foo"}, {"config.experiment_name": "bar"}]}
          )
          ```
  
          Find runs in my_project where config.experiment_name matches a regex (anchors are not supported)
          ```
          api.runs(
              path="my_entity/my_project",
              filters={"config.experiment_name": {"$regex": "b.*"}}
          )
          ```
  
          Find runs in my_project where the run name matches a regex (anchors are not supported)
          ```
          api.runs(
              path="my_entity/my_project",
              filters={"display_name": {"$regex": "^foo.*"}}
          )
          ```
  
          Find runs in my_project sorted by ascending loss
          ```
          api.runs(path="my_entity/my_project", order="+summary_metrics.loss")
          ```
  
      Arguments:
          path: (str) path to project, should be in the form: "entity/project"
          filters: (dict) queries for specific runs using the MongoDB query language.
              You can filter by run properties such as config.key, summary_metrics.key, state, entity, createdAt, etc.
              For example: {"config.experiment_name": "foo"} would find runs with a config entry
                  of experiment name set to "foo"
              You can compose operations to make more complicated queries,
                  see Reference for the language is at  https://docs.mongodb.com/manual/reference/operator/query
          order: (str) Order can be `created_at`, `heartbeat_at`, `config.*.value`, or `summary_metrics.*`.
              If you prepend order with a + order is ascending.
              If you prepend order with a - order is descending (default).
              The default order is run.created_at from newest to oldest.
  
      Returns:
          A `Runs` object, which is an iterable collection of `Run` objects.
      """
      entity, project = self._parse_project_path(path)
      filters = filters or {}
      key = (path or "") + str(filters) + str(order)
      if not self._runs.get(key):
          self._runs[key] = public.Runs(
              self.client,
              entity,
              project,
              filters=filters,
              order=order,
              per_page=per_page,
              include_sweeps=include_sweeps,
          )
      return self._runs[key]
  
imports: import json
  import logging
  import os
  import urllib
  from typing import TYPE_CHECKING, Any, Dict, Optional
  import requests
  from wandb_gql import Client, gql
  from wandb_gql.client import RetryError
  import wandb
  from wandb import env, util
  from wandb.apis import public
  from wandb.apis.internal import Api
  from wandb.apis.normalize import normalize_exceptions
  from wandb.apis.public.const import RETRY_TIMEDELTA
  from wandb.sdk.internal.thread_local_settings import _thread_local_api_settings
  from wandb.sdk.launch.utils import LAUNCH_DEFAULT_PROJECT
  from wandb.sdk.lib import retry, runid
  from wandb.sdk.lib.gql_request import GraphQLSession
label_desc: Use image node_id 26 for calling the Api obj's underlying member method code with example usage: obj.runs(path, filters, order, per_page, include_sweeps) and returns: self