914ae53593ff330e2bcaa19690f126c8287600c9,snips_nlu/pipeline/processing_unit.py,ProcessingUnit,persist_metadata,#ProcessingUnit#Any#,30
Before Change
def persist_metadata(self, path, **kwargs):
metadata = {"unit_name": self.unit_name}
metadata.update(kwargs)
metadata_json = bytes(json.dumps(metadata), encoding="utf8")
with (path / "metadata.json").open(mode="w") as f:
f.write(metadata_json.decode("utf8"))
@classproperty
def unit_name(cls): // pylint:disable=no-self-argument
After Change
def persist_metadata(self, path, **kwargs):
metadata = {"unit_name": self.unit_name}
metadata.update(kwargs)
metadata_json = json_string(metadata)
with (path / "metadata.json").open(mode="w") as f:
f.write(metadata_json)
@classproperty
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: snipsco/snips-nlu
Commit Name: 914ae53593ff330e2bcaa19690f126c8287600c9
Time: 2018-07-16
Author: adrien.ball@snips.ai
File Name: snips_nlu/pipeline/processing_unit.py
Class Name: ProcessingUnit
Method Name: persist_metadata
Project Name: snipsco/snips-nlu
Commit Name: 914ae53593ff330e2bcaa19690f126c8287600c9
Time: 2018-07-16
Author: adrien.ball@snips.ai
File Name: snips_nlu/nlu_engine/nlu_engine.py
Class Name: SnipsNLUEngine
Method Name: persist
Project Name: snipsco/snips-nlu
Commit Name: 914ae53593ff330e2bcaa19690f126c8287600c9
Time: 2018-07-16
Author: adrien.ball@snips.ai
File Name: snips_nlu/intent_parser/probabilistic_intent_parser.py
Class Name: ProbabilisticIntentParser
Method Name: persist
Project Name: snipsco/snips-nlu
Commit Name: 914ae53593ff330e2bcaa19690f126c8287600c9
Time: 2018-07-16
Author: adrien.ball@snips.ai
File Name: snips_nlu/tests/utils.py
Class Name: SnipsTest
Method Name: writeJsonContent