update
This commit is contained in:
@@ -498,7 +498,7 @@ function evaluator(state::T1, text2textInstructLLM::Function
|
|||||||
# evaluation score as reward because different answers hold different value for the user.
|
# evaluation score as reward because different answers hold different value for the user.
|
||||||
state[:reward] = responsedict[:score]
|
state[:reward] = responsedict[:score]
|
||||||
end
|
end
|
||||||
println("\n~~~ Evaluator() ", @__FILE__, ":", @__LINE__, " $(Dates.now())")
|
println("\nEvaluator() ", @__FILE__, ":", @__LINE__, " $(Dates.now())")
|
||||||
pprintln(Dict(responsedict))
|
pprintln(Dict(responsedict))
|
||||||
|
|
||||||
return responsedict[:score]
|
return responsedict[:score]
|
||||||
@@ -996,7 +996,7 @@ function query(query::T, executeSQL::Function, text2textInstructLLM::Function;
|
|||||||
|
|
||||||
root, _, resultState, highValueState =
|
root, _, resultState, highValueState =
|
||||||
LLMMCTS.runMCTS(initialstate, transition, transitionargs;
|
LLMMCTS.runMCTS(initialstate, transition, transitionargs;
|
||||||
horizontalSampleExpansionPhase=5,
|
horizontalSampleExpansionPhase=3,
|
||||||
horizontalSampleSimulationPhase=2,
|
horizontalSampleSimulationPhase=2,
|
||||||
maxSimulationDepth=5,
|
maxSimulationDepth=5,
|
||||||
maxiterations=1,
|
maxiterations=1,
|
||||||
@@ -1190,7 +1190,7 @@ function generatequestion(state::T1, context, text2textInstructLLM::Function;
|
|||||||
responsedict = GeneralUtils.textToDict(response, header;
|
responsedict = GeneralUtils.textToDict(response, header;
|
||||||
dictKey=dictkey, symbolkey=true)
|
dictKey=dictkey, symbolkey=true)
|
||||||
response = "Q1: " * responsedict[:q1]
|
response = "Q1: " * responsedict[:q1]
|
||||||
# println("\n~~~ SQLLLM generatequestion() ", @__FILE__, ":", @__LINE__, " $(Dates.now())")
|
# println("\nSQLLLM generatequestion() ", @__FILE__, ":", @__LINE__, " $(Dates.now())")
|
||||||
pprintln(Dict(responsedict))
|
pprintln(Dict(responsedict))
|
||||||
return response
|
return response
|
||||||
catch e
|
catch e
|
||||||
@@ -1198,7 +1198,7 @@ function generatequestion(state::T1, context, text2textInstructLLM::Function;
|
|||||||
showerror(io, e)
|
showerror(io, e)
|
||||||
errorMsg = String(take!(io))
|
errorMsg = String(take!(io))
|
||||||
st = sprint((io, v) -> show(io, "text/plain", v), stacktrace(catch_backtrace()))
|
st = sprint((io, v) -> show(io, "text/plain", v), stacktrace(catch_backtrace()))
|
||||||
println("\n~~~ SQLLLM generatequestion() Attempt $attempt. Error occurred: $errorMsg\n$st ", @__FILE__, ":", @__LINE__, " $(Dates.now())")
|
println("\nSQLLLM generatequestion() Attempt $attempt. Error occurred: $errorMsg\n$st ", @__FILE__, ":", @__LINE__, " $(Dates.now())")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
error("generatequestion failed to generate a thought ", response)
|
error("generatequestion failed to generate a thought ", response)
|
||||||
|
|||||||
Reference in New Issue
Block a user