mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 00:40:28 +07:00
[ml-completion] ML-2636 Integrate completion ranking model for new terminal
GitOrigin-RevId: 0ad89ea2de8595001d8697a5dc1d437dee89a0b6
This commit is contained in:
committed by
intellij-monorepo-bot
parent
1854279d75
commit
8d8e6176c5
@@ -1222,6 +1222,7 @@ object CommunityLibraryLicenses {
|
||||
jetbrainsLibrary("completion-ranking-ruby-exp"),
|
||||
jetbrainsLibrary("completion-ranking-rust-exp"),
|
||||
jetbrainsLibrary("completion-ranking-scala-exp"),
|
||||
jetbrainsLibrary("completion-ranking-sh-exp"),
|
||||
jetbrainsLibrary("completion-ranking-swift-exp"),
|
||||
jetbrainsLibrary("completion-ranking-typescript-exp"),
|
||||
jetbrainsLibrary("debugger-agent"),
|
||||
|
||||
@@ -299,5 +299,23 @@
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library">
|
||||
<library name="completion-ranking-sh-exp" type="repository">
|
||||
<properties include-transitive-deps="false" maven-id="org.jetbrains.intellij.deps.completion:completion-ranking-sh:0.0.1">
|
||||
<verification>
|
||||
<artifact url="file://$MAVEN_REPOSITORY$/org/jetbrains/intellij/deps/completion/completion-ranking-sh/0.0.1/completion-ranking-sh-0.0.1.jar">
|
||||
<sha256sum>2ab8007555b8fdedb7efce607cc77c03da85fcf4ea2e8376b9a352bed5f04f4a</sha256sum>
|
||||
</artifact>
|
||||
</verification>
|
||||
</properties>
|
||||
<CLASSES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/intellij/deps/completion/completion-ranking-sh/0.0.1/completion-ranking-sh-0.0.1.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES>
|
||||
<root url="jar://$MAVEN_REPOSITORY$/org/jetbrains/intellij/deps/completion/completion-ranking-sh/0.0.1/completion-ranking-sh-0.0.1-sources.jar!/" />
|
||||
</SOURCES>
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
||||
@@ -30,5 +30,6 @@
|
||||
<completion.ml.model implementation="com.jetbrains.completion.ml.ranker.ExperimentCidrMLRankingProvider"/>
|
||||
<completion.ml.model implementation="com.jetbrains.completion.ml.ranker.ExperimentalHTMLMLRankingProvider"/>
|
||||
<completion.ml.model implementation="com.jetbrains.completion.ml.ranker.ExperimentalCSSMLRankingProvider"/>
|
||||
<completion.ml.model implementation="com.jetbrains.completion.ml.ranker.ExperimentalShMLRankingProvider"/>
|
||||
</extensions>
|
||||
</idea-plugin>
|
||||
@@ -13,3 +13,4 @@ ml.completion.experiment.model.swift=Swift
|
||||
ml.completion.experiment.model.cidr=C/C++
|
||||
ml.completion.experiment.model.html=HTML
|
||||
ml.completion.experiment.model.css=CSS
|
||||
ml.completion.experiment.model.sh=Shell Script
|
||||
|
||||
@@ -0,0 +1,14 @@
|
||||
// Copyright 2000-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.jetbrains.completion.ml.ranker
|
||||
|
||||
import com.intellij.completion.ml.ranker.ExperimentModelProvider
|
||||
import com.intellij.internal.ml.catboost.CatBoostJarCompletionModelProvider
|
||||
import com.intellij.lang.Language
|
||||
|
||||
class ExperimentalShMLRankingProvider : CatBoostJarCompletionModelProvider(
|
||||
CompletionRankingModelsBundle.message("ml.completion.experiment.model.sh"), "sh_features_exp", "sh_model_exp"), ExperimentModelProvider {
|
||||
|
||||
override fun isLanguageSupported(language: Language): Boolean = language.id.compareTo("shell script", ignoreCase = true) == 0
|
||||
|
||||
override fun experimentGroupNumber(): Int = 13
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
// Copyright 2000-2022 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
// Copyright 2000-2024 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
|
||||
package com.jetbrains.completion.ml.ranker
|
||||
|
||||
import org.junit.Test
|
||||
@@ -51,4 +51,7 @@ class MetadataConsistencyTest {
|
||||
|
||||
@Test
|
||||
fun testCSSMetadata() = ExperimentalCSSMLRankingProvider().assertModelMetadataConsistent()
|
||||
|
||||
@Test
|
||||
fun testShMetadata() = ExperimentalShMLRankingProvider().assertModelMetadataConsistent()
|
||||
}
|
||||
|
||||
@@ -219,6 +219,12 @@
|
||||
"experimentBucketsCount": 4,
|
||||
"includeGroups": [ 7, 22, 28, 24 ],
|
||||
"shouldLogElementFeatures": true
|
||||
},
|
||||
{
|
||||
"id": "shell script",
|
||||
"experimentBucketsCount": 4,
|
||||
"includeGroups": [ 7, 12, 13 ],
|
||||
"shouldLogElementFeatures": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user