Browse Source

update config loader

tags/v0.1.0
xuyige 6 years ago
parent
commit
7fb2bcc78c
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      fastNLP/loader/config_loader.py

+ 2
- 2
fastNLP/loader/config_loader.py View File

@@ -9,7 +9,7 @@ class ConfigLoader(BaseLoader):
"""loader for configuration files""" """loader for configuration files"""


def __int__(self, data_name, data_path): def __int__(self, data_name, data_path):
super(ConfigLoader, self).__init__(data_name, data_path)
super(ConfigLoader, self).__init__(data_path)
self.config = self.parse(super(ConfigLoader, self).load()) self.config = self.parse(super(ConfigLoader, self).load())


@staticmethod @staticmethod
@@ -100,7 +100,7 @@ class ConfigSection(object):




if __name__ == "__main__": if __name__ == "__main__":
config = ConfigLoader('configLoader', 'there is no data')
config = ConfigLoader('there is no data')


section = {'General': ConfigSection(), 'My': ConfigSection(), 'A': ConfigSection()} section = {'General': ConfigSection(), 'My': ConfigSection(), 'A': ConfigSection()}
""" """


Loading…
Cancel
Save