FAQ : DeLi-CoCo
How do I run the Code?
A. Install our package:
pip3 install decopt
(A.1) Often get the latest update:
pip3 install decopt --upgrade
B. Get Data:
sh pull_data.sh breast_cancer
c. Run script with default parameters:
python3 driver.py
With different parameters:
python3 driver.py --d 'mnist' --n_cores 10 --algorithms 'ours'
Parameter Options:
parser.add_argument('--d', type=str, default='breast_cancer',
help='Pass data-set')
parser.add_argument('--task', type=str, default='log_reg', help='Choose task')
parser.add_argument('--r', type=str, default=os.path.join(curr_dir, './data/'),
help='Pass data root')
parser.add_argument('--stochastic', type=bool, default=False)
parser.add_argument('--algorithm', type=str, default='ours')
parser.add_argument('--n_cores', type=int, default=9)
parser.add_argument('--topology', type=str, default='ring')
parser.add_argument('--Q', type=int, default=2)
parser.add_argument('--consensus_lr', type=float, default=0.3)
parser.add_argument('--quantization_function', type=str, default='full')
parser.add_argument('--num_bits', type=int, default=2)
parser.add_argument('--fraction_coordinates', type=float, default=0.1)
parser.add_argument('--dropout_p', type=float, default=0.1)
parser.add_argument('--epochs', type=int, default=10)
parser.add_argument('--lr_type', type=str, default='constant')
parser.add_argument('--initial_lr', type=float, default=0.01)
parser.add_argument('--epoch_decay_lr', type=float, default=0.9)
parser.add_argument('--regularizer', type=float, default=0)
parser.add_argument('--estimate', type=str, default='final')
parser.add_argument('--n_proc', type=int, default=3, help='no of parallel processors for Multi-proc')
parser.add_argument('--n_repeat', type=int, default=3, help='no of times repeat exp with diff seed')
* Note: SYN1, SYN2 are synthetically generated data.
So make sure you set gen=False after generating them for the first time.
Please refer to line 20, 23 of data_reader.py
Supported argument values
--d : 'breast_cancer' || 'mnist' || 'syn1' || 'syn2'
--task : 'log_reg' || 'lin_reg' || 'nlin_reg'
'log_reg' = Logistic Regression,
'lin_reg' = Linear Regression,
'nlin_reg' = Nonlinear Regression
--topology : 'ring' || 'torus' || 'fully_connected' || 'disconnected'
--quantization_function : 'full' || 'top' || 'rand' || 'qsgd'
How do I reproduce the plots in the paper?
Check plots.py
Ex. MNIST
It has clearly marked code to run Fig1, Fig2, Fig3 for mnist
Where are the results stored ?
Ex. For MNIST
The results of mnist experiments are stored in results/mnist_partial.
There are 3 folders, Q means experiments with Q, C is Compression, T is Topology.
The results and parameters are stored as pickle file
and can be readily consumed by plots.py
How do I reproduce the results ?
Ex. MNIST
For all experiments since the parameters are stored in the results folder. (See above FAQ)
please run driver.py with these parameters to produce results.
The results will automatically be stored in pickle files in appropriately
marked folders along with corresponding parameters.
Metadata
Release files for decopt 2.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| decopt-2.1.8.tar.gz | 10.6 kB | Without provenance | Details for decopt-2.1.8.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| decopt-2.1.8-py3-none-any.whl | Python 3 | none | any | Details for decopt-2.1.8-py3-none-any.whl |
Total release size: 24.5 kB
Release files / decopt-2.1.8.tar.gz
| Download URL | decopt-2.1.8.tar.gz |
|---|---|
| Size | 10.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2211623140366d09f203f30e47b1bd2e2d2cfda72779160aa04e8c0f3179cf94
|
|
BLAKE2b-256 checksum How to use checksums |
64ba00b9a1d3943fe2b2c4cb8c05fe1052b6edcd8914fbf0eea360f1e10f2416
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.4
|
Release files / decopt-2.1.8-py3-none-any.whl
| Download URL | decopt-2.1.8-py3-none-any.whl |
|---|---|
| Size | 13.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f7ad30280b20581560f84a365ea9aaf8144197e2561492bad018e4ef32cd018b
|
|
BLAKE2b-256 checksum How to use checksums |
88fb8cae4c1bc3f1377d00e98db65e1f0bc50938096392959d3b51a6e4a18cc6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.37.0 CPython/3.7.4
|
Security for decopt 2.1.8
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.