Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

跑完sdm模型,想导出用户塔用作实时召回,savemodel格式,失败,显示缺失state #96

Open
1041787154 opened this issue Dec 20, 2022 · 0 comments
Labels
question Further information is requested

Comments

@1041787154
Copy link

Please refer to the FAQ in doc and search for the related issues before you ask the question.

Describe the question(问题描述)
跑完sdm模型,想导出用户塔用作实时召回,savemodel格式,失败,显示缺失state

Additional context
日志如下:
`WARNING:tensorflow:Skipping full serialization of Keras layer <tensorflow.python.keras.layers.legacy_rnn.rnn_cell_impl.DropoutWrapper object at 0x7f0e05ee8a10>, because it is not built.
WARNING:tensorflow:Skipping full serialization of Keras layer <tensorflow.python.keras.layers.legacy_rnn.rnn_cell_impl.ResidualWrapper object at 0x7f0e05e8e7d0>, because it is not built.

TypeError Traceback (most recent call last)
/tmp/ipykernel_3127967/106687722.py in
4 user_model_path = './Recall/sdm/models/dssmUser/003_epoch1_userbn1_1-0-0_test/'
5 item_model_path = './Recall/sdm/models/dssmItem/003_epoch1_userbn1_1-0-0_test/'
----> 6 user_embedding_model.save(user_model_path, save_format='tf', overwrite=True, )
7 item_embedding_model.save(item_model_path, save_format='tf', overwrite=True, )
8

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py in save(self, filepath, overwrite, include_optimizer, save_format, signatures, options)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/keras/saving/save.py in save_model(model, filepath, overwrite, include_optimizer, save_format, signatures, options)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/keras/saving/saved_model/save.py in save(model, filepath, overwrite, include_optimizer, signatures, options)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/saved_model/save.py in save(obj, export_dir, signatures, options)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/saved_model/save.py in _build_meta_graph(obj, export_dir, signatures, options, meta_graph_def)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/saved_model/save.py in init(self, checkpoint_view, wrapped_functions)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/training/tracking/graph_view.py in objects_ids_and_slot_variables(self)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/training/tracking/graph_view.py in _breadth_first_traversal(self)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/saved_model/save.py in list_dependencies(self, obj)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/saved_model/save.py in list_extra_dependencies(self, obj)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/keras/engine/base_layer_v1.py in _list_extra_dependencies_for_serialization(self, serialization_cache)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/keras/saving/saved_model/base_serialization.py in list_extra_dependencies_for_serialization(self, serialization_cache)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/keras/saving/saved_model/layer_serialization.py in objects_to_serialize(self, serialization_cache)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/keras/saving/saved_model/layer_serialization.py in _get_serialized_attributes(self, serialization_cache)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/keras/saving/saved_model/layer_serialization.py in _get_serialized_attributes_internal(self, serialization_cache)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/keras/saving/saved_model/save_impl.py in wrap_layer_functions(layer, serialization_cache)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/keras/saving/saved_model/save_impl.py in get_concrete_function(self, *args, **kwargs)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/keras/saving/saved_model/save_impl.py in add_trace(self, *args, **kwargs)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/keras/saving/saved_model/save_impl.py in get_concrete_function(self, *args, **kwargs)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py in get_concrete_function(self, *args, **kwargs)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py in _get_concrete_function_garbage_collected(self, *args, **kwargs)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py in _initialize(self, args, kwds, add_initializers_to)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/eager/function.py in _get_concrete_function_internal_garbage_collected(self, *args, **kwargs)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/eager/function.py in _maybe_define_function(self, args, kwargs)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/eager/function.py in _create_graph_function(self, args, kwargs, override_flat_arg_shapes)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/framework/func_graph.py in func_graph_from_py_func(name, python_func, args, kwargs, signature, func_graph, autograph, autograph_options, add_control_dependencies, arg_names, op_return_value, collections, capture_by_value, override_flat_arg_shapes)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/eager/def_function.py in wrapped_fn(*args, **kwds)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/keras/saving/saved_model/save_impl.py in wrapper(*args, **kwargs)

/rainbow/miniconda3/envs/wzjpy37/lib/python3.7/site-packages/tensorflow/python/keras/saving/saved_model/save_impl.py in call_and_return_conditional_losses(inputs, *args, **kwargs)

TypeError: call() missing 1 required positional argument: 'state'`

Operating environment(运行环境):

  • python version [3.7, 3.8]
  • tensorflow version [1.15.5, 2.3.0]
  • deepmatch version [0.3.1,]
@1041787154 1041787154 added the question Further information is requested label Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant