Closed rusheb closed 2 days ago
The input for a fork()
subtask is just the current task state (inputs to solver that are passed to it aren't plucked out and treated as "inputs"). I think the right solution here may be to teach the viewer about the fork()
variety of subtask and have it provide special UI treatment for that.
That makes sense. Thanks for the clarification!
Resolved with https://github.com/UKGovernmentBEIS/inspect_ai/pull/499
Thank you. Note that for my current use-case it's quite key to see the arguments to the outer solver of the fork, because it tells us which scenario is being run. E.g. we might do something like the following
@solver
def run_scenarios() -> Solver
async def solve(state, generate):
oversight_result, non_oversight_result = await fork(state, [
run_scenario("oversight"),
run_scenario("non_oversight")
])
return solve
@solver
def run_scenario(name: str):
async def solve(state, generate):
...
return solve
and so we really want to see in the viewer whether we are looking at the "oversight" or "non_oversight" scenario.
But from your previous message and implementation it seems incorrect to think of these as inputs? Perhaps in this case it just makes more sense to use subtask
directly rather than using fork? But then it's slightly inconvenient as I end up basically forking the state object manually.
Interesting, that does make sense! I think we could indeed probably capture the solver input params here. Will take a look later today!
Resolved with https://github.com/UKGovernmentBEIS/inspect_ai/pull/510
Reproducing example
Actual behaviour
Looking at the following screenshot:
SUBTAASK: MYSUBTASK
node showsINPUT: id=my_subtask
SUBTASK: FORK_SOLVER_CHILD
node showsINPUT
with no valuesExpected behaviour
I'd expect the
SUBTASK: FORK_SOLVER_CHILD
node to showINPUT id="my_fork_child"
Notes
output