Skip to content

Commit

Permalink
Rank feature query function typing fixes (#3160)
Browse files Browse the repository at this point in the history
* fix: rank feature function typings

* fix: failing tests
  • Loading branch information
jurgisnosto authored Sep 25, 2024
1 parent 247fbba commit 01653f8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class RankFeatureQueryBodyFnTest extends AnyFunSuite with Matchers with GivenWhe
| "field": "pagerank",
| "boost": 0.5,
| "sigmoid": {
| "pivot": 7,
| "pivot": 7.0,
| "exponent": 0.6
| }
| }
Expand All @@ -50,7 +50,7 @@ class RankFeatureQueryBodyFnTest extends AnyFunSuite with Matchers with GivenWhe
| "rank_feature":{
| "field": "pagerank",
| "log": {
| "scaling_factor": 3
| "scaling_factor": 3.0
| }
| }
|}
Expand All @@ -75,7 +75,7 @@ class RankFeatureQueryBodyFnTest extends AnyFunSuite with Matchers with GivenWhe
| "rank_feature":{
| "field": "pagerank",
| "saturation": {
| "pivot": 2
| "pivot": 2.0
| }
| }
|}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ case class RankFeatureQuery(field: String,
}

object RankFeatureQuery {
case class Saturation(pivot: Option[Int])
case class Log(scalingFactor: Int)
case class Sigmoid(pivot: Int, exponent: Double)
case class Saturation(pivot: Option[Float])
case class Log(scalingFactor: Float)
case class Sigmoid(pivot: Float, exponent: Double)
case class Linear()
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"field": "pagerank",
"boost": 0.5,
"sigmoid": {
"pivot": 7,
"pivot": 7.0,
"exponent": 0.6
}
}
Expand Down

0 comments on commit 01653f8

Please sign in to comment.