Skip to content

Commit

Permalink
Bugfix for issue #56: removing just keys that exist in dataset when w…
Browse files Browse the repository at this point in the history
…hen replacing text feature names concatenating their level
  • Loading branch information
w4nderlust committed Feb 12, 2019
1 parent a290336 commit 1820ef5
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions ludwig/data/preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

import h5py
import numpy as np
import pandas as pd
import yaml

from ludwig.constants import *
Expand Down Expand Up @@ -771,8 +770,8 @@ def replace_text_feature_level(model_definition, datasets):
)
]
for level in ('word', 'char'):
del dataset[
'{}_{}'.format(
name_level = '{}_{}'.format(
feature['name'],
level)
]
if name_level in dataset:
del dataset[name_level]

0 comments on commit 1820ef5

Please sign in to comment.