GithubHelp home page GithubHelp logo

dynamiccml's Introduction

DynamicCML

This code repo contains the implementation of the DCML algorithm presented in the NeurIPS 2023 paper:

On the Stability-Plasticity Dilemma in Continual Meta-Learning: Theory and Algorithm by Qi Chen, Changjian Shui, Ligong Han, and Mario Marchand.

Prerequisites

To run the code, make sure that the requirements are installed.

pip install -r requirements.txt

The code was written to run in Python 3.6 or in a more recent version.

Code Structure

.
|-- config
|   `-- yamls
|       |-- omniglot
|       `-- synbols               
|-- output
|   `-- models
|       |-- omniglot_maml.model
|       `-- synbols_maml.model
|-- run_guassian.sh
|-- run_osaka.sh
`-- src
    |-- dataloader
    |   |-- osaka_datasets.py
    |   `-- toy_datasets.py
    |-- envdetector
    |   |-- bocd.py
    |   `--env_change_detection.py
    |-- learners
    |   |-- dmogd.py
    |   |-- __init__.py
    |   |-- maml.py
    |   |-- model.py
    |   `-- osaka_model.py
    |-- main
    |   |-- args.py
    |   |-- run_gaussian.py
    |   `-- run_osaka_benchmark.py
    `-- utils

Continual Meta-Learning Framework

Illustration

Experimental Setting

Illustration

Run Experiment

Moving 2D Gaussian

    python src/main/run_gaussian.py --sample_num 100 --K 2 --hazard 0.1 --method 1 --seed 168

or

   sh run_gaussian.sh

OSAKA

  1. Create your wandb account, a new project, and a wandb key
  2. Run the code w.r.t different algorithms ("DCML_oracle DCML_win CMAML_pre_kwto_acc online_sgd fine_tuning MetaCOG MetaBGD BGD") For example:
sh run_osaka.sh "DCML_oracle" 0.0 0.2 "synbols" wandb_project_name  wandb_key

Reference

Acknowledgements

The code for testing the OSAKA benchmark was adapted from https://github.com/ServiceNow/osaka/tree/camera_ready.

dynamiccml's People

Contributors

livreq avatar

Stargazers

 avatar  avatar

Watchers

 avatar

dynamiccml's Issues

Error in dmogd.py Line 620: Mismatch in Number of Returned Values from self.SGD

Hello,

I have noticed an issue in your dmogd.py file at line 620:

w_t, train_per, test_per, train_loss, test_loss = self.SGD(x_train, y_train, x_test, y_test, test)

In the self.SGD method, only four values are returned, but you are trying to unpack five values here. The variable w_t is missing in the returned values from the self.SGD method. This appears to be an error.

Could you please update the code to resolve this issue?

Thank you!

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.