model_analyzer/config/input/config_command_profile.py
def _add_triton_configs(self):
        """
        Adds the triton related flags
        and config options
        """

        self._add_config(
            ConfigField(
                'triton_launch_mode',
                field_type=ConfigPrimitive(str),
                flags=['--triton-launch-mode'],
                default_value=DEFAULT_TRITON_LAUNCH_MODE,
                choices=['local', 'docker', 'remote', 'c_api'],
                description="The method by which to launch Triton Server. "
                "'local' assumes tritonserver binary is available locally. "
                "'docker' pulls and launches a triton docker container with "
                "the specified version. 'remote' connects to a running "
                "server using given http, grpc and metrics endpoints. "
                "'c_api' allows direct benchmarking of Triton locally"
                "without the use of endpoints."))
        self._add_config(
            ConfigField('triton_docker_image',
                        flags=['--triton-docker-image'],
                        field_type=ConfigPrimitive(str),
                        default_value=DEFAULT_TRITON_DOCKER_IMAGE,
                        description='Triton Server Docker image tag'))
        self._add_config(
            ConfigField(
                'triton_http_endpoint',
                flags=['--triton-http-endpoint'],
                field_type=ConfigPrimitive(str),
                default_value=DEFAULT_TRITON_HTTP_ENDPOINT,
                description=
                "Triton Server HTTP endpoint url used by Model Analyzer client. "
                "Will be ignored if server-launch-mode is not 'remote'"))
        self._add_config(
            ConfigField(
                'triton_grpc_endpoint',
                flags=['--triton-grpc-endpoint'],
                field_type=ConfigPrimitive(str),
                default_value=DEFAULT_TRITON_GRPC_ENDPOINT,
                description=
                "Triton Server HTTP endpoint url used by Model Analyzer client. "
                "Will be ignored if server-launch-mode is not 'remote'"))
        self._add_config(
            ConfigField(
                'triton_metrics_url',
                field_type=ConfigPrimitive(str),
                flags=['--triton-metrics-url'],
                default_value=DEFAULT_TRITON_METRICS_URL,
                description="Triton Server Metrics endpoint url. "
                "Will be ignored if server-launch-mode is not 'remote'"))
        self._add_config(
            ConfigField(
                'triton_server_path',
                field_type=ConfigPrimitive(str,
                                           validator=binary_path_validator),
                flags=['--triton-server-path'],
                default_value=DEFAULT_TRITON_SERVER_PATH,
                description='The full path to the tritonserver binary executable'
            ))
        self._add_config(
            ConfigField(
                'triton_output_path',
                field_type=ConfigPrimitive(str),
                flags=['--triton-output-path'],
                description=
                ('The full path to the file to which Triton server instance will '
                 'append their log output. If not specified, they are not written.'
                )))
        self._add_config(
            ConfigField(
                'triton_docker_mounts',
                field_type=ConfigListString(),
                flags=['--triton-docker-mounts'],
                description=
                ("A list of strings representing volumes to be mounted. "
                 "The strings should have the format '<host path>:<container path>:<access mode>'."
                )))
        self._add_config(
            ConfigField(
                'triton_docker_labels',
                field_type=ConfigObject(schema={'*': ConfigPrimitive(str)}),
                description=
                'A dictionary of name-value labels to set metadata for the Triton '
                'server docker container in docker launch mode'))
        self._add_config(
            ConfigField(
                'triton_install_path',
                field_type=ConfigPrimitive(str, validator=file_path_validator),
                default_value=DEFAULT_TRITON_INSTALL_PATH,
                flags=['--triton-install-path'],
                description=
                ("Path to Triton install directory i.e. the parent directory of 'lib/libtritonserver.so'."
                 "Required only when using triton_launch_mode=c_api.")))

        Adds the triton related flags
        and config options
        
