Skip to content

Commit

Permalink
feat: send properly base64 encoded for new r models
Browse files Browse the repository at this point in the history
  • Loading branch information
alarv committed Nov 21, 2024
1 parent 263cc4e commit 7ca404a
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/main/kotlin/org/jaqpot/api/mapper/ModelMapper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,11 @@ private fun Model.encodeRawPreprocessor(rawPreprocessor: ByteArray?): String? {
}

fun Model.encodeRawModel(rawModel: ByteArray): String {
return if (isRModel()) {
return if (isRModel() && isLegacyModel()) {
// https://upci-ntua.atlassian.net/browse/JAQPOT-199
// R models require special deserialization and base64 messes up the model
rawModel.decodeToString()
}
// else if (isLegacyModel()) {
// String(rawModel)
// }
else {
} else {
Base64.getEncoder().encodeToString(rawModel)
}
}
Expand Down

0 comments on commit 7ca404a

Please sign in to comment.