-
-
Notifications
You must be signed in to change notification settings - Fork 418
Open
Labels
bugSomething isn't workingSomething isn't working
Description
I have written a custom input generator, similar to a PersonaSimulator. I used the WithGeneratorMixin to provide the LLM generator instance.
The issue is that this generator is reset to default value at runtime:
my_simulator = MySimulator(generator=Generator(model="my-model"))At runtime in the scenario, the simulator generator is reset to the default value from get_default_generator.
This happens because the instance is serialized and then deserialized at runtime, but the generator field is excluded from the serialized object. So it's lost.
Some questions:
- why is the input generator serialized and deserialized (can't we instead keep the same instance?)
- instead of serializing, shouldn't we use
model_copy() - do we really need to exclude the
generatorfield from the serialized version? It should be serializable
In my case, the only solution was to set the default generator so that it would be set to the right value every time, but this is not practicel.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working