mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 16:48:03 +08:00
[plugin] Custom model_runner/model support (#3186)
* support custom model&&model_runner * fix merge * add test && update doc * fix codestyle * fix unittest * load model in rl
This commit is contained in:
@@ -56,6 +56,9 @@ class RolloutModel(nn.Layer):
|
||||
def _init_model(self) -> nn.Layer:
|
||||
"""Load model from loader based on config."""
|
||||
context = paddle.LazyGuard()
|
||||
from fastdeploy.plugins.model_register import load_model_register_plugins
|
||||
|
||||
load_model_register_plugins()
|
||||
architectures = f"{self.fd_config.model_config.architectures[0]}RL"
|
||||
with context:
|
||||
model_cls = ModelRegistry.get_class(architectures)
|
||||
|
Reference in New Issue
Block a user