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

Suggestions #1

Merged

Conversation

DaveCTurner
Copy link

No description provided.

@@ -76,7 +76,7 @@
import static org.elasticsearch.xpack.core.ClientHelper.executeAsyncWithOrigin;
import static org.elasticsearch.xpack.ml.utils.InferenceProcessorInfoExtractor.pipelineIdsByResource;

public class TransportGetTrainedModelsStatsAction extends HandledTransportAction<
public class TransportGetTrainedModelsStatsAction extends TransportAction<
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No need to be a HandledTransportAction, this action is only ever invoked on the local node AFAICT.

Comment on lines +112 to +113
// workaround for https://github.com/elastic/elasticsearch/issues/97916 - TODO remove this when we can
executor.execute(ActionRunnable.wrap(listener, l -> doExecuteForked(task, request, l)));
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fork the whole thing onto executor first

l
);
})
.andThenAccept(tuple -> responseBuilder.setExpandedModelIdsWithAliases(tuple.v2()).setTotalModelCount(tuple.v1()))
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggest using andThenAccept to split out the handling of the previous step's result from the initiation of the next steps.

deploymentStats.getStats()
.results()
SubscribableListener

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

More blank lines makes for better formatting throughout.

@droberts195
Copy link
Owner

Thanks @DaveCTurner!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants