- 
                Notifications
    
You must be signed in to change notification settings  - Fork 25.6k
 
[ML] Transition EIS auth polling to persistent task on a single node #136713
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
base: main
Are you sure you want to change the base?
[ML] Transition EIS auth polling to persistent task on a single node #136713
Conversation
| 
           Hi @jonathan-buttner, I've created a changelog YAML for you.  | 
    
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please don't use the master for admin tasks that don't actually need to run on the master. If you need a task to run approximately once in the cluster, use a persistent task instead.
b2cd14a    to
    10ad8f2      
    Compare
  
    …sticsearch into ml-eis-auth-polling
| */ | ||
| public class AuthorizationTaskExecutorMultipleNodesIT extends ESIntegTestCase { | ||
| 
               | 
          ||
| private static final String AUTH_TASK_ACTION = AuthorizationPoller.TASK_NAME + "[c]"; | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I couldn't find exactly where [c] was being added in the code to include in this concatenation, but it always seems to be there.
| import java.util.Objects; | ||
| 
               | 
          ||
| public class Model { | ||
| public class Model implements Writeable { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Model needs to be serialized now because it's going to be sent to the master node to be stored in the inference index by the ModelRegistry.
| @@ -1,357 +0,0 @@ | |||
| /* | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I removed this because we are no longer revoking endpoints.
| 
               | 
          ||
| public void testStoreModels_ReturnsEmptyList_WhenGivenNoModelsToStore() { | ||
| PlainActionFuture<List<ModelRegistry.ModelStoreResponse>> storeListener = new PlainActionFuture<>(); | ||
| PlainActionFuture<List<ModelStoreResponse>> storeListener = new PlainActionFuture<>(); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes should be from move ModelStoreResponse to core.
| ); | ||
| } | ||
| 
               | 
          ||
| private static Map<String, DefaultModelConfig> initDefaultEndpoints( | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No longer needed because authorization is moved out of this class.
| import java.util.Objects; | ||
| 
               | 
          ||
| public abstract class ElasticInferenceServiceModel extends RateLimitGroupingModel { | ||
| public class ElasticInferenceServiceModel extends RateLimitGroupingModel { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm using this to create a generic instance of the model so we can store them using the ModelRegistry
| * Represents the preconfigured endpoints that are included in Elasticsearch. EIS will support dynamic preconfigured endpoints which means | ||
| * it can provide new preconfigured endpoints that do not exist in the source here. | ||
| */ | ||
| public class InternalPreconfiguredEndpoints { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly moved from the ElasticInferenceService.
| @@ -1,283 +0,0 @@ | |||
| /* | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Class under test was removed so we don't need it anymore. Most of the functionality was moved to AuthorizationPoller and its test files.
…sticsearch into ml-eis-auth-polling
…sticsearch into ml-eis-auth-polling
This PR is based on: #136569Already mergedThis PR moves the EIS authorization polling logic to a persistent task on a single node.
Notable changes:
Testing
Start EIS
Start ES pointing at EIS
Retrieve all the endpoints from the inference API should return some EIS endpoints now
A task should be present in the list
eis-authorization-poller[c]