Skip to content

Commit

Permalink
revert changes
Browse files Browse the repository at this point in the history
validate training data only when training
  • Loading branch information
wochinge committed Jan 31, 2019
1 parent 8e16ad1 commit 1b44a05
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
3 changes: 1 addition & 2 deletions rasa_nlu/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -714,8 +714,7 @@ def run_evaluation(data_path, model,
else:
interpreter = Interpreter.load(model, component_builder)
test_data = training_data.load_data(data_path,
interpreter.model_metadata.language,
validate=False)
interpreter.model_metadata.language)
extractors = get_entity_extractors(interpreter)
entity_predictions, tokens = get_entity_predictions(interpreter,
test_data)
Expand Down
2 changes: 2 additions & 0 deletions rasa_nlu/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,8 @@ def train(self, data: TrainingData, **kwargs: Any)-> 'Interpreter':

self.training_data = data

self.training_data.validate()

context = kwargs

for component in self.pipeline:
Expand Down
6 changes: 1 addition & 5 deletions rasa_nlu/training_data/loading.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@


def load_data(resource_name: Text,
language: Optional[Text] = 'en',
validate: bool = True) -> 'TrainingData':
language: Optional[Text] = 'en') -> 'TrainingData':
"""Load training data from disk.
Merges them if loaded from disk and multiple files are found."""
Expand All @@ -58,8 +57,6 @@ def load_data(resource_name: Text,
else:
training_data = data_sets[0].merge(*data_sets[1:])

if validate:
training_data.validate()
return training_data


Expand All @@ -75,7 +72,6 @@ def load_data_from_endpoint(data_endpoint: EndpointConfig,
temp_data_file = utils.create_temporary_file(response.content,
mode="w+b")
training_data = _load(temp_data_file, language)
training_data.validate()

return training_data
except Exception as e:
Expand Down

0 comments on commit 1b44a05

Please sign in to comment.