Skip to content

Commit

Permalink
Spotless
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosdelest committed Mar 18, 2024
1 parent 88af861 commit 3b8db71
Showing 1 changed file with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,13 @@ public static void getInstance(
Set<ShardId> shardIds,
ActionListener<BulkShardRequestInferenceProvider> listener
) {
Set<String> inferenceIds =
shardIds.stream().map(ShardId::getIndex).collect(Collectors.toSet()).stream()
.map(index -> clusterState.metadata().index(index).getFieldInferenceMetadata().getFieldInferenceOptions().values())
.flatMap(o -> o.stream().map(FieldInferenceMetadata.FieldInferenceOptions::inferenceId)).collect(Collectors.toSet());
Set<String> inferenceIds = shardIds.stream()
.map(ShardId::getIndex)
.collect(Collectors.toSet())
.stream()
.map(index -> clusterState.metadata().index(index).getFieldInferenceMetadata().getFieldInferenceOptions().values())
.flatMap(o -> o.stream().map(FieldInferenceMetadata.FieldInferenceOptions::inferenceId))
.collect(Collectors.toSet());
final Map<String, InferenceProvider> inferenceProviderMap = new ConcurrentHashMap<>();
Runnable onModelLoadingComplete = () -> listener.onResponse(
new BulkShardRequestInferenceProvider(clusterState, inferenceProviderMap)
Expand Down

0 comments on commit 3b8db71

Please sign in to comment.