Skip to content

Commit 5478604

Browse files
authored
Bugfix/int serde (#37)
* fix integer serialization * update news
1 parent 128f357 commit 5478604

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
* **Breaking change**: `ml_write_bundle()` now takes the `sample_input` instead of `dataset`.
44
* Support for Spark 2.4 and MLeap 0.14.
5+
* Integer inputs are now supported (#36).
56

67
# mleap 0.1.3
78

R/prediction.R

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ mleap_transform <- function(model, data) {
1616
types <- columns %>%
1717
purrr::map_chr(~ input_schema$type[[match(.x, input_schema$name)]])
1818

19+
types <- gsub("^int$", "integer", types)
20+
1921
schema <- list(fields = purrr::map2(
2022
columns, types, ~ list(name = .x, type = .y))
2123
)

0 commit comments

Comments
 (0)