Hi all. This is my first time using Elasticsearch. Currently I've just deployed a cluster consisted of 3 nodes in my localhost.
I'm trying to import a NER NLP model using eland based on https://www.elastic.co/guide/en/elasticsearch/client/eland/current/machine-learning.html:
import elasticsearch
from pathlib import Path
from eland.ml.pytorch import PyTorchModel
from eland.ml.pytorch.transformers import TransformerModel
tmp_path = 'models'
Path(tmp_path).mkdir(parents=True, exist_ok=True)
model_path, config, vocab_path = tm.save(tmp_path)
es_url = 'http://localhost:9201'
es = elasticsearch.Elasticsearch(es_url, request_timeout=300)
ptm = PyTorchModel(es, tm.elasticsearch_model_id())
ptm.import_model(
model_path=model_path,
config_path=None,
vocab_path=vocab_path,
config=config)
The problem is, when I tried to run the last command (import_model), it produced the following exception:
AuthorizationException: AuthorizationException(403, 'security_exception', 'current license is non-compliant for [ml]')
I tried to do some searching and I'm guessing it's a problem with xpack.ml.enabled (?) The only xpack configuration I provided in my nodes yml file is xpack.security.enabled = false
. In that case, shouldn't xpack.ml.enabled
be true
since its the default value?
Or is this caused by a completely different problem?
Any help would be appreciated, thanks a lot in advance!