Update commits_ft.py
Browse files306 unmodified lines307308309310311312313314315316317318319320321322323324325326327328329330331310311334335336337338339340341342343344345346347312313314315350351352353354316317318306 unmodified linesVERSION = datasets.Version("1.1.0")
class CommitConfig(datasets.BuilderConfig): """BuilderConfig for SuperGLUE."""
def __init__(self, features, data_url, **kwargs): """BuilderConfig for SuperGLUE.
Args: features: *list[string]*, list of the features that will appear in the feature dict. Should not include "label". data_url: *string*, url to download the zip file from. citation: *string*, citation for the data set. url: *string*, url for information about the data set. label_classes: *list[string]*, the list of classes for the label if the label is present as a string. Non-string labels will be cast to either 'False' or 'True'. **kwargs: keyword arguments forwarded to super. """ super().__init__(version=VERSION, **kwargs) self.features = features self.data_url = data_url
class CommitIT(datasets.GeneratorBasedBuilder): BUILDER_CONFIGS = [ CommitConfig(name=lang, description="This part of dataset covers {lang} language".format(lang=lang), features=['commit', 'old_file', 'new_file', 'old_contents', 'new_contents', 'subject', 'message', 'lang', 'license', 'repos'], data_url=_URLS[lang] ) datasets.BuilderConfig(name=lang, version=VERSION, description="This part of dataset covers {lang} language".format(lang=lang)) for lang in languages ] # BUILDER_CONFIGS = [ # datasets.BuilderConfig(name=lang, version=VERSION, # description="This part of dataset covers {lang} language".format(lang=lang)) # for lang in languages # ]
DEFAULT_CONFIG_NAME = "python"
commits_ft.py+2-41