-
Notifications
You must be signed in to change notification settings - Fork 123
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Remove transport calls in TrainingJobRunner and TrainingJobClusterStateListener Signed-off-by: Ryan Bogan <rbogan@amazon.com> * Fix tests Signed-off-by: Ryan Bogan <rbogan@amazon.com> * Add changelog Signed-off-by: Ryan Bogan <rbogan@amazon.com> * Fix CMake Faiss bug Signed-off-by: Ryan Bogan <rbogan@amazon.com> * Add state checks for existing cluster metadata calls Signed-off-by: Ryan Bogan <rbogan@amazon.com> * Remove CMake bug fix Signed-off-by: Ryan Bogan <rbogan@amazon.com> * Fix changelog Signed-off-by: Ryan Bogan <rbogan@amazon.com> * Fix failing tests Signed-off-by: Ryan Bogan <rbogan@amazon.com> * Refactor and add two more created state checks Signed-off-by: Ryan Bogan <rbogan@amazon.com> * Rebase and fix new tests Signed-off-by: Ryan Bogan <rbogan@amazon.com> * Refactor created checks and modify error messages Signed-off-by: Ryan Bogan <rbogan@amazon.com> * Refactor cluster state listener transport calls Signed-off-by: Ryan Bogan <rbogan@amazon.com> --------- Signed-off-by: Ryan Bogan <rbogan@amazon.com> (cherry picked from commit dc8eb6b) Co-authored-by: Ryan Bogan <rbogan@amazon.com>
- Loading branch information
1 parent
ec9ddb4
commit d9d2d10
Showing
12 changed files
with
77 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
* | ||
* The OpenSearch Contributors require contributions made to | ||
* this file be licensed under the Apache-2.0 license or a | ||
* compatible open source license. | ||
* | ||
* Modifications Copyright OpenSearch Contributors. See | ||
* GitHub history for details. | ||
*/ | ||
|
||
package org.opensearch.knn.indices; | ||
|
||
/** | ||
* A utility class for models. | ||
*/ | ||
public class ModelUtil { | ||
|
||
public static boolean isModelPresent(ModelMetadata modelMetadata) { | ||
return modelMetadata != null; | ||
} | ||
|
||
public static boolean isModelCreated(ModelMetadata modelMetadata) { | ||
if (!isModelPresent(modelMetadata)) { | ||
return false; | ||
} | ||
return modelMetadata.getState().equals(ModelState.CREATED); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters