Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/scala/com/beepboop/app/MainApp.scala
Original file line number Diff line number Diff line change
Expand Up @@ -103,11 +103,11 @@ object MainApp extends LogTrait {
PersistenceManager.performEmergencyBackup(snapshot, config.checkpointFile, config.outputCsv)
}
}))

val initialExpr = Iterator.continually {
ExpressionGenerator.generate(requiredType = BoolType, maxDepth = 2)
}.find(_.isDefined).flatten


info("--- Step 3: Starting Optimization Loop ---")

val result = searcher.findOptimalModel(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1167,7 +1167,7 @@ case class DiffnExpression(
true
} catch {
case e: Exception =>
error(e.getMessage)
error(e.getMessage + e.toString)
throw e
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,12 @@ object SolutionParser extends LogTrait {
val dataTypeOption = schema.get(header).flatMap(Option(_))
val parsedValue = dataTypeOption match {
case Some(dataType) => parseValue(valueStr, dataType)
case None => valueStr
case None =>
if (valueStr.startsWith("[") && valueStr.endsWith("]")) {
parseComplexArray(valueStr, "unknown")
} else {
parseScalar(valueStr, "unknown")
}
}
header -> parsedValue
}.toMap
Expand Down Expand Up @@ -156,7 +161,9 @@ object SolutionParser extends LogTrait {
scala.util.Try(cleanValue.toInt).getOrElse(cleanValue)
}
else {
cleanValue
scala.util.Try(cleanValue.toInt)
.orElse(scala.util.Try(cleanValue.toDouble))
.getOrElse(cleanValue)
}
}
}