o
    -wi                     @   s6  d Z ddlZddlZddlZddlZddlZddlmZmZm	Z	m
Z
mZmZmZmZ ddlmZ ddlZddlmZmZ ddlmZ ddlmZ ddlmZ dd	lmZ dd
lmZ ddlm Z  ddl!m"Z"m#Z#m$Z$ ddl%m&Z& erxddl'm(Z( ddhZ)dZ*ede+fddZ,G dd ded Z-G dd deZ.dS )zPublic API: runs.    N)TYPE_CHECKINGAny
CollectionDictListLiteralMappingOptional)gql)envutil)public)Attrs)Api)normalize_exceptions)SizedPaginator)RETRY_TIMEDELTA)ipython	json_utilrunid)LogicalPath)RetryingClient_wandbwandb_versionaJ  fragment RunFragment on Run {
    id
    tags
    name
    displayName
    sweepName
    state
    config
    group
    jobType
    commit
    readOnly
    createdAt
    heartbeatAt
    description
    notes
    systemMetrics
    summaryMetrics
    historyLineCount
    user {
        name
        username
    }
    historyKeys
}returnc                 C   s:   d}t |}| |}ddd |di di gD v S )zReturns True if the server allows us to query the internalId field for a project.

    This check is done by utilizing GraphQL introspection in the available fields on the Project type.
    z
       query ProbeRunInput {
            RunType: __type(name:"Run") {
                fields {
                    name
                }
            }
        }
    	projectIdc                 S   s   g | ]}|d  qS )name ).0xr   r   S/home/ubuntu/sommelier/.venv/lib/python3.10/site-packages/wandb/apis/public/runs.py
<listcomp>S   s    z<_server_provides_internal_id_for_project.<locals>.<listcomp>RunTypefields)r
   executeget)clientquery_stringqueryresr   r   r    (_server_provides_internal_id_for_project@   s   
r*   c                       s   e Zd ZdZ				d%dddeded	eeeef  d
ee dede	f fddZ
edd Zedd Zedd Zdd Ze					d&dedeee  deded ded  f
d!d"Zd#d$ Z  ZS )'RunszAn iterable collection of runs associated with a project and optional filter.

    This is generally used indirectly via the `Api`.runs method.
    N2   Tr&   r   entityprojectfiltersorderper_pageinclude_sweepsc           	         s   t dt|rdnd dt d| _|| _|| _d | _|pi | _|| _i | _	|| _
| j| j| jt| jd}t ||| d S )Na  #graphql
            query Runs($project: String!, $entity: String!, $cursor: String, $perPage: Int = 50, $order: String, $filters: JSONString) {
                project(name: $project, entityName: $entity) {
                    internalId
                    runCount(filters: $filters)
                    readOnly
                    runs(filters: $filters, after: $cursor, first: $perPage, order: $order) {
                        edges {
                            node {
                                r    aX  
                                ...RunFragment
                            }
                            cursor
                        }
                        pageInfo {
                            endCursor
                            hasNextPage
                        }
                    }
                }
            }
            
            )r.   r-   r0   r/   )r
   r*   RUN_FRAGMENTQUERYr-   r.   _project_internal_idr/   r0   _sweeps_include_sweepsjsondumpssuper__init__)	selfr&   r-   r.   r/   r0   r1   r2   	variables	__class__r   r    r=   ^   s(   
	

zRuns.__init__c                 C   s   | j s|   | j d d S )Nr.   runCount)last_response
_load_pager>   r   r   r    _length   s   zRuns._lengthc                 C   s    | j r| j d d d d S dS )Nr.   runspageInfohasNextPageTrC   rE   r   r   r    more   s   z	Runs.morec                 C   s$   | j r| j d d d d d S d S )Nr.   rG   edgescursorrJ   rE   r   r   r    rN      s   zRuns.cursorc              	   C   s   g }| j d u s| j dd u rtd| j| j d d d D ]K}t| j| j| j|d d |d | jd}|	| | jrk|j
rk|j
| jv rN| j|j
 }ntjj| j| j| j|j
dd	}|| j|j
< |d u rhq ||_q |S )
Nr.   zCould not find project {}rG   rL   noder   )r2   FwithRuns)rC   r%   
ValueErrorformatr.   Runr&   r-   r9   append
sweep_namer8   r   Sweepsweep)r>   objsrun_responserunrX   r   r   r    convert_objects   s:   

