Code Monkey home page Code Monkey logo

hyperparam-search's Introduction

A benchmark for random search implementations


In this work, a colleague and I performed a benchmark between MPI4Py and PySpark for a hyperparameter search method known as Random Search. We applied the Scikit-learn implementation as a baseline. Experimental results show that MPI implementation for random search during the training phase of 1000 regression models was almost 3x faster than Spark.

disclaimer: This work provides only an initial analysis. For fair comparison, these experiments should also be performed for big data and more complex machine learning models.

Docker Build: building the image with MPI and Spark

$ docker build -t hsearch .

Docker Run: container execution

$ docker run --rm -d -p 8888:8888 --name=random-hsearch hsearch

Docker Exec: using to the container terminal to execute .py scripts

$ docker exec -it random-hsearch /bin/bash

Execution of .py scripts

$ cd hyperparam-search

Scripts that execute the Random Search method for the problem of optimizing hyperparameters in parallel.

$ python app_sklearn.py

$ python app_mpi.py

$ python app_spark.py

Script to benchmark the implementations above. When running python benchmark.py by default the script will perform 10 iterations for each framework, defining a seed to generate the same random numbers, and thus ensure reproducible results. To change the number of runs and generate different hyperparameters for each run (variability in results), run the script as indicated below.

$ python benchmark.py -i 2 -s none

$ exit

Docker Conteiner Stop: stopping and removing the container

$ docker container stop random-hsearch

hyperparam-search's People

Contributors

rafaela00castro avatar rapguit avatar

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.