I am trying to test a model that I onboarded to the Acumos platform (with python client). Running the image in docker fails with this error :
File "h5py/h5f.pyx", line 85, in h5py.h5f.open OSError: Unable to open file (unable to open file: name = 'data/keras/ticketsModel/model.hdf5', errno = 2, error message = 'No such file or directory', flags = 0, o_flags = 0)
My code looks like that :
from acumos.session import AcumosSession
from acumos.modeling import Model, List, create_dataframe
from tensorflow.python.keras.models import load_model
# This version tells me : unable to open file: name = 'data/keras/ticketsModel/model.hdf5'
#def classify_ticket(inText: str) -> str:
# current_model = load_model('data/keras/ticketsModel/model.hdf5')
# return current_model.predict(inText)
# This version tells me : NotImplementedError: numpy() is only available when eager execution is enabled.
current_model = load_model('data/keras/ticketsModel/model.hdf5')
def classify_ticket(inText: str) -> str:
return current_model.predict(inText)
model = Model(classify=classify_ticket)
session = AcumosSession()
session.dump(model,'ticket_classification','acumos_out')
Any help is greatly appreciated !