zRuns.convert_objects  _stepdefaultsampleskeysx_axisrS   r_   pandaspolarsstream)r_   systemc                 C   s  |dvrt d| dg }|dkr5| D ]}|j|||d|d}|s#q|D ]}	|j|	d< q%|| q|S |dkr}tjdd	d
}
| D ]}|j|||d|d}|sQqB|
j|}|j|d< || qB|sh|
 S |
	|}|j
ddd |t|j }|S |dkrtjddd
}| D ]%}|j|||d|d}|sq||}|||jd}|| q|s| S |j	|dd}|t|j}|S dS )al  Return sampled history metrics for all runs that fit the filters conditions.

        Args:
            samples : (int, optional) The number of samples to return per run
            keys : (list[str], optional) Only return metrics for specific keys
            x_axis : (str, optional) Use this metric as the xAxis defaults to _step
            format : (Literal, optional) Format to return data in, options are "default", "pandas", "polars"
            stream : (Literal, optional) "default" for metrics, "system" for machine metrics
        Returns:
            pandas.DataFrame: If format="pandas", returns a `pandas.DataFrame` of history metrics.
            polars.DataFrame: If format="polars", returns a `polars.DataFrame` of history metrics.
            list of dicts: If format="default", returns a list of dicts containing history metrics with a run_id key.
        rc   zInvalid format: z.. Must be one of 'default', 'pandas', 'polars'r_   F)r`   ra   rb   rd   rf   run_idrd   z*Exporting pandas DataFrame requires pandas)requiredT)dropinplacere   z*Exporting polars DataFrame requires polarsvertical)howN)rR   historyidextendr   
get_module	DataFramefrom_recordsrU   concatreset_indexsortedcolumnswith_columnslitaliasselect)r>   r`   ra   rb   rS   rf   	historiesr[   history_dataentrypddfcombined_dfplr   r   r    r|      s   



zRuns.historiesc                 C   s   d| j  d| j dS )Nz<Runs />r-   r.   rE   r   r   r    __repr__(     zRuns.__repr__)NNr,   T)r]   Nr^   r_   r_   )__name__
__module____qualname____doc__strr	   r   r   intboolr=   propertyrF   rK   rN   r\   r   r   r   r|   r   __classcell__r   r   r@   r    r+   X   s\    
3


"
`r+   rT   c                       s<  e Zd ZdZ		dcdddededed	ee d
ef fddZe	dd Z
e	dd Ze	dd Ze	dd Ze	dd Zejdd Ze	dd Zejdd Ze				ddded fddZded!d"Zed#d$ Zed%d& Zeded'd(Zd)d* Ze	d+d, Zd-d. Zdfd1d2Zdgd4d5Zedhd7d8Zed9d: Zedid<d=Z e	3djd>d?Z!edkdAdBZ"edldDe#dEe$j%fdFdGZ&edldDe#dEe$j%fdHdIZ'edmdJdKZ(e		dndLdMdNee)e  dOee)e  fdPdQZ*e	dRdS Z+e	dTdU Z,e	dVdW Z-e	dXdY Z.e	dZd[ Z/dod]d^Z0dEefd_d`Z1dadb Z2  Z3S )prT   aI  A single run associated with an entity and project.

    Attributes:
        tags ([str]): a list of tags associated with the run
        url (str): the url of this run
        id (str): unique identifier for the run (defaults to eight characters)
        name (str): the name of the run
        state (str): one of: running, finished, crashed, killed, preempting, preempted
        config (dict): a dict of hyperparameters associated with the run
        created_at (str): ISO timestamp when the run was started
        system_metrics (dict): the latest system metrics recorded for the run
        summary (dict): A mutable dict-like property that holds the current summary.
                    Calling update will persist any changes.
        project (str): the project associated with the run
        entity (str): the name of the entity associated with the run
        project_internal_id (int): the internal id of the project
        user (str): the name of the user who created the run
        path (str): Unique identifier [entity]/[project]/[run_id]
        notes (str): Notes about the run
        read_only (boolean): Whether the run is editable
        history_keys (str): Keys of the history metrics that have been logged
            with `wandb.log({key: value})`
        metadata (str): Metadata about the run from wandb-metadata.json
    NTr&   r   r-   r.   rh   attrsr2   c                    s   |pi }t  t| || _|| _|| _i | _tt	
 | _|| _d| _|| _tjj| jg| jR  | _zt| j W n	 tyG   Y nw d| _d| _|dd| _d| _| j| d dS )zInitialize a Run object.

        Run is always initialized by calling api.runs() where api is an instance of
        wandb.Api.
        Nstatez	not found)force)r<   r=   dictr&   _entityr.   _filesr   get_dirtempfile
