磁盘上存在 3 个版本的模型的 Tensorflow 服务,但只有最新版本可用
Tensorflow Serving of model with 3 versions present on disk but only latest is available
我 运行 tensorflow_model_server(使用 apt-get 安装的版本 1.8.0)具有 --model_config_file 选项。
我的配置文件是这样的:
model_config_list: {
config: {
name: "MyModelName",
base_path: "<path to model>/MyModelName"
model_platform: "tensorflow"
}
}
在 MyModelName 目录中有模型的 3 个版本(目录 1、2 和 3)。
当我启动模型服务器时,我可以看到版本 3 可用,我可以通过服务客户端访问它,无需指定版本(因此假定为最新版本)或特别要求版本 3。
如果我尝试特别请求模型的版本 2,请求将失败并显示错误消息 "Servable not found for request: Specific(MyModelName, 2)"。
是否可以通过 tensorflow_model_server 命令行选项或我的模型配置文件的内容来使用磁盘上存在的所有模型版本?
我正在尝试解决同样的问题。如果你看到 ModelConfig definition, there is a field called model_version_policy of type FileSystemStoragePathSourceConfig.ServableVersionPolicy。所以理想情况下,如果您像这样在配置中设置此字段:
model_config_list: {
config: {
name: "MyModelName",
base_path: "<path to model>/MyModelName"
model_platform: "tensorflow",
model_version_policy: {all: {}}
}
}
那么您应该可以更改版本策略以加载所有可用版本。
请参阅 this github 问题了解更多信息。
我 运行 tensorflow_model_server(使用 apt-get 安装的版本 1.8.0)具有 --model_config_file 选项。
我的配置文件是这样的:
model_config_list: {
config: {
name: "MyModelName",
base_path: "<path to model>/MyModelName"
model_platform: "tensorflow"
}
}
在 MyModelName 目录中有模型的 3 个版本(目录 1、2 和 3)。
当我启动模型服务器时,我可以看到版本 3 可用,我可以通过服务客户端访问它,无需指定版本(因此假定为最新版本)或特别要求版本 3。
如果我尝试特别请求模型的版本 2,请求将失败并显示错误消息 "Servable not found for request: Specific(MyModelName, 2)"。
是否可以通过 tensorflow_model_server 命令行选项或我的模型配置文件的内容来使用磁盘上存在的所有模型版本?
我正在尝试解决同样的问题。如果你看到 ModelConfig definition, there is a field called model_version_policy of type FileSystemStoragePathSourceConfig.ServableVersionPolicy。所以理想情况下,如果您像这样在配置中设置此字段:
model_config_list: {
config: {
name: "MyModelName",
base_path: "<path to model>/MyModelName"
model_platform: "tensorflow",
model_version_policy: {all: {}}
}
}
那么您应该可以更改版本策略以加载所有可用版本。
请参阅 this github 问题了解更多信息。