{"id":17312906,"url":"https://github.com/antoniocarta/ex_model_cl","last_synced_at":"2025-04-14T14:33:47.599Z","repository":{"id":64211413,"uuid":"431775772","full_name":"AntonioCarta/ex_model_cl","owner":"AntonioCarta","description":"Experiments on continual learning from a stream of pretrained models.","archived":false,"fork":false,"pushed_at":"2022-04-12T10:34:57.000Z","size":145,"stargazers_count":8,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T03:32:34.492Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AntonioCarta.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-25T08:54:12.000Z","updated_at":"2023-12-10T01:56:34.000Z","dependencies_parsed_at":"2022-12-04T17:30:20.993Z","dependency_job_id":null,"html_url":"https://github.com/AntonioCarta/ex_model_cl","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonioCarta%2Fex_model_cl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonioCarta%2Fex_model_cl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonioCarta%2Fex_model_cl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AntonioCarta%2Fex_model_cl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AntonioCarta","download_url":"https://codeload.github.com/AntonioCarta/ex_model_cl/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248897652,"owners_count":21179622,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-15T12:44:59.534Z","updated_at":"2025-04-14T14:33:47.578Z","avatar_url":"https://github.com/AntonioCarta.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ex-model CL\nEx-model continual learning is a setting where a stream of experts (i.e. model's parameters) is available and a continual learning model learns from them without access to the original data.\n\n![ExML scenario](https://github.com/AntonioCarta/ex_model_cl/blob/main/exml.PNG)\n\nThis is based on our [recent work](https://arxiv.org/abs/2112.06511) on continual learning from pretrained models. This repository provides a snapshot of the codebase at the time of publication. If you want to test your own strategies, the benchmarks and pretrained models are available directly in [Avalanche](https://github.com/ContinualAI/avalanche), and you should use them instead of this repository.\n\nWe plan to add also the Ex-Model Distillation inside Avalanche in the future.\n\n**NOTE: This repository is a heavy refactoring of the original codebase which was used to run the experiment. The refactoring was necessary to make it easier to understand and reuse by other researchers. However, due to the high variance of the experiements, there may be slight differences in the results compared to the paper.**\n\nThe module `exmodel` follows Avalanche's structure:\n- **benchmarks**: `ExModelScenario` adds an attribute `trained_models` to the benchmarks. The original `train_stream` and `test_stream` are available for evaluation purposes (they are assumed private by the scenario).\n- **models**: custom `nn.Module`s and baseline architectures used in the experiments.\n- **evaluation**: loggers and metrics.\n- **training**: training algorithms. The ex-model distillation strategy is here. \n\nThe folder `experiments` contains the code to run the experiments. The main is in `launcher.py`, while the training function is in `train_ex_model.py`.\n\n## Install Dependencies\n```\nconda env create -f environment.yml\n```\navalanche must be installed separately.\nThis repository used Avalanche pre-release, commit `a299bd4`.\n\n## Run Experiments\nto launch an experiment run:\n```\npython experiments/launcher.py --config CONFIGS/debug.yaml\n```\nThe directory `CONFIGS` contains the configuration already setup for you.\nTo run the experiments you may need to change the logs and data folders in the `CONFIGS` yaml files.\n\n## Known issues\nThe table printed by the rich-based logger sometimes misalign metric values (when there are missing values). The textual logger and json files are all correct.\n\n## Citation\nIf you find this useful consider citing:\n```\nCarta, A., Cossu, A., Lomonaco, V., \u0026 Bacciu, D. (2021). Ex-Model: Continual Learning from a Stream of Trained Models. arXiv preprint arXiv:2112.06511.\n```\nbibtex:\n```\n@article{carta2021ex,\n  title={Ex-Model: Continual Learning from a Stream of Trained Models},\n  author={Carta, Antonio and Cossu, Andrea and Lomonaco, Vincenzo and Bacciu, Davide},\n  journal={arXiv preprint arXiv:2112.06511},\n  year={2021}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoniocarta%2Fex_model_cl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fantoniocarta%2Fex_model_cl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fantoniocarta%2Fex_model_cl/lists"}