gettempdir	_base_dirro   rX   r9   ospathjoindirmakedirsOSError_summary	_metadatar%   _state!server_provides_internal_id_fieldload)r>   r&   r-   r.   rh   r   r2   _attrsr@   r   r    r=   F  s*   zRun.__init__c                 C      | j S N)r   rE   r   r   r    r   j     z	Run.statec                 C   r   r   )r   rE   r   r   r    r-   n  r   z
Run.entityc                 C   s   t d | jS )Nz:Run.username is deprecated. Please use Run.entity instead.)wandbtermwarnr   rE   r   r   r    usernamer  s   
zRun.usernamec                 C      | j dS )Nro   r   r%   rE   r   r   r    
storage_idw  s   zRun.storage_idc                 C   r   Nr   r   rE   r   r   r    ro   ~     zRun.idc                 C   s   | j }||d< |S r   r   )r>   new_idr   r   r   r    ro     s   c                 C   r   NdisplayNamer   rE   r   r   r    r     r   zRun.namec                 C   s   || j d< |S r   r   )r>   new_namer   r   r    r     s   
runningr   )r   pendingc           	      C   s   |pt  }|p|jdpd}td}||||d}|jj||d}|d d }t|j|d d d	 |d d	 |d	 |d
 dddg dd|dS )z#Create a run for the given project.r.   uncategorizeda  
        mutation UpsertBucket($project: String, $entity: String, $name: String!, $state: String) {
            upsertBucket(input: {modelName: $project, entityName: $entity, name: $name, state: $state}) {
                bucket {
                    project {
                        name
                        entity { name }
                    }
                    id
                    name
                }
                inserted
            }
        }
        )r-   r.   r   r   variable_valuesupsertBucketbucketr-   r   ro   {}N)ro   configsystemMetricssummaryMetricstagsdescriptionnotesr   )r   generate_idsettingsr%   r
   r&   r$   rT   )	clsapirh   r.   r-   r   mutationr?   r)   r   r   r    create  s6   

z
Run.createFc           	      C   s
  |s| j s]tdt| jrdnd dt d}| |}|d u s0|dd u s0|d dd u r7td| |d d | _ | j d	 | _	| j
r]| jr]| js]tjj| j| j| j| jd
d| _d| j v rkt| j d | _nd | _z| j dr}t| j d ni | j d< W n tjjy   tj| j d d
d| j d< Y nw | j drt| j d ni | j d< | j drt| j| j d | _i i }}t| j dpd D ] \}}|tv r|n|}t|trd|v r|d ||< q|||< q|| || j d< || j d< | j S )Nz#graphql
            query Run($project: String!, $entity: String!, $name: String!) {
                project(name: $project, entityName: $entity) {
                    run(name: $name) {
                        r   r3   zj
                        ...RunFragment
                    }
                }
            }
            r4   r.   r[   zCould not find run {}r   FrP   r   )strictr   userr   r   value	rawconfig)r   r
   r*   r&   r5   _execr%   rR   rS   r   r9   rV   rX   r   rW   r-   r.   r   r7   r:   loadsdecoderJSONDecodeErrorUserr   itemsWANDB_INTERNAL_KEYS
isinstancer   update)	r>   r   r(   responseconfig_user
config_rawkeyr   r   r   r   r    r     sf   
	





"



zRun.loadc                 C   sL   t d}	 | |}|d d d }|dv r || jd< || _d S td q)Na  
            query RunState($project: String!, $entity: String!, $name: String!) {
                project(name: $project, entityName: $entity) {
                    run(name: $name) {
                        state
                    }
                }
            }
        Tr.   r[   r   )finishedcrashedfailed   )r
   r   r   r   timesleep)r>   r(   r)   r   r   r   r    wait_until_finished  s   


zRun.wait_until_finishedc                 C   sH   t dt}| j|| j| j| j| j| j| j	| j
| jd	}| j  dS )z7Persist changes to the run object to the wandb backend.a  
        mutation UpsertBucket($id: String!, $description: String, $display_name: String, $notes: String, $tags: [String!], $config: JSONString!, $groupName: String, $jobType: String) {{
            upsertBucket(input: {{id: $id, description: $description, displayName: $display_name, notes: $notes, tags: $tags, config: $config, groupName: $groupName, jobType: $jobType}}) {{
                bucket {{
                    ...RunFragment
                }}
            }}
        }}
        {}
        )ro   r   r   r   display_namer   	groupNamejobTypeN)r
   rS   r5   r   r   r   r   r   r   json_configgroupjob_typesummaryr   )r>   r   _r   r   r    r   $  s    	z
