-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[feat] support easyrec config convert to tzrec config (#37)
- Loading branch information
1 parent
9fc05ac
commit 7b331c2
Showing
7 changed files
with
1,435 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
30 changes: 30 additions & 0 deletions
30
docs/source/usage/convert_easyrec_config_to_tzrec_config.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# EasyRec迁移TorchEasyRec | ||
|
||
推荐模型一般特征和模型配置较为复杂,TorchEasyRec提供了配置转换工具,可以便捷地将EasyRec的配置文件转换为TorchEasyRec文件。 | ||
|
||
## 转换命令 | ||
|
||
torcheasyrec的pipeline.config包含了feature generate的配置,因此需要有easyrec训练使用的pipeline.config和fg.json两部分才可以转换为torcheasyrec的pipeline.config | ||
|
||
```bash | ||
PYTHONPATH=. python tzrec/tools/convert_easyrec_config_to_tzrec_config.py \ | ||
--easyrec_config_path ./easyrec.config \ | ||
--fg_json_path ./fg.json \ | ||
--output_tzrec_config_path ./tzrec.config | ||
``` | ||
|
||
- --easyrec_config_path: easyrec训练使用的pipeline.config路径 | ||
- --fg_json_path: easyrec训练和推理使用的fg.json路径 | ||
- --output_tzrec_config_path: 生成tzrec的config路径 | ||
|
||
如果使用自定义的EasyRec安装包,应使用如下转换命令 | ||
|
||
```bash | ||
EASYREC_URL=http://xxx.whl \ | ||
PYTHONPATH=. python tzrec/tools/convert_easyrec_config_to_tzrec_config.py \ | ||
--easyrec_config_path ./easyrec.config \ | ||
--fg_json_path ./fg.json \ | ||
--output_tzrec_config_path ./tzrec.config | ||
``` | ||
|
||
- EASYREC_URL: 是http开头的EasyRec tar包或者whl的url地址 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,6 @@ class Mode(Enum): | |
TRAIN = 1 | ||
EVAL = 2 | ||
PREDICT = 3 | ||
|
||
|
||
EASYREC_VERSION = "0.7.5" |
Oops, something went wrong.