Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
chenpangpang
transformers
Commits
a305067f
Commit
a305067f
authored
Dec 19, 2019
by
Morgan Funtowicz
Browse files
Removed __main__
parent
3492a6ec
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
41 deletions
+0
-41
setup.py
setup.py
+0
-5
transformers/__main__.py
transformers/__main__.py
+0
-36
No files found.
setup.py
View file @
a305067f
...
...
@@ -68,11 +68,6 @@ setup(
scripts
=
[
'transformers-cli'
],
entry_points
=
{
'console_scripts'
:
[
"transformers=transformers.__main__:main"
,
]
},
# python_requires='>=3.5.0',
classifiers
=
[
'Intended Audience :: Science/Research'
,
...
...
transformers/__main__.py
deleted
100644 → 0
View file @
3492a6ec
# 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 <command> [<args>]')
# 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
()
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment