Skip to content
This repository was archived by the owner on Jun 17, 2024. It is now read-only.

Commit 593a9d6

Browse files
committed
format
Signed-off-by: Kosaku Kimura <kimura.kosaku@fujitsu.com>
1 parent 8f1b331 commit 593a9d6

File tree

1 file changed

+4
-24
lines changed

1 file changed

+4
-24
lines changed

sapientml_preprocess/generator.py

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -271,30 +271,10 @@ def generate_code(self, dataset: Dataset, task: Task) -> Tuple[Dataset, Code]:
271271
df = df.drop(col, axis=1)
272272
if cols_numeric_and_string:
273273
tpl = template_env.get_template("handle_mixed_typed_columns.py.jinja")
274-
code.validation += _render(
275-
tpl,
276-
training=True,
277-
test=True,
278-
cols_numeric_and_string=cols_numeric_and_string
279-
)
280-
code.test += _render(
281-
tpl,
282-
training=True,
283-
test=True,
284-
cols_numeric_and_string=cols_numeric_and_string
285-
)
286-
code.train += _render(
287-
tpl,
288-
training=True,
289-
test=False,
290-
cols_numeric_and_string=cols_numeric_and_string
291-
)
292-
code.predict += _render(
293-
tpl,
294-
training=False,
295-
test=True,
296-
cols_numeric_and_string=cols_numeric_and_string
297-
)
274+
code.validation += _render(tpl, training=True, test=True, cols_numeric_and_string=cols_numeric_and_string)
275+
code.test += _render(tpl, training=True, test=True, cols_numeric_and_string=cols_numeric_and_string)
276+
code.train += _render(tpl, training=True, test=False, cols_numeric_and_string=cols_numeric_and_string)
277+
code.predict += _render(tpl, training=False, test=True, cols_numeric_and_string=cols_numeric_and_string)
298278

299279
# meta features must be calculated after replacing inf with nan,
300280
# becuase the replaced nan must be preprocessed in the generated code.

0 commit comments

Comments
 (0)