@@ -91,12 +91,10 @@ def batch(self, dataset_path: str, output_dir: str) -> None:
91
91
raise ValueError (f"Unsupported dataset format: { dataset_path } " )
92
92
93
93
# Call the model's run_batch method, passing in the DataFrame
94
- output_df , config = self .run_batch_from_df (df , custom_args = self . custom_args )
94
+ output_df , config = self .run_batch_from_df (df )
95
95
self .write_output_to_directory (output_df , config , output_dir , fmt )
96
96
97
- def run_batch_from_df (
98
- self , df : pd .DataFrame , custom_args : dict = None
99
- ) -> Tuple [pd .DataFrame , dict ]:
97
+ def run_batch_from_df (self , df : pd .DataFrame ) -> Tuple [pd .DataFrame , dict ]:
100
98
"""Function that runs the model and returns the result."""
101
99
# Ensure the 'output' column exists
102
100
if "output" not in df .columns :
@@ -105,10 +103,6 @@ def run_batch_from_df(
105
103
# Get the signature of the 'run' method
106
104
run_signature = inspect .signature (self .run )
107
105
108
- # If the model has a custom_args attribute, update it
109
- if hasattr (self , "custom_args" ) and custom_args is not None :
110
- self .custom_args .update (custom_args )
111
-
112
106
for index , row in df .iterrows ():
113
107
# Filter row_dict to only include keys that are valid parameters
114
108
# for the 'run' method
0 commit comments