简体   繁体   English

有没有办法从 triton 推理服务器获取 config.pbtxt 文件

[英]Is there a way to get the config.pbtxt file from triton inferencing server

Recently, I have come across a solution of the triton serving config file disable flag "--strict-model-config=false" while running the inferencing server.最近,我在运行推理服务器时遇到了 triton 服务配置文件禁用标志“--strict-model-config=false”的解决方案。 This would enable to create its own config file while loading the model from the model repository.这将能够在从模型存储库加载模型时创建自己的配置文件。

sudo docker run --rm --net=host -p 8000:8000 -p 8001:8001 -p 8002:8002 \
-v /home/rajesh/custom_repository:/models nvcr.io/nvidia/tritonserver:22.06-py3 \
tritonserver --model-repository=/models --strict-model-config=false

I would like to get the generated config file from the triton inferencing server since we can play around with the batch config and other parameters.我想从 triton 推理服务器获取生成的配置文件,因为我们可以使用批处理配置和其他参数。 Is there a way to get the inbuilt generated config.pbtxt file for the models I have loaded in the server so that I can play around the batch size and other parameters.有没有办法为我在服务器中加载的模型获取内置生成的 config.pbtxt 文件,以便我可以调整批量大小和其他参数。

As per the reference from the below link, the loaded model configuration can be found after loading the model repository into the triton server using the below curl command.根据以下链接的参考,在使用以下 curl 命令将模型存储库加载到 triton 服务器后,可以找到加载的模型配置。

https://github.com/triton-inference-server/server/blob/main/docs/model_configuration.md#minimal-model-configuration https://github.com/triton-inference-server/server/blob/main/docs/model_configuration.md#minimal-model-configuration

command:命令:

curl localhost:8000/v2/models/<model_name>/config

The above answer which the uses curl command would return the json response.上面使用 curl 命令的答案将返回 json 响应。

If the results should be in the protobuf format, try loading the model using triton inferencing server with strict model config as false and fetch the results by using the below python script which would return the results in necessary protobuf format.如果结果应该是 protobuf 格式,请尝试使用严格模型配置为 false 的 triton 推理服务器加载模型,并使用以下 python 脚本获取结果,该脚本将以必要的 protobuf 格式返回结果。 Use this to get the format of the model and edit it easily as per the needs in config pbtxt file instead of cnoverting json to protobuf results.使用它来获取模型的格式并根据配置 pbtxt 文件中的需要轻松编辑它,而不是将 json 转换为 protobuf 结果。

import tritonclient.grpc as grpcclient

triton_client = grpcclient.InferenceServerClient(url=<triton_server_url>)

model_config = triton_client.get_model_config(model_name=<model_name>, model_version=<model_version>)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 数据/mscoco_label_map.pbtxt; 没有这样的文件或目录 - data/mscoco_label_map.pbtxt; No such file or directory 张量流中.pb和.pbtxt之间的区别? - Difference between .pb and .pbtxt in tensorflow? Tensorflow-将.pbtxt模型转换为.tflite时出错 - Tensorflow - Errors in converting .pbtxt model to .tflite 合并两个训练有素的网络以按顺序进行推理 - Merging Two Trained Networks for Inferencing Sequentially 有没有办法从无监督数据集中获取关系? - Is there any way to get the relationship from the unsupervised dataset? 无法从“tensorflow.python.eager.context”导入名称“get_config” - cannot import name 'get_config' from 'tensorflow.python.eager.context' LIBSVM:从模型文件获取支持向量 - LIBSVM: Get support vectors from model file PAM配置文件条件执行语句 - Pam config file conditional execution of statements NotImplementedError:学习率计划必须覆盖 get_config - NotImplementedError: Learning rate schedule must override get_config 有没有办法让 tensorflow js 从 json 文件而不是 csv 读取/训练数据? - is there a way to make tensorflow js read/train data from a json file instead of a csv?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM