elastic / eland

Python Client and Toolkit for DataFrames, Big Data, Machine Learning and ETL in Elasticsearch
https://eland.readthedocs.io
Apache License 2.0
21 stars 99 forks source link

How to support type Keras Pre-trained #703

Closed 1057888035 closed 4 months ago

1057888035 commented 5 months ago

I want make this pre trained : https://huggingface.co/lingbionlp/AIONER-0415/tree/main. It contains a file : PubmedBERT-CRF-AIONER.h5, I copied to my model: https://huggingface.co/cc12138/cctestAIONER/tree/main. Run command: docker run -it --rm docker.elastic.co/eland/eland eland_import_hub_model --url http://*****:9200 --hub-model-id cc12138/cctestAIONER --start Error print:
OSError: cc12138/cctestAIONER does not appear to have a file named config.json. Checkout 'https://huggingface.co/cc12138/cctestAIONER/main' for available files.

davidkyle commented 4 months ago

OSError: cc12138/cctestAIONER does not appear to have a file named config.json

The config.json defines the type of the model and how to load it, there should also be a tokenizer_confg.json that defines which tokenizer to use. Those files aren't present in the HuggingFace repo and without them the model cannot be loaded.

Closing the issue as the model is missing vital files and cannot be loaded in either Eland or HuggingFace transformers.