Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#6411: Add Rust ranking provider based on CatBoost model
- Loading branch information
1 parent
0587fc3
commit d3b9ac4
Showing
4 changed files
with
31 additions
and
0 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
15 changes: 15 additions & 0 deletions
15
ml-completion/src/203/main/kotlin/org/rust/ml/RsMLRankingProvider.kt
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,15 @@ | ||
/* | ||
* Use of this source code is governed by the MIT license that can be | ||
* found in the LICENSE file. | ||
*/ | ||
|
||
package org.rust.ml | ||
|
||
import com.intellij.internal.ml.catboost.CatBoostJarCompletionModelProvider | ||
import com.intellij.lang.Language | ||
import org.rust.lang.RsLanguage | ||
|
||
@Suppress("UnstableApiUsage") | ||
class RsMLRankingProvider : CatBoostJarCompletionModelProvider("Rust", "rust_features", "rust_model") { | ||
override fun isLanguageSupported(language: Language): Boolean = language == RsLanguage | ||
} |
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
13 changes: 13 additions & 0 deletions
13
ml-completion/src/203/test/kotlin/org/rust/ml/RsModelMetadataConsistencyTest.kt
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,13 @@ | ||
/* | ||
* Use of this source code is governed by the MIT license that can be | ||
* found in the LICENSE file. | ||
*/ | ||
|
||
package org.rust.ml | ||
|
||
import org.junit.Test | ||
|
||
class RsModelMetadataConsistencyTest { | ||
@Test | ||
fun `test model metadata consistency`() = RsMLRankingProvider().assertModelMetadataConsistent() | ||
} |