Git Product home page Git Product logo

active-surrogate-estimators's Introduction

Active Surrogate Estimators: An Active Learning Approach to Label-Efficient Model Evaluation

Hi, good to see you here! ๐Ÿ‘‹

This is code for `Active Surrogate Estimators: An Active Learning Approach to Label-Efficient Model Evaluation'.

Setup

We recommend you set up a conda environment like so:

conda-env update -f slurm/environment.yaml
conda activate ase

Reproducing the Experiments

Overview

  • The `reproduce' folder contains scripts for running specific experiments.
  • Execute a script as
sh reproduce/<script-name>.sh
  • You can then create plots with the Jupyter Notebook at
notebooks/plots_paper.ipynb
  • All scripts log continuously, so you should be able to create plots as the results are coming in.

Experiments

  • To recreate the distribution shift experiments, run the script reproduce/Missing7.sh.
    • To get results in reasonable time, we recommend starting this multiple times in parallel, e.g. across different compute nodes of a cluster. We ran it on ~30 GPUs for ~1 day, where each GPU ran the script three times in parallel (so 100 processes total). Different runs will automatically be combined by the evaluation script.
  • To recreate the ResNet experiments, run the scripts reproduce/ResNetCifar10.sh, reproduce/ResNetCifar100.sh, and reproduce/ResNetFMNIST.sh.

Details: Code Structure

  • main.py is the main entry point into this code-base.

    • It executes a a total of n_runs experiments for a fixed setup.
    • Each experiment:
      • Trains (or loads) one main model.
      • This model can then be evaluated with a variety of acquisition strategies.
      • Risk estimates are then computed for all acquisition strategies and all risk estimators.
  • This repository uses Hydra to manage configs.

    • Look at conf/config.yaml or one of the experiments in conf/... for configs and hyperparameters.
    • Experiments are autologged and results saved to the outputs/ directory.
  • Different modules

    • main.py runs repeated experiments and orchestrates the whole shebang.
      • It iterates through all n_runs and acquisition strategies.
    • experiment.py handles a single experiment.
      • It combines the model, dataset, acquisition strategy, and risk estimators.
    • datasets.py, aquisition.py, loss.py, risk_estimators.py. Those should all contain more or less what you would expect.
    • hoover.py is a logging module.
    • models/ contains all models, scikit-learn and pyTorch.
      • In sk2torch.py we have some code that wraps torch models in a way that lets them be used as scikit-learn models from the outside.

And Finally

Thanks for stopping by!

If you find anything wrong with the code, please contact us.

We are happy to answer any questions related to the code and project.

active-surrogate-estimators's People

Contributors

konradszafer avatar jlko 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.