-
Notifications
You must be signed in to change notification settings - Fork 24
/
setup.py
139 lines (127 loc) · 3.31 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
import os
import sys
from setuptools import find_packages, setup
from setuptools.command.develop import develop
from setuptools.command.egg_info import egg_info
from setuptools.command.install import install
# Histolab has a dependency that requires options
histolab_dep_commands = [
sys.executable, # the python interpreter (needed to install in the right pipenv)
"-m",
"pip",
"install",
"large-image-source-openslide",
"--find-links",
"https://girder.github.io/large_image_wheels",
]
class CustomInstallCommand(install):
def run(self):
install.run(self)
os.system(" ".join(histolab_dep_commands))
class CustomDevelopCommand(develop):
def run(self):
develop.run(self)
os.system(" ".join(histolab_dep_commands))
class CustomEggInfoCommand(egg_info):
def run(self):
egg_info.run(self)
os.system(" ".join(histolab_dep_commands))
# datasets has a dependency that requires options
camelyon16 = [
"google-api-python-client",
"google-auth-httplib2",
"google-auth-oauthlib",
"histolab",
"openslide-python",
"requests",
"transformers",
]
heart = ["wget"]
isic2019 = ["albumentations", "efficientnet-pytorch", "requests", "wget"]
ixi = ["monai", "nibabel"]
kits19 = ["batchgenerators", "nibabel==3.2.2", "nnunet==1.7.0"]
lidc = [
"dask",
"dicom-numpy",
"networkx",
"nibabel==3.2.2",
"pydicom",
"scipy",
"scikit-image",
]
tcga = ["lifelines"]
docs = [
"albumentations",
"batchgenerators",
"dask",
"dicom-numpy",
"efficientnet-pytorch",
"google-api-python-client",
"google-auth-httplib2",
"google-auth-oauthlib",
"histolab",
"lifelines",
"matplotlib",
"monai==1.2.0",
"nnunet==1.7.0",
"pydicom",
"requests",
"scipy",
"sphinx",
"sphinx-rtd-theme",
]
tests = ["albumentations", "pytest"]
all_extra = camelyon16 + heart + isic2019 + ixi + kits19 + lidc + tcga + docs + tests
with open("README.md", "r", encoding="utf-8") as fh:
long_description = fh.read()
setup(
name="flamby",
version="0.0.1",
python_requires=">=3.8.0",
license="MIT",
classifiers=[
"Topic :: Scientific/Engineering :: Artificial Intelligence",
"Intended Audience :: Science/Research",
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
],
install_requires=[
"argparse",
"numpy",
"pandas",
"pre-commit",
"scikit-learn",
"scipy",
"seaborn",
"setuptools>=65.5.1",
"tensorboard",
"torch>=1.13.1",
"torchvision",
"tqdm",
"umap-learn",
"opacus",
],
extras_require={
"cam16": camelyon16,
"heart": heart,
"isic2019": isic2019,
"ixi": ixi,
"kits19": kits19,
"lidc": lidc,
"tcga": tcga,
"all_extra": all_extra,
"docs": docs,
"tests": tests,
},
description="FLamby: A cross-silo Federated Learning Benchmark.",
long_description=long_description,
author="FL-datasets team",
author_email="unknown",
packages=find_packages(),
include_package_data=True,
cmdclass={
"install": CustomInstallCommand,
"develop": CustomDevelopCommand,
"egg_info": CustomEggInfoCommand,
},
)