opensearch-project / opensearch-api-specification

API specification for OpenSearch
Apache License 2.0
35 stars 62 forks source link

Fix: model training intermittent test failure. #644

Closed dblock closed 1 month ago

dblock commented 1 month ago

Description

The reason this was a flake was that half the time the model would successfully begin training, and half the time would not.

The time it would not it would fail with the following error:

Error: 'nx >= k' failed: Number of training points (0) should be at least as large as number of clusters (4)

This was caused by the fact that a refresh cycle had yet to run, so the model had 0 documents to use. However when a refresh cycle would happen in time, the model would begin training. In that case it could not be deleted until training was complete, causing the CI failure.

Issues Resolved

Closes https://github.com/opensearch-project/opensearch-api-specification/issues/614.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. For more information on following Developer Certificate of Origin and signing off your commits, please check here.

github-actions[bot] commented 1 month ago

Changes Analysis

Commit SHA: acf7ee842d17ebdd829bda524846c6c4c7d2e168 Comparing To SHA: 54f0af9bcedfa8bd8f5dc225becd0941d6184697

API Changes

Summary

└─┬Paths
  └─┬/_plugins/_knn/models/{model_id}
    └─┬GET
      └─┬Responses
        └─┬200
          └──[➕] content (28448:11)
Document Element Total Changes Breaking Changes
paths 1 0

Report

The full API changes report is available at: https://github.com/opensearch-project/opensearch-api-specification/actions/runs/11506542093/artifacts/2101000069

API Coverage

Before After Δ
Covered (%) 588 (57.59 %) 588 (57.59 %) 0 (0 %)
Uncovered (%) 433 (42.41 %) 433 (42.41 %) 0 (0 %)
Unknown 30 30 0
github-actions[bot] commented 1 month ago

Spec Test Coverage Analysis

Total Tested
505 318 (62.97 %)
nhtruong commented 1 month ago

My motto when dealing with OpenSearch errors: "When in doubt: REFRESH!"