# Copyright (c) Facebook, Inc. and its affiliates.## This source code is licensed under the MIT license found in the# LICENSE file in the root directory of this source tree.importimportlibimportos# automatically import any Python files in the models/ directorymodels_dir=os.path.dirname(__file__)forfileinos.listdir(models_dir):path=os.path.join(models_dir,file)if(notfile.startswith("_")andnotfile.startswith(".")and(file.endswith(".py")oros.path.isdir(path))):model_name=file[:file.find(".py")]iffile.endswith(".py")elsefilemodule=importlib.import_module("fairseq.model_parallel.models."+model_name)