This commit is contained in:
雾聪 2024-10-29 16:49:18 +08:00
commit 2aa7d91822
2 changed files with 12 additions and 2 deletions

View File

@ -232,6 +232,8 @@ scheduler_conf:
}
```
内容可以复用,直接拷贝即可,需要注意字段 `file_path_metas` 所有内容会自动拼接模型资源路径,并且会覆盖 `config.yaml` 中相同字段的路径。
## 注册表
### 查看注册表
@ -242,7 +244,7 @@ from funasr.register import tables
tables.print()
```
支持查看指定类型的注册表:\`tables.print("model")\`
支持查看指定类型的注册表,例如只看注册的`model`类`tables.print("model")`
### 注册模型
@ -284,6 +286,14 @@ model_conf:
...
```
## 注册失败
如果出现找不到注册模型或者注册函数,`assert model_class is not None, f'{kwargs["model"]} is not registered'`。模型注册的原理是import 模型文件可以通过import来查看具体注册失败原因例如上述模型文件为funasr/models/sense_voice/model.py
```python
from funasr.models.sense_voice.model import *
```
## 注册原则
* Model模型之间互相独立每一个模型都需要在funasr/models/下面新建一个模型目录不要采用类的继承方法不要从其他模型目录中import所有需要用到的都单独放到自己的模型目录中不要修改现有的模型代码

View File

@ -1 +1 @@
1.1.12
1.1.13