Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Opensearch Register ML model error #2597

Open
samuelfabrizi97 opened this issue Jun 28, 2024 · 0 comments
Open

[BUG] Opensearch Register ML model error #2597

samuelfabrizi97 opened this issue Jun 28, 2024 · 0 comments
Assignees
Labels
bug Something isn't working v2.17.0

Comments

@samuelfabrizi97
Copy link

What is the bug?
Cannot register a ML model on Opensearch local Docker Container.

Exception raised: Cannot invoke "java.lang.Boolean.booleanValue()" because "doesVersionCreateModelGroup" is null

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Update ML cluster settings
PUT _cluster/settings
{
  "persistent": {
    "plugins": {
      "ml_commons": {
        "only_run_on_ml_node": "false",
        "model_access_control_enabled": "true",
        "native_memory_threshold": "100"
      }
    }
  }
}

POST {{Host}}/_plugins/_ml/models/_register
{
  "name": "huggingface/sentence-transformers/all-distilroberta-v1",
  "version": "1.0.1",
  "model_format": "TORCH_SCRIPT"
}
  1. GET /_plugins/_ml/tasks/<task_id>
{
  "task_type": "REGISTER_MODEL",
  "function_name": "TEXT_EMBEDDING",
  "state": "FAILED",
  "worker_node": [
    "lhpVlHIjTtq20jNo-wrxjw"
  ],
  "create_time": 1719575940542,
  "last_update_time": 1719575951383,
  "error": """Cannot invoke "java.lang.Boolean.booleanValue()" because "doesVersionCreateModelGroup" is null""",
  "is_async": true
}

What is the expected behavior?
The ML model is registered as specified in the tutorial, by receiving the following message

{
  "model_id":<model id>",
  "task_type": "REGISTER_MODEL",
  "function_name": "TEXT_EMBEDDING",
  "state": "COMPLETED",
  "worker_node": [
    "4p6FVOmJRtu3wehDD74hzQ"
  ],
  "create_time": 1694358489722,
  "last_update_time": 1694358499139,
  "is_async": true
}

What is your host/environment?
Tested on

  • OS: Linux Mint 20.3 Cinnamon

  • Version: 5.2.7

  • OS: macOS Sonoma

  • Version: 14.4.1

Docker-compose

version: '3.6'


services:

  opensearch-node1:
    image: opensearchproject/opensearch:2.11.1
    container_name: opensearch-node1
    environment:
      - cluster.name=opensearch-cluster
      - node.name=opensearch-node1
      - discovery.seed_hosts=opensearch-node1,opensearch-node2
      - cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2
      - bootstrap.memory_lock=true # along with the memlock settings below, disables swapping
      - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 262144 # maximum number of open files for the OpenSearch user, set to at least 65536 on modern systems
        hard: 262144
    volumes:
      - opensearch-datadir-node1:/usr/share/opensearch/data
    ports:
      - 9200:9200
      - 9600:9600 # required for Performance Analyzer
    networks:
      - opensearch-net

  opensearch-node2:
    image: opensearchproject/opensearch:2.11.1
    container_name: opensearch-node2
    environment:
      - cluster.name=opensearch-cluster
      - node.name=opensearch-node2
      - discovery.seed_hosts=opensearch-node1,opensearch-node2
      - cluster.initial_cluster_manager_nodes=opensearch-node1,opensearch-node2
      - bootstrap.memory_lock=true
      - "OPENSEARCH_JAVA_OPTS=-Xms512m -Xmx512m"
    ulimits:
      memlock:
        soft: -1
        hard: -1
      nofile:
        soft: 262144
        hard: 262144
    volumes:
      - opensearch-datadir-node2:/usr/share/opensearch/data
    networks:
      - opensearch-net

  opensearch-dashboards:
    image: opensearchproject/opensearch-dashboards:2.11.1
    container_name: opensearch-dashboards
    ports:
      - 5601:5601
    expose:
      - "5601"
    environment:
      OPENSEARCH_HOSTS: '["https://opensearch-node1:9200","https://opensearch-node2:9200"]'
    networks:
      - opensearch-net

networks:

  opensearch-net:
    name: opensearch-net



volumes:

  opensearch-datadir-node1:
    name: opensearch-datadir-node1

  opensearch-datadir-node2:
    name: opensearch-datadir-node1

I tried with the latest docker image (2.15.0) but faced the same issue.

@samuelfabrizi97 samuelfabrizi97 added bug Something isn't working untriaged labels Jun 28, 2024
@mingshl mingshl removed the untriaged label Jul 2, 2024
@mingshl mingshl assigned mingshl and rbhavna and unassigned mingshl Jul 2, 2024
@mingshl mingshl moved this to On-deck in ml-commons projects Jul 2, 2024
@rbhavna rbhavna added the v2.16.0 Issues targeting release v2.16.0 label Jul 2, 2024
@rbhavna rbhavna moved this from On-deck to In Progress in ml-commons projects Jul 2, 2024
@b4sjoo b4sjoo added v2.17.0 and removed v2.16.0 Issues targeting release v2.16.0 labels Jul 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working v2.17.0
Projects
Status: In Progress
Development

No branches or pull requests

4 participants