未验证 提交 8d4e7fa9 编写于 作者: 走神的阿圆's avatar 走神的阿圆 提交者: GitHub

support ndarray of embedding (#930)

Co-authored-by: NPeter Pan <littlepanzh@gmail.com>
上级 4bf2a508
...@@ -298,17 +298,17 @@ class LogWriter(object): ...@@ -298,17 +298,17 @@ class LogWriter(object):
""" """
if '%' in tag: if '%' in tag:
raise RuntimeError("% can't appear in tag!") raise RuntimeError("% can't appear in tag!")
if not mat and hot_vectors: if (mat is None) and hot_vectors:
mat = hot_vectors mat = hot_vectors
logger.warning('Parameter `hot_vectors` in function ' logger.warning('Parameter `hot_vectors` in function '
'`add_embeddings` will be deprecated in ' '`add_embeddings` will be deprecated in '
'future, use `mat` instead.') 'future, use `mat` instead.')
if not metadata and labels: if (metadata is None) and labels:
metadata = labels metadata = labels
logger.warning( logger.warning(
'Parameter `labels` in function `add_embeddings` will be ' 'Parameter `labels` in function `add_embeddings` will be '
'deprecated in future, use `metadata` instead.') 'deprecated in future, use `metadata` instead.')
if not metadata_header and labels_meta: if (metadata_header is None) and labels_meta:
metadata_header = labels_meta metadata_header = labels_meta
logger.warning( logger.warning(
'Parameter `labels_meta` in function `add_embeddings` will be' 'Parameter `labels_meta` in function `add_embeddings` will be'
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册