diff --git a/src/transformers/__main__.py b/src/transformers/__main__.py deleted file mode 100644 index 3cabdd4fff8..00000000000 --- a/src/transformers/__main__.py +++ /dev/null @@ -1,42 +0,0 @@ -# coding: utf8 - - -def main(): - import sys - - if len(sys.argv) < 2 or sys.argv[1] not in ["convert", "train", "predict", "serve"]: - print( - "First argument to `transformers` command line interface should be one of: \n" - ">> convert serve train predict" - ) - if sys.argv[1] == "convert": - from transformers.commands import convert - - convert(sys.argv) - elif sys.argv[1] == "train": - from transformers.commands import train - - train(sys.argv) - elif sys.argv[1] == "serve": - pass - # from argparse import ArgumentParser - # from transformers.commands.serving import ServeCommand - # parser = ArgumentParser('Transformers CLI tool', usage='transformers serve []') - # commands_parser = parser.add_subparsers(help='transformers-cli command helpers') - - # # Register commands - # ServeCommand.register_subcommand(commands_parser) - - # # Let's go - # args = parser.parse_args() - - # if not hasattr(args, 'func'): - # parser.print_help() - # exit(1) - # # Run - # service = args.func(args) - # service.run() - - -if __name__ == "__main__": - main() diff --git a/templates/adding_a_new_model/README.md b/templates/adding_a_new_model/README.md index b546555bd6e..5397ca4c789 100644 --- a/templates/adding_a_new_model/README.md +++ b/templates/adding_a_new_model/README.md @@ -56,7 +56,7 @@ You can then finish the addition step by adding imports for your classes in the - [ ] add your PyTorch and TF 2.0 model respectively in `modeling_auto.py` and `modeling_tf_auto.py` - [ ] add your tokenizer in `tokenization_auto.py` - [ ] add your models and tokenizer to `pipeline.py` -- [ ] add a link to your conversion script in the main conversion utility (currently in `__main__` but will be moved to the `commands` subfolder in the near future) +- [ ] add a link to your conversion script in the main conversion utility (in `commands/convert.py`) - [ ] edit the PyTorch to TF 2.0 conversion script to add your model in the `convert_pytorch_checkpoint_to_tf2.py` file - [ ] add a mention of your model in the doc: `README.md` and the documentation itself at `docs/source/pretrained_models.rst`. - [ ] upload the pretrained weigths, configurations and vocabulary files.