forked from NaiboWang/CommandlineConfig
-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.py
36 lines (32 loc) · 1.11 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
from commandline_config import Config
import setuptools
with open("README.md", "r", encoding='UTF-8') as fh:
long_description = fh.read()
setuptools.setup(
name="commandline_config",
version="2.2.3",
author="Naibo Wang",
author_email="[email protected]",
description="A library for users to write (experiment in research) configurations in Python Dict or JSON format, while can read parameters from the command line",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/NaiboWang/CommandlineConfig",
packages=setuptools.find_packages(),
install_requires=['prettytable'],
classifiers=[
"Programming Language :: Python :: 3",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
],
)
preset_config = {
"index": 1, # Index of party
"dataset": "mnist",
'lr': 0.01, # learning rate
'normalization': True,
"multi-information": [1, 0.5, 'test', "TEST"]
}
config = Config(preset_config)
print(config)
print(config.dataset, config["index"])
config.index = 15