Skip to content

Commit

Permalink
Update BaseConfig.get_configuration_file docstring to match transformers
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelbenayoun committed Sep 16, 2022
1 parent f03bb56 commit e898407
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions optimum/configuration_utils.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# coding=utf-8
# Copyright 2021 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -95,8 +96,10 @@ def save_pretrained(self, save_directory: Union[str, os.PathLike], push_to_hub:
def get_configuration_file(cls, configuration_files: List[str]) -> str:
"""
Get the configuration file to use for this version of transformers.
Args:
configuration_files (`List[str]`): The list of available configuration files.
Returns:
`str`: The configuration file to use.
"""
Expand All @@ -109,6 +112,7 @@ def get_configuration_file(cls, configuration_files: List[str]) -> str:
configuration_files_map[v] = file_name
available_versions = sorted(configuration_files_map.keys())

# Defaults to FULL_CONFIGURATION_FILE and then try to look at some newer versions.
configuration_file = cls.CONFIG_NAME
optimum_version = version.parse(__version__)
for v in available_versions:
Expand Down

0 comments on commit e898407

Please sign in to comment.