Skip to content
Merged
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
8 changes: 7 additions & 1 deletion src/forge/actors/policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,12 @@ def from_dict(cls, d: Mapping):
valid_args = {k: v for k, v in d.items() if k in all_fields}
return cls(**valid_args)

def asdict(self):
# Use the full object instead of a Dict
ret = asdict(self)
ret["guided_decoding"] = self.guided_decoding
return ret


@dataclass
class EngineConfig(EngineArgs):
Expand Down Expand Up @@ -254,7 +260,7 @@ async def setup(self):

# Setup sampling params
self.sampling_params = get_default_sampling_params(
self.vllm_config, overrides=asdict(self.sampling_config)
self.vllm_config, overrides=self.sampling_config.asdict()
)

# Setup processors
Expand Down
Loading