Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

setup.py 1.4 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
  1. #!/usr/bin/env python3
  2. # Copyright (c) 2017-present, Facebook, Inc.
  3. # All rights reserved.
  4. #
  5. # This source code is licensed under the license found in the LICENSE file in
  6. # the root directory of this source tree. An additional grant of patent rights
  7. # can be found in the PATENTS file in the same directory.
  8. from setuptools import setup, find_packages, Extension
  9. import sys
  10. if sys.version_info < (3,):
  11. sys.exit('Sorry, Python3 is required for fairseq.')
  12. with open('README.md') as f:
  13. readme = f.read()
  14. with open('LICENSE') as f:
  15. license = f.read()
  16. with open('requirements.txt') as f:
  17. reqs = f.read()
  18. bleu = Extension(
  19. 'fairseq.libbleu',
  20. sources=[
  21. 'fairseq/clib/libbleu/libbleu.cpp',
  22. 'fairseq/clib/libbleu/module.cpp',
  23. ],
  24. extra_compile_args=['-std=c++11'],
  25. )
  26. setup(
  27. name='fairseq',
  28. version='0.6.0',
  29. description='Facebook AI Research Sequence-to-Sequence Toolkit',
  30. long_description=readme,
  31. license=license,
  32. install_requires=reqs.strip().split('\n'),
  33. packages=find_packages(),
  34. ext_modules=[bleu],
  35. test_suite='tests',
  36. entry_points={
  37. 'console_scripts': [
  38. 'fairseq-eval-lm = eval_lm:cli_main',
  39. 'fairseq-generate = generate:cli_main',
  40. 'fairseq-interactive = interactive:cli_main',
  41. 'fairseq-preprocess = preprocess:cli_main',
  42. 'fairseq-train = train:cli_main',
  43. 'fairseq-score = score:main',
  44. ],
  45. },
  46. )
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...