-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.py
46 lines (42 loc) · 1.47 KB
/
setup.py
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
import re
from setuptools import setup, find_packages
# Read the long description from the README file
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
def find_version():
with open("torchctr/__init__.py", "r", encoding="utf-8") as rf:
version_file = rf.read()
version_match = re.search(r"^__version__ = ['\"]([^'\"]*)['\"]", version_file, re.M)
if version_match:
return version_match.group(1)
raise RuntimeError("Unable to find version string.")
with open("requirements.txt", "r", encoding="utf-8") as rf:
requirements = [line.strip() for line in rf.readlines()]
setup(
name='torchctr',
version=find_version(),
author='zuoxin.xiahou',
author_email='xiahouzuoxin@163.com',
description='A small pytorch implementation for ctr prediction in recommendation system for small companies',
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/xiahouzuoxin/torchctr",
packages=find_packages(),
install_requires=requirements,
extras_require={
'all': [
'accelerate>=1.2.1',
'scikit-learn>=1.5.1',
'tensorboard',
'uvicorn',
'fastapi',
'pydantic'
]
},
python_requires='>=3.10',
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
)