Run.updatec                 C   s<   t d|rdnd|rdnd}| jj|| j|dd dS )z,Delete the given run from the wandb backend.a  
            mutation DeleteRun(
                $id: ID!,
                {}
            ) {{
                deleteRun(input: {{
                    id: $id,
                    {}
                }}) {{
                    clientMutationId
                }}
            }}
        z$deleteArtifacts: Booleanr3   z!deleteArtifacts: $deleteArtifacts)ro   deleteArtifactsr   N)r
   rS   r&   r$   r   )r>   delete_artifactsr   r   r   r    delete@  s   


z
Run.deletec                 C   s   |    d S r   )r   rE   r   r   r    save^  s   zRun.savec                 C   sN   i }d| j v r| j d d d|d< | j D ]\}}|d d||< qt|S )Nr   )r   desc)r   r   r   r:   r;   )r>   r   kvr   r   r    r   a  s   

zRun.json_configc                 K   s,   | j | j| jd}|| | jj||dS )z*Execute a query against the cloud backend.)r-   r.   r   r   )r-   r.   ro   r   r&   r$   )r>   r(   kwargsr?   r   r   r    r   j  s   
z	Run._execr^   r]   c                 C   sB   |g| |d}t d}| j|t|gd}|d d d d S )N)ra   r`   a  
        query RunSampledHistory($project: String!, $entity: String!, $name: String!, $specs: [JSONString!]!) {
            project(name: $project, entityName: $entity) {
                run(name: $name) { sampledHistory(specs: $specs) }
            }
        }
        )specsr.   r[   sampledHistoryr   )r
   r   r:   r;   )r>   ra   rb   r`   specr(   r   r   r   r    _sampled_historyp  s   
zRun._sampled_historyr_   c                 C   sF   |dkrdnd}t d|}| j||d}dd |d d	 | D S )
Nr_   rn   eventsa   
        query RunFullHistory($project: String!, $entity: String!, $name: String!, $samples: Int) {{
            project(name: $project, entityName: $entity) {{
                run(name: $name) {{ {}(samples: $samples) }}
            }}
        }}
        )r`   c                 S   s   g | ]}t |qS r   )r:   r   )r   liner   r   r    r!     s    z%Run._full_history.<locals>.<listcomp>r.   r[   )r
   rS   r   )r>   r`   rf   rO   r(   r   r   r   r    _full_history  s   
zRun._full_historyr,   c                 C   s   t | j| |pg |S )a$  Return a file path for each file named.

        Args:
            names (list): names of the requested files, if empty returns all files
            per_page (int): number of results per page.

        Returns:
            A `Files` object, which is an iterator over `File` objects.
        r   Filesr&   )r>   namesr1   r   r   r    files  s   z	Run.filesc                 C   s   t | j| |gd S )zReturn the path of a file with a given name in the artifact.

        Args:
            name (str): name of requested file.

        Returns:
            A `File` matching the name argument.
        r   r   )r>   r   r   r   r    file  s   
zRun.file.c                 C   s   t | j| jdtd}|| j tj|}tj	||}t
tj||d}|t||i W d   n1 s<w   Y  t| j| |gd S )a  Upload a file.

        Args:
            path (str): name of file to upload.
            root (str): the root path to save the file relative to.  i.e.
                If you want to have the file saved in the run as "my_dir/file.txt"
                and you're currently in "my_dir" you would set root to "../".

        Returns:
            A `File` matching the name argument.
        r   default_settingsretry_timedeltarbNr   )InternalApir-   r.   r   set_current_run_idro   r   r   abspathrelpathopenr   pushr   r   r   r&   )r>   r   rootr   r   fr   r   r    upload_file  s   zRun.upload_filec                 C   s   |durt |tstd g S |dur(t|dkr(t |d ts(td g S |r5|dkr5td g S |r@| j|||d}n| j||d}|r]t	d	}|rX|j
|}|S td
 |S )a  Return sampled history metrics for a run.

        This is simpler and faster if you are ok with the history records being sampled.

        Args:
            samples : (int, optional) The number of samples to return
            pandas : (bool, optional) Return a pandas dataframe
            keys : (list, optional) Only return metrics for specific keys
            x_axis : (str, optional) Use this metric as the xAxis defaults to _step
            stream : (str, optional) "default" for metrics, "system" for machine metrics

        Returns:
            pandas.DataFrame: If pandas=True returns a `pandas.DataFrame` of history
                metrics.
            list of dicts: If pandas=False returns a list of dicts of history metrics.
        N keys must be specified in a listr   'keys argument must be a list of stringsr_   z+stream must be default when specifying keys)ra   rb   r`   )r`   rf   rd   z5Unable to load pandas, call history with pandas=False)r   listr   	termerrorlenr   r   r   r   rq   rr   rs   r   )r>   r`   ra   rb   rd   rf   linesr   r   r   r    rn     s&   
"



zRun.history  c                 C   s   |durt |tstd g S |dur(t|dkr(t |d ts(td g S | j}|du r1d}|du r9|d }||krA|d }|du rPtj| | j	|||dS tj
| | j	||||dS )a.  Returns an iterable collection of all history records for a run.

        Example:
            Export all the loss values for an example run

            ```python
            run = api.run("l2k2/examples-numpy-boston/i0wt6xua")
            history = run.scan_history(keys=["Loss"])
            losses = [row["Loss"] for row in history]
            ```

        Args:
            keys ([str], optional): only fetch these keys, and only fetch rows that have all of keys defined.
            page_size (int, optional): size of pages to fetch from the api.
            min_step (int, optional): the minimum number of pages to scan at a time.
            max_step (int, optional): the maximum number of pages to scan at a time.

        Returns:
            An iterable collection over history records (dict).
        Nr  r   r     )r[   r&   	page_sizemin_stepmax_step)r[   r&   ra   r  r  r  )r   r  r   r  r  r   lastHistoryStepr   HistoryScanr&   SampledHistoryScan)r>   ra   r  r  r  	last_stepr   r   r    scan_history  s:   
"
zRun.scan_historyd   r1   r   c                 C      t j| j| d|dS )a  Fetches all artifacts logged by this run.

        Retrieves all output artifacts that were logged during the run. Returns a
        paginated result that can be iterated over or collected into a single list.

        Args:
            per_page: Number of artifacts to fetch per API request.

        Returns:
            An iterable collection of all Artifact objects logged as outputs during this run.

        Example:
            >>> import wandb
            >>> import tempfile
            >>> with tempfile.NamedTemporaryFile(
            ...     mode="w", delete=False, suffix=".txt"
            ... ) as tmp:
            ...     tmp.write("This is a test artifact")
            ...     tmp_path = tmp.name
            >>> run = wandb.init(project="artifact-example")
            >>> artifact = wandb.Artifact("test_artifact", type="dataset")
            >>> artifact.add_file(tmp_path)
            >>> run.log_artifact(artifact)
            >>> run.finish()
            >>> api = wandb.Api()
            >>> finished_run = api.run(f"{run.entity}/{run.project}/{run.id}")
            >>> for logged_artifact in finished_run.logged_artifacts():
            ...     print(logged_artifact.name)
            test_artifact
        loggedmoder1   r   RunArtifactsr&   r>   r1   r   r   r    logged_artifacts"  s    zRun.logged_artifactsc                 C   r  )a  Fetches artifacts explicitly used by this run.

        Retrieves only the input artifacts that were explicitly declared as used
        during the run, typically via `run.use_artifact()`. Returns a paginated
        result that can be iterated over or collected into a single list.

        Args:
            per_page: Number of artifacts to fetch per API request.

        Returns:
            An iterable collection of Artifact objects explicitly used as inputs in this run.

        Example:
            >>> import wandb
            >>> run = wandb.init(project="artifact-example")
            >>> run.use_artifact("test_artifact:latest")
            >>> run.finish()
            >>> api = wandb.Api()
            >>> finished_run = api.run(f"{run.entity}/{run.project}/{run.id}")
            >>> for used_artifact in finished_run.used_artifacts():
            ...     print(used_artifact.name)
            test_artifact
        usedr   r"  r$  r   r   r    used_artifactsD  s   zRun.used_artifactsc                 C   s|   t | j| jdtd}|| j t|tjr,|	 s,|j
|j|p#|j|j|jd |S t|tjr:|	 r:tdtd)a  Declare an artifact as an input to a run.

        Args:
            artifact (`Artifact`): An artifact returned from
                `wandb.Api().artifact(name)`
            use_as (string, optional): A string identifying
                how the artifact is used in the script. Used
                to easily differentiate artifacts used in a
                run, when using the beta wandb launch
                feature's artifact swapping functionality.

        Returns:
            A `Artifact` object.
        r   r   )use_asartifact_entity_nameartifact_project_name_Only existing artifacts are accepted by this api. Manually create one with `wandb artifact put`6You must pass a wandb.Api().artifact() to use_artifact)r  r-   r.   r   r  ro   r   r   Artifactis_draftuse_artifactr   rR   )r>   artifactr(  r   r   r   r    r/  _  s$   zRun.use_artifactr0  zwandb.Artifactaliasesr   c                 C   s   t | j| jdtd}|| j t|tjst	d|
 r#td| j|jks/| j|jkr3td|jdd }|j|j||j||d |S )	aq  Declare an artifact as output of a run.

        Args:
            artifact (`Artifact`): An artifact returned from
                `wandb.Api().artifact(name)`.
            aliases (list, optional): Aliases to apply to this artifact.
            tags: (list, optional) Tags to apply to this artifact, if any.

        Returns:
            A `Artifact` object.
        r   r   r,  r+  z3A run can't log an artifact to a different project.:r   )r1  r   )r  r-   r.   r   r  ro   r   r   r-  	TypeErrorr.  rR   source_entitysource_projectsource_namesplitcreate_artifacttypedigest)r>   r0  r1  r   r   artifact_collection_namer   r   r    log_artifact  s.   zRun.log_artifactc                 C   s0   | j d u rddlm} || | j| jd| _ | j S )Nr   )HTTPSummary)r   )r   wandb.old.summaryr=  r&   summary_metrics)r>   r=  r   r   r    r     s   
zRun.summaryc                 C   s4   t jt| jt jt| jt jt| jgS r   )urllibparse
quote_plusr   r-   r.   ro   rE   r   r   r    r     s   zRun.pathc                 C   s$   | j }|dd | jjd| S )N   rG   r   )r   insertr&   app_urlr   )r>   r   r   r   r    url  s   zRun.urlc                 C   sh   | j d u r1z$| d}| jjjj}|j|jdd}|  |j	}t
|| _ W | j S    Y | j S | j S )Nzwandb-metadata.jsonr   )timeout)r   r   r&   _client	transportsessionr%   rF  raise_for_statuscontentr   r   )r>   r  rJ  r   contentsr   r   r    metadata  s   

zRun.metadatac                 C   sx   t d}| |}|d u s(|dd u s(|d dd u s(|d d dd u r*dS |d d d }d|v r:|d S dS )Nz
        query RunHistoryKeys($project: String!, $entity: String!, $name: String!) {
            project(name: $project, entityName: $entity) {
                run(name: $name) { historyKeys }
            }
        }
        r.   r[   historyKeysrM   lastStep)r
   r   r%   )r>   r(   r   history_keysr   r   r    r    s   
	zRun.lastHistoryStep  c                 C   sD   | j d }d| d}d}|r|d7 }t }|d|d|d S )	z7Generate HTML containing an iframe displaying this run.z?jupyter=truezborder:none;width:100%;height:zpx;r3   zdisplay:none;z<iframe src=z style=z
></iframe>)rF  r   toggle_button)r>   heighthiddenrF  styleprefixr   r   r    to_html  s   
zRun.to_htmlc                 C   s   |   S r   )rX  rE   r   r   r    _repr_html_  s   zRun._repr_html_c                 C   s   d d| j| jS )Nz<Run {} ({})>r   )rS   r   r   r   rE   r   r   r    r     r   zRun.__repr__)NT)NNNr   )F)r^   r]   )r]   r_   )Nr,   )r   )r]   Nr^   Tr_   )Nr  NN)r  r   )NN)rR  F)4r   r   r   r   r   r	   r   r   r=   r   r   r-   r   r   ro   setterr   classmethodr   r   r   r   r   r   r   r   r   r   r   r   r   r   r  rn   r  r   r   r#  r%  r'  r/  r   r<  r   r   rF  rN  r  rX  rY  r   r   r   r   r@   r    rT   ,  s    $








5G





)7!%

.






)/r   r:   r   r   r   r@  typingr   r   r   r   r   r   r   r	   	wandb_gqlr
   r   r   r   
wandb.apisr   wandb.apis.attrsr   wandb.apis.internalr   r  wandb.apis.normalizer   wandb.apis.paginatorr   wandb.apis.public.constr   wandb.sdk.libr   r   r   wandb.sdk.lib.pathsr   wandb.apis.publicr   r   r5   r   r*   r+   rT   r   r   r   r    <module>   s6    ( U