Когда я пытаюсь сгенерировать модель с помощью acumos, я получаю эту ошибку:
File "/Users/fredericchantrel/.pyenv/versions/ticl-v2-virtualenv-3.6.5/lib/python3.6/site-packages/acumos/pickler.py", line 245, in wrapped_save
...
File "/Users/fredericchantrel/.pyenv/versions/ticl-v2-virtualenv-3.6.5/lib/python3.6/site-packages/tensorflow/python/ops/resource_variable_ops.py", line 687, in numpy
"numpy() is only available when eager execution is enabled.")
NotImplementedError: numpy() is only available when eager execution is enabled.
Есть ли несовместимости с кусочками от acumos?
Вот кусок моего кода:
def classify_ticket(inText: str) -> str:
text = normalise(inText)
current_vec = get_sentence_vector(text)
x_predict = []
x_predict.append(current_vec)
X_predict = np.asarray(x_predict)
result = current_model.predict(X_predict)
predict = get_meilleure_reponse(result[0])
return predict
def get_sentence_vector(sentence):
words = sentence.split()
array_vector = []
for word in words:
try:
current_vec = get_word_vector(word)
array_vector.append(current_vec)
except KeyError as e:
print(f"token non trouvé dans le dico : {word}")
np_array = np.asarray(array_vector)
retour = np.mean(np_array, dtype=np.float64, axis=0)
return retour