Adds the triton related flags
and config options
Adds the triton related flags and config options
def _add_triton_configs(self):
        self._add_config(
            ConfigField(
                'triton_launch_mode',
                field_type=ConfigPrimitive(str),
                flags=['--triton-launch-mode'],
                default_value=DEFAULT_TRITON_LAUNCH_MODE,
                choices=['local', 'docker', 'remote', 'c_api'],
                description="The method by which to launch Triton Server. "
                "'local' assumes tritonserver binary is available locally. "
                "'docker' pulls and launches a triton docker container with "
                "the specified version. 'remote' connects to a running "
                "server using given http, grpc and metrics endpoints. "
                "'c_api' allows direct benchmarking of Triton locally"
                "without the use of endpoints."))
        self._add_config(
            ConfigField('triton_docker_image',
                        flags=['--triton-docker-image'],
                        field_type=ConfigPrimitive(str),
                        default_value=DEFAULT_TRITON_DOCKER_IMAGE,
                        description='Triton Server Docker image tag'))
        self._add_config(
            ConfigField(
                'triton_http_endpoint',
                flags=['--triton-http-endpoint'],
                field_type=ConfigPrimitive(str),
                default_value=DEFAULT_TRITON_HTTP_ENDPOINT,
                description=
                "Triton Server HTTP endpoint url used by Model Analyzer client. "
                "Will be ignored if server-launch-mode is not 'remote'"))
        self._add_config(
            ConfigField(
                'triton_grpc_endpoint',
                flags=['--triton-grpc-endpoint'],
                field_type=ConfigPrimitive(str),
                default_value=DEFAULT_TRITON_GRPC_ENDPOINT,
                description=
                "Triton Server HTTP endpoint url used by Model Analyzer client. "
                "Will be ignored if server-launch-mode is not 'remote'"))
        self._add_config(
            ConfigField(
                'triton_metrics_url',
                field_type=ConfigPrimitive(str),
                flags=['--triton-metrics-url'],
                default_value=DEFAULT_TRITON_METRICS_URL,
                description="Triton Server Metrics endpoint url. "
                "Will be ignored if server-launch-mode is not 'remote'"))
        self._add_config(
            ConfigField(
                'triton_server_path',
                field_type=ConfigPrimitive(str,
                                           validator=binary_path_validator),
                flags=['--triton-server-path'],
                default_value=DEFAULT_TRITON_SERVER_PATH,
                description='The full path to the tritonserver binary executable'
            ))
        self._add_config(
            ConfigField(
                'triton_output_path',
                field_type=ConfigPrimitive(str),
                flags=['--triton-output-path'],
                description=
                ('The full path to the file to which Triton server instance will '
                 'append their log output. If not specified, they are not written.'
                )))
        self._add_config(
            ConfigField(
                'triton_docker_mounts',
                field_type=ConfigListString(),
                flags=['--triton-docker-mounts'],
                description=
                ("A list of strings representing volumes to be mounted. "
                 "The strings should have the format '<host path>:<container path>:<access mode>'."
                )))
        self._add_config(
            ConfigField(
                'triton_docker_labels',
                field_type=ConfigObject(schema={'*': ConfigPrimitive(str)}),
                description=
                'A dictionary of name-value labels to set metadata for the Triton '
                'server docker container in docker launch mode'))
        self._add_config(
            ConfigField(
                'triton_install_path',
                field_type=ConfigPrimitive(str, validator=file_path_validator),
                default_value=DEFAULT_TRITON_INSTALL_PATH,
                flags=['--triton-install-path'],
                description=
                ("Path to Triton install directory i.e. the parent directory of 'lib/libtritonserver.so'."
                 "Required only when using triton_launch_mode=c_api.")))
def _add_triton_configs ( self ) : self . _add_config ( ConfigField ( 'triton_launch_mode' , field_type = ConfigPrimitive ( str ) , flags = [ '--triton-launch-mode' ] , default_value = DEFAULT_TRITON_LAUNCH_MODE , choices = [ 'local' , 'docker' , 'remote' , 'c_api' ] , description = "The method by which to launch Triton Server. " "'local' assumes tritonserver binary is available locally. " "'docker' pulls and launches a triton docker container with " "the specified version. 'remote' connects to a running " "server using given http, grpc and metrics endpoints. " "'c_api' allows direct benchmarking of Triton locally" "without the use of endpoints." ) ) self . _add_config ( ConfigField ( 'triton_docker_image' , flags = [ '--triton-docker-image' ] , field_type = ConfigPrimitive ( str ) , default_value = DEFAULT_TRITON_DOCKER_IMAGE , description = 'Triton Server Docker image tag' ) ) self . _add_config ( ConfigField ( 'triton_http_endpoint' , flags = [ '--triton-http-endpoint' ] , field_type = ConfigPrimitive ( str ) , default_value = DEFAULT_TRITON_HTTP_ENDPOINT , description = "Triton Server HTTP endpoint url used by Model Analyzer client. " "Will be ignored if server-launch-mode is not 'remote'" ) ) self . _add_config ( ConfigField ( 'triton_grpc_endpoint' , flags = [ '--triton-grpc-endpoint' ] , field_type = ConfigPrimitive ( str ) , default_value = DEFAULT_TRITON_GRPC_ENDPOINT , description = "Triton Server HTTP endpoint url used by Model Analyzer client. " "Will be ignored if server-launch-mode is not 'remote'" ) ) self . _add_config ( ConfigField ( 'triton_metrics_url' , field_type = ConfigPrimitive ( str ) , flags = [ '--triton-metrics-url' ] , default_value = DEFAULT_TRITON_METRICS_URL , description = "Triton Server Metrics endpoint url. " "Will be ignored if server-launch-mode is not 'remote'" ) ) self . _add_config ( ConfigField ( 'triton_server_path' , field_type = ConfigPrimitive ( str , validator = binary_path_validator ) , flags = [ '--triton-server-path' ] , default_value = DEFAULT_TRITON_SERVER_PATH , description = 'The full path to the tritonserver binary executable' ) ) self . _add_config ( ConfigField ( 'triton_output_path' , field_type = ConfigPrimitive ( str ) , flags = [ '--triton-output-path' ] , description = ( 'The full path to the file to which Triton server instance will ' 'append their log output. If not specified, they are not written.' ) ) ) self . _add_config ( ConfigField ( 'triton_docker_mounts' , field_type = ConfigListString ( ) , flags = [ '--triton-docker-mounts' ] , description = ( "A list of strings representing volumes to be mounted. " "The strings should have the format '<host path>:<container path>:<access mode>'." ) ) ) self . _add_config ( ConfigField ( 'triton_docker_labels' , field_type = ConfigObject ( schema = { '*' : ConfigPrimitive ( str ) } ) , description = 'A dictionary of name-value labels to set metadata for the Triton ' 'server docker container in docker launch mode' ) ) self . _add_config ( ConfigField ( 'triton_install_path' , field_type = ConfigPrimitive ( str , validator = file_path_validator ) , default_value = DEFAULT_TRITON_INSTALL_PATH , flags = [ '--triton-install-path' ] , description = ( "Path to Triton install directory i.e. the parent directory of 'lib/libtritonserver.so'." "Required only when using triton_launch_mode=c_api." ) ) )
Adds the triton related flags
and config options
Adds the triton related flags and config options
"""
        Adds the triton related flags
        and config options
        """
self