Skip to content

Commit

Permalink
feat: add r pbpk ode solver (#117)
Browse files Browse the repository at this point in the history
  • Loading branch information
alarv authored Nov 19, 2024
1 parent b7c8d13 commit 56fa770
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/kotlin/org/jaqpot/api/entity/Model.kt
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,8 @@ class Model(
@SQLRestriction("score_type = 'TRAIN'")
var trainScores: List<Scores>? = null,

val rPbpkOdeSolver: String? = null,

@OneToMany(mappedBy = "model", cascade = [CascadeType.ALL], orphanRemoval = true)
@SQLRestriction("score_type = 'TEST'")
var testScores: List<Scores>? = null,
Expand Down
2 changes: 2 additions & 0 deletions src/main/kotlin/org/jaqpot/api/mapper/ModelMapper.kt
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ fun ModelDto.toEntity(creatorId: String): Model {
trainScores = mutableListOf(),
testScores = mutableListOf(),
crossValidationScores = mutableListOf(),
rPbpkOdeSolver = this.rPbpkConfig?.odeSolver,
rawPreprocessor = this.rawPreprocessor,
rawModel = this.rawModel,
)
Expand Down Expand Up @@ -115,6 +116,7 @@ fun Model.toPredictionModelDto(
featurizers = this.featurizers.map { it.toDto() },
preprocessors = this.preprocessors.map { it.toDto() },
torchConfig = this.torchConfig,
rPbpkOdeSolver = this.rPbpkOdeSolver,
legacyAdditionalInfo = this.legacyAdditionalInfo,
legacyPredictionService = this.legacyPredictionService
)
Expand Down
2 changes: 2 additions & 0 deletions src/main/resources/db/migration/V39__add_r_pbpk_config.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ALTER TABLE model
ADD r_pbpk_ode_solver VARCHAR(255);
10 changes: 10 additions & 0 deletions src/main/resources/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1253,6 +1253,8 @@ components:
type: array
items:
$ref: '#/components/schemas/Scores'
rPbpkConfig:
$ref: '#/components/schemas/RPbpkConfig'
createdAt:
type: string
format: date-time
Expand Down Expand Up @@ -1448,6 +1450,12 @@ components:
format: float
maxItems: 100
maxItems: 100
RPbpkConfig:
type: object
description: Configuration for the R PBPK models
properties:
odeSolver:
type: string
OrganizationSummary:
type: object
required:
Expand Down Expand Up @@ -2017,6 +2025,8 @@ components:
$ref: '#/components/schemas/AnyValue'
description: "Torch configuration settings, optional"
nullable: true
rPbpkOdeSolver:
type: string
legacyAdditionalInfo:
type: object
additionalProperties:
Expand Down

0 comments on commit 56fa770

Please sign in to comment.