Authorization exception when trying to import model to Elasticsearch cluster

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!

Using pytorch models is a platinum licensed feature.

If you are running some local experiments, you can use a trial.

Here is the API: Start trial API | Elasticsearch Guide [8.3] | Elastic

The call you probably want to make:

POST /_license/start_trial?acknowledge=true

I see. Thanks a lot for the answer! And also sorry for the late reply.