o
    i e                     @   sL   d Z ddlZddlmZ dZdZdZdZdZd	Z	d
Z
dZdZdZdd ZdS )z*Flags parser for TensorBoard.dev uploader.    N)	grpc_util_uploader__subcommandUPLOADDELETELISTEXPORTUPDATEMETADATAAUTH_uploader__subcommand_authREVOKEzhttps://tensorboard.devc           
      C   sf  |   }| jdtddt d | jdtddd | jdtjtjjtj dd	 | jd
ddd |jddd}|j	d?i t
ti |jddtddd |jdtddd |jddtdtjd |jdtddd |jdtddd |jd dd!d |jd"dd#d |jd$d%d& g d'd |jd(d)d}|j	d?i t
ti |jd*d+tdd,d |jdtddd |jdtddd |jd-d.dd/}|j	d?i t
ti |jd*d+d0d& g d1d |jd2d3d}|j	d?i t
ti |jd4dd5d |jd6d7d}|j	d?i t
ti |jd8d9tdd:d |jd;d<d}|j	d?i t
ti |  }|jd=d>d}	|	j	d?i tti dS )@zConfigures flags on the provided argument parser.

    Integration point for `tensorboard.program`'s subcommand system.

    Args:
      parser: An `argparse.ArgumentParser` to be mutated.
    z--origin zaExperimental. Origin for TensorBoard.dev service to which to connect. If not set, defaults to %r.)typedefaulthelpz--api_endpointzExperimental. Direct URL for the API server accepting write requests. If set, will skip initial server handshake unless `--origin` is also set.z--grpc_creds_typez2The type of credentials to use for the gRPC client)r   r   choicesr   z--auth_force_console
store_truezjSet to true to force authentication flow to use the --console rather than a browser redirect to localhost.)actionr   uploadz'upload an experiment to TensorBoard.dev)r   z--logdirPATHNz(Directory containing the logs to process)metavarr   r   r   z--namez-Title of the experiment.  Max 100 characters.z&--_tensorboardinternal_experiment_namename)destr   r   r   z--descriptionz=Experiment description. Markdown format.  Max 600 characters.z	--verbose   zVerbosity of the upload during data uploading. Supported values: 0: no statistics printed during uploading. 1 (default): print data statistics as data is uploaded.z	--dry_runzPerform a dry run of uploading. In a dry run, the data is read from the logdir as pointed to by the --logdir flag and statistics are displayed (if --verbose is not 0), but no data is actually uploaded to the server.z
--one_shotzUpload only the existing data in the logdir and then exit immediately, instead of continuing to listen for new data in the logdir.z	--pluginsc                 S   
   |  dS N,splitoption r    P/var/www/myenv/lib/python3.10/site-packages/tensorboard/uploader/flags_parser.py<lambda>      
 zdefine_flags.<locals>.<lambda>zList of plugins for which data should be uploaded. If unspecified then data will be uploaded for all plugins supported by the server.zupdate-metadatazSchange the name, description, or other user metadata associated with an experiment.z--experiment_idEXPERIMENT_IDz5ID of the experiment on which to modify the metadata.deletez permanently delete an experiment)r   inherited_absl_flagsc                 S   r   r   r   r   r    r    r!   r"      r#   zcID of an experiment to delete permanently. Comma separated listof experiment ids is also supported.listz$list previously uploaded experimentsz--jsonz%print the experiments as JSON objectsexportz!download all your experiment dataz--outdirOUTPUT_PATHzHDirectory into which to download all experiment data; must not yet existauthzlog in, log outrevokez+revoke all existing credentials and log outr    )add_subparsersadd_argumentstrDEFAULT_ORIGINr   ChannelCredsTypeSSLr   
add_parserset_defaultsSUBCOMMAND_FLAGSUBCOMMAND_KEY_UPLOADargparseSUPPRESSintSUBCOMMAND_KEY_UPDATE_METADATASUBCOMMAND_KEY_DELETESUBCOMMAND_KEY_LISTSUBCOMMAND_KEY_EXPORTSUBCOMMAND_KEY_AUTHAUTH_SUBCOMMAND_FLAGAUTH_SUBCOMMAND_KEY_REVOKE)
parser
subparsersr   update_metadatar%   list_parserr(   auth_parserauth_subparsersauth_revoker    r    r!   define_flags$   s&  					
rG   )__doc__r6   tensorboard.utilr   r4   r5   r:   r;   r<   r9   r=   r>   r?   r/   rG   r    r    r    r!   <module>   s   