semvec/pypi-packages huggingface dataset:
pytorch-distbelief 0.1.0
Distributed training for pytorch

# distbelief
Implementing Google's DistBelief paper.

## Installation/Development instructions

You'll want to create a python3 virtualenv first by running `make setup`, after which, you should run `make install`. 

You'll then be able to use distbelief by importing distbelief
```python 

from distbelief.optim import DownpourSGD

optimizer = DownpourSGD(net.parameters(), lr=0.1, n_push=5, n_pull=5, model=net)

```

As an example, you can see our implementation running by using the script provided in `example/main.py`.

To run a 2-training node setup locally, open up three terminal windows, source the `venv` and then run `make first`, `make second`, and `make server`.
This will begin training AlexNet on CIFAR10 locally with all default params.

## Benchmarking

**NOTE:** we graph the train/test accuracy of each node, hence node1, node2, node3. A better comparison would be to evaluate the parameter server's params and use that value.
However we can see that the accuracy between the three nodes is fairly consistent, and adding an evaluator might put too much stress on our server. 

We scale the learning rate of the nodes to be learning_rate/freq (.03) .

![train](/docs/train_time.png)

![test](/docs/test_time.png)

We used AWS c4.xlarge instances to compare the CPU runs, and a GTX 1060 for the GPU run.

## DownpourSGD for PyTorch

### Diagram

<img src="./docs/diagram.jpg" width="500">

Here **2** and **3** happen concurrently. 

You can read more about our implementation [here](https://jcaip.github.io/Distbelief/).

### References
- [Pytorch distributed tutorial](http://pytorch.org/tutorials/intermediate/dist_tuto.html)
- [Akka implementation of distbelief](http://alexminnaar.com/implementing-the-distbelief-deep-neural-network-training-framework-with-akka.html)
- [gevent actor tutorial](http://sdiehl.github.io/gevent-tutorial/#actors)
- [DistBelief paper](https://static.googleusercontent.com/media/research.google.com/en//archive/large_deep_networks_nips2012.pdf)
- [Analysis of delayed grad problem](https://openreview.net/pdf?id=BJLSGcywG)
kinda 0.9.9
A pythonic library for floating point number comparison
Keywords: floating point,comparison

# Kinda

## About

Kinda is a pythonic library for comparing floating point values with
[Python operator functions](https://docs.python.org/2/library/operator.html#mapping-operators-to-functions).

## Arguments

The implementation and documentation are identical to
[math.isclose](https://docs.python.org/3/library/math.html#number-theoretic-and-representation-functions).

## Comparisons

### Equality

```py
>>> import kinda
>>> # a == b
>>> kinda.eq(1.0000, 1.0000)
True
>>> # a != b (default precision)
>>> kinda.eq(0.9999, 1.0001)
False
```

### Precision

All `math.isclose()` arguments are accepted in all functions.

* `abs_tol`: absolute tolerance (`abs(a - b)`)
* `rel_tol`: percentage tolerance (1% = .01)

```py
>>> # reduce absolute precision
>>> kinda.eq(0.9999, 1.0001, abs_tol=0.0002)
True
>>> # precision: 1%
>>> kinda.eq(1.0000, 1.0500, rel_tol=0.01)
False
>>> # precision: 5%
>>> kinda.eq(1.0000, 1.0500, rel_tol=0.05)
True
```

### Inequality

```py
>>> import kinda
>>> [kinda.ne(0.9999, 1.0001), kinda.ne(1.0000, 1.0000)]
[True, False]
```

### Less/Greater Than

```py
>>> import kinda
>>> # [a < b, a > b]
>>> [kinda.lt(1.0000, 1.0001), kinda.gt(1.0001, 1.0000)]
[True, True]
```

### Less/Greater Than or Equal To

```py
>>> import kinda
>>> kinda.le(1.0000, 1.0001) and kinda.ge(1.0000, 1.0001)
[True, False]
>>> kinda.le(1.0000, 1.0000) and kinda.ge(1.0000, 1.0000)
[True, True]
>>> kinda.le(1.0000, 0.9999) and kinda.ge(1.0000, 0.9999)
[False, True]
```
pinnacle-nick 0.0.7
Pinnacle Nick API Python wrapper

# pinnacle
Python Wrapper for Pinnacle Sports API

[Pinnacle Documentation](https://www.pinnacle.com/en/api/manual)

# Installation

```
$ pip install pinnacle
```

# Usage

```python
>>> from pinnacle.apiclient import APIClient
>>> api = APIClient('username', 'password')
>>> sport_ids = api.reference_data.get_sports()
>>> tennis_events = api.market_data.get_fixtures(33)
```