Giter Site home page Giter Site logo

fetchai / colearn Goto Github PK

View Code? Open in Web Editor NEW
37.0 21.0 13.0 38.88 MB

Colearn is a collection of protocols for running multi-stakeholder machine learning that preserve data privacy

License: Other

Python 99.57% Shell 0.26% Dockerfile 0.17%
machine-learning deep-learning python blockchain priv

colearn's People

Contributors

dependabot[bot] avatar dominic22 avatar ejfitzgerald avatar evsmithx avatar hanwag avatar juanbesa avatar lrahmani avatar missingno57 avatar n-hutton avatar patbaa avatar qati avatar vijaysharma815 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

colearn's Issues

Installation with pip fails

Installation fails with pip with the following error

(C:\Users\Karthik\colearn) C:\Users\Karthik\Desktop\Base\colearn>pip install colearn[pytorch]
Collecting colearn[pytorch]
Using cached colearn-0.2.6-py3-none-any.whl (113 kB)
Collecting pydantic~=1.7.0
Using cached pydantic-1.7.4-cp37-cp37m-win_amd64.whl (1.7 MB)
Collecting matplotlib~=3.3.0
Using cached matplotlib-3.3.4-cp37-cp37m-win_amd64.whl (8.5 MB)
Collecting numpy~=1.16.0
Using cached numpy-1.16.6-cp37-cp37m-win_amd64.whl (11.9 MB)
Collecting google-cloud-storage~=1.35.0
Using cached google_cloud_storage-1.35.1-py2.py3-none-any.whl (96 kB)
Collecting torch~=1.7.0; extra == "pytorch"
Using cached torch-1.7.1-cp37-cp37m-win_amd64.whl (184.1 MB)
Collecting opacus~=0.10.0; extra == "pytorch"
Using cached opacus-0.10.1-py3-none-any.whl (84 kB)
Collecting scikit-learn~=0.23.0; extra == "pytorch"
Using cached scikit_learn-0.23.2-cp37-cp37m-win_amd64.whl (6.8 MB)
Collecting Pillow~=8.0.1; extra == "pytorch"
Using cached Pillow-8.0.1-cp37-cp37m-win_amd64.whl (2.1 MB)
Collecting scipy~=1.5.0; extra == "pytorch"
Using cached scipy-1.5.4-cp37-cp37m-win_amd64.whl (31.2 MB)
ERROR: Could not find a version that satisfies the requirement torchvision~=0.8.0; extra == "pytorch" (from colearn[pytorch]) (from versions: 0.1.6, 0.1.7, 0.1.8, 0.1.9, 0.2.0, 0.2.1, 0.2.2, 0.2.2.post2, 0.2.2.post3, 0.3.0, 0.4.1, 0.5.0, 0.9.0,0.9.1, 0.10.0)
ERROR: No matching distribution found for torchvision~=0.8.0; extra == "pytorch" (from colearn[pytorch])

Steps to reproduce the behavior:

  1. pip install colearn[pytorch]
  • OS:Windows
  • Version [e.g. 22]

Was able to resolve this by cloning the repo, updating the setup.py to look for torchvision 0.9.0 instead of 0.8.0 and finally installed via local pip install.

Just running through a few issues

  1. I had some installation problems - do we have a docker version of this?
  2. tox is suggested for the tests but is not included in the requirements or Pipfile.
  3. For the website docs, would be hand to have the "pull this repo" link at the start of the instructions to save a bit of searching.

Class ColearnPlot from utils.plot.py produces empty plots

Hi everyone,

I was running the examples (Keras Mnist & random forest Iris).
In the collective elarning sections in the end, the plot class is being initialized.
in plot.plot_x (x in [votes/results]) it should produce a plot, but it does not.

Code snippet:

###### # Do collective learning
results = Results()
results.data.append(initial_result(all_learner_models))  # Get initial score

plot = ColearnPlot(score_name="accuracy")

for round_index in range(n_rounds):
    results.data.append(
        collective_learning_round(all_learner_models,
                                  vote_threshold, round_index)
    )
    print_results(results)

    # then make an updating graph
    plot.plot_results(results,True)
    plot.plot_votes(results,True)

plot.plot_results(results,block=True)
plot.plot_votes(results, block=True)

print("Colearn Example Finished!")

The output is:

Doing collective learning round
--------------- LATEST ROUND RESULTS -------------
Selected proposer: 0
New model accepted: True

learner id vote test score vote score
0 True 1.000 1.000
1 True 1.000 0.846
2 True 1.000 1.000
3 True 1.000 1.000
4 True 1.000 0.923
5 True 1.000 0.846
6 True 1.000 1.000
7 True 1.000 1.000
8 True 1.000 1.000
9 True 1.000 0.846

image

Figure size 432x288 with 0 Axes
Doing collective learning round
--------------- LATEST ROUND RESULTS -------------
...

Yet, the class seems to have axes set:
image

Is this a known issue? And thank you in advance for your support!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.