From 65f6880c6fb2b2be395e0c30a337d67facae8fd5 Mon Sep 17 00:00:00 2001 From: Connor Shorten Date: Wed, 26 Nov 2025 19:26:58 -0500 Subject: [PATCH] Fix init to accept kwargs --- hello.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/hello.py b/hello.py index 3150ae3..5ee229b 100644 --- a/hello.py +++ b/hello.py @@ -9,20 +9,18 @@ class EchoConfig(PrecompiledConfig): class EchoAgent(PrecompiledAgent): config: EchoConfig - def __init__(self, config: EchoConfig): - super().__init__(config) + def __init__(self, config: EchoConfig, **kwargs): # <-- Add **kwargs + super().__init__(config, **kwargs) # <-- Pass them through def forward(self, text: str) -> str: return f"Echo: {text}" -# This block only runs when you execute the script directly, -# NOT when modaic imports the module if __name__ == "__main__": agent = EchoAgent(EchoConfig()) print(agent(text="hello")) agent.push_to_hub( "connor/CrossEncoderRanker", with_code=True, - commit_message="My first commit" + commit_message="Fix init to accept kwargs" ) \ No newline at end of file