alibaba / alibaba/EasyRec

split DSSM model got error

Open
#356 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2.4k
Forks
383
PR merge metrics
No merged PRs in 30d

Description

hi,dear 大佬
from the [issue](https://github.com/alibaba/EasyRec/issues/176) I tried the split script
but got the bug bellow:
```
python ../easy_rec/python/tools/split_model_pai.py --model_dir ../conf/dssm/_ckpt/export/final/ --user_model_dir ../conf/dssm/userModel/ --item_model_dir ../conf/dssm/itemModel/
Traceback (most recent call last):
File "../easy_rec/python/tools/split_model_pai.py", line 276, in
tf.app.run()
File "python3.7/site-packages/tensorflow_core/python/platform/app.py", line 40, in run
_run(main=main, argv=argv, flags_parser=_parse_flags_tolerate_undef)
File /python3.7/site-packages/absl/app.py", line 312, in run
_run_main(main, args)
File "/python3.7/site-packages/absl/app.py", line 258, in _run_main
sys.exit(main(argv))
File "../easy_rec/python/tools/split_model_pai.py", line 263, in main
part_dir=FLAGS.user_model_dir)
File "../easy_rec/python/tools/split_model_pai.py", line 203, in export
saver = tf_saver.Saver()
File "/python3.7/site-packages/tensorflow_core/python/training/saver.py", line 828, in __init__
self.build()
File "/python3.7/site-packages/tensorflow_core/python/training/saver.py", line 840, in build
self._build(self._filename, build_save=True, build_restore=True)
File "/python3.7/site-packages/tensorflow_core/python/training/saver.py", line 865, in _build
raise ValueError("No variables to save")
ValueError: No variables to save

```
could u pls help me ?
thx

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the command from the issue and inspect easy_rec/python/tools/split_model_pai.py around export at line 203 and main at line 263. Trace why the TensorFlow Saver sees no variables during the split. Done means the command completes and produces the requested user and item model directories.

Written by the indexing model from the issue text.

Assessment

Tech stack
python, tensorflow
Domain
machine-learning, tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.