Giter Site home page Giter Site logo

dac4rl's Introduction

DAC4RL

DAC4RL track of the DAC4AutoML competition at AutoML-Conf.

Getting Started

git clone [email protected]:automl/dac4automlcomp.git # when using SSH keys to clone
cd dac4automlcomp
pip install -e .
git clone [email protected]:automl/DAC4RL.git
cd DAC4RL
pip install -e .

Basic Usage

import gym
import rlenv

# Create an (outer) env to perform DAC with 3,000 inner env steps and 2 reconfiguration points:
n_epochs = 2
env = gym.make("dac4carl-v0", total_timesteps = 1e3, n_epochs = n_epochs)
env.seed(123)
obs = env.reset()
done = False

print("Environment of sampled instance set to: ", env.current_instance.env_type)

for i in range(n_epochs):

    # Create an action dict containing the algorithm to apply along with its hyperparameter configuration:
    action = {'algorithm': 'PPO', 'learning_rate': 0.001, 'gamma': 0.98, 'gae_lambda': 0.8, 'ent_coef': 0.0, 'n_steps': 32, 'n_epochs': 10, 'batch_size': 256}

    # Apply the desired hyperparameter configs:
    obs, reward, done, info = env.step(action)

    # obs, reward, done, info = env.step(env.action_space.sample())

Sample Submissions

The directory baselines contains sample submissions with sample code files and an optional requirements.txt which can contain additional Python packages to be installed during an evaluation.

The Bash script prepare_upload.sh may be used to package a submission directory into a .zip file ready for submission to the competition servers.

bash prepare_upload.sh <submission_dir>

To create a submission, please follow the guidelines here.

Evaluating Submissions Locally

evaluate_submission.sh can be used to evaluate submissions locally. For example, you can execute the following commands to evaluate an example baseline (the argument n specifies the number of problem instances):

bash evaluate_submission.sh -s ../DAC4RL/baselines/zoo_hyperparams/ -t dac4rl -n 25

NOTE: Please note that if you want to evaluate the experiments in the same runtime environment as the competition servers, you would additionally need to set up the docker container below.

Docker Container

To run your experiments in the same runtime environment as the competition servers they will be evaluated on, we provide a Docker container. Please see the Docker container definition file to see what packages will be available in the runtime environment.

The Docker container may be run using the following command:

docker run -it -u root raghuspacerajan/dac4automlpy39:latest bash

It is not a requirement to use the Docker container to run your local evaluations, but it will be easier for us to debug any issues that may arise when you try evaluating submissions for the competition if you do so inside the provided Docker container.

Discussion Forum

The discussion forum is hosted at: https://codalab.lisn.upsaclay.fr/forums/3727/

dac4rl's People

Contributors

amsks avatar raghuspacerajan avatar theeimer avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Forkers

shercklo

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.