From 0ac4e21277889e16aec097cc58757cc63b8b7592 Mon Sep 17 00:00:00 2001 From: Marvin Schmitt <35921281+marvinschmitt@users.noreply.github.com> Date: Sun, 13 Oct 2024 17:38:24 +0200 Subject: [PATCH] implement initial structure --- .github/workflows/bib2readme.py | 110 ++++++++ .../workflows/generate_readme_from_bib.yml | 41 +++ .gitignore | 3 + .nojekyll | 0 README.md | 242 +++++++++++++++++- data.bib | 79 ++++++ 6 files changed, 474 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/bib2readme.py create mode 100644 .github/workflows/generate_readme_from_bib.yml create mode 100644 .gitignore create mode 100644 .nojekyll create mode 100644 data.bib diff --git a/.github/workflows/bib2readme.py b/.github/workflows/bib2readme.py new file mode 100644 index 0000000..40ee376 --- /dev/null +++ b/.github/workflows/bib2readme.py @@ -0,0 +1,110 @@ +from collections import defaultdict +from typing import Dict, List + +import bibtexparser + +# Define the categories to be printed in the README +VALID_CATEGORIES = ["overview", "software", "paper", "uncategorized"] + +README_HEADER = """ +Welcome to the Awesome Amortized Inference repository! +This is a curated list of resources, including overviews, software, papers, and other resources related to amortized inference. +Feel free to explore the entries below and use the provided BibTeX information for citation purposes. +Contributioons always welcome, this shall be a community-driven project. +Contribution guide will follow ASAP. +""" + + +# Define Entry class +class Entry: + def __init__(self, title: str, authors: str, url: str, category: str, bibtex: str): + self.title = title + self.authors = authors + self.url = url + self.category = category + self.bibtex = bibtex + + @classmethod + def from_bibtex(cls, entry: dict) -> "Entry": + title = entry.get("title", "No title").replace("{", "").replace("}", "") + authors = entry.get("author", "No author").replace(" and ", ", ") + url = entry.get("url", "") + category = entry.get("category", "uncategorized").lower() + bibtex = cls.format_bibtex(entry) + return cls(title, authors, url, category, bibtex) + + @staticmethod + def format_bibtex(entry: dict) -> str: + bibtex_type = entry.get("ENTRYTYPE", "misc") + bibtex_key = entry.get("ID", "unknown") + bibtex_fields = [ + f" {key} = {{{value}}}" + for key, value in entry.items() + if key not in ["ENTRYTYPE", "ID"] + ] + bibtex_str = ( + f"@{bibtex_type}{{{bibtex_key},\n " + ",\n ".join(bibtex_fields) + "\n}" + ) + return bibtex_str + + def to_string(self) -> str: + entry_str = f"- **{self.title}**\n {self.authors}\n" + if self.url: + entry_str += f" [Link]({self.url})\n" + entry_str += ( + f"
\n" + f" Show BibTeX\n" + f""" \n""" + f"
\n"
+            f"{self.bibtex}\n"
+            f"
\n" + f"
\n" + ) + entry_str += "\n" + return entry_str + + +def organize_entries(bib_database) -> Dict[str, List[Entry]]: + entries_by_category: Dict[str, List[Entry]] = defaultdict(list) + for entry in bib_database.entries: + entry_obj = Entry.from_bibtex(entry) + entries_by_category[entry_obj.category].append(entry_obj) + return entries_by_category + + +def create_readme(entries_by_category: Dict[str, List[Entry]]) -> str: + readme_content = "# Awesome Amortized Inference\n\n" + readme_content += README_HEADER + + for category in VALID_CATEGORIES: + if category in entries_by_category: + readme_content += f"## {category.capitalize()}\n\n" + readme_content += "\n".join( + [entry.to_string() for entry in entries_by_category[category]] + ) + readme_content += "\n" + return readme_content + + +def main(): + try: + with open("data.bib") as bibtex_file: + bib_database = bibtexparser.load(bibtex_file) + except FileNotFoundError: + print("The data.bib file was not found.") + exit(1) + + entries_by_category = organize_entries(bib_database) + readme_content = create_readme(entries_by_category) + + with open("README.md", "w") as readme_file: + readme_file.write(readme_content) + + +if __name__ == "__main__": + main() diff --git a/.github/workflows/generate_readme_from_bib.yml b/.github/workflows/generate_readme_from_bib.yml new file mode 100644 index 0000000..6a5acb8 --- /dev/null +++ b/.github/workflows/generate_readme_from_bib.yml @@ -0,0 +1,41 @@ +name: Generate README + +on: + push: + branches: + - main + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + + steps: + # Step 1: Check out the repository code + - name: Checkout repository + uses: actions/checkout@v3 + + # Step 2: Set up Python environment + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.11" # Adjust the Python version if necessary + + # Step 3: Install dependencies + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install bibtexparser + + # Step 4: Run the script to generate README.md + - name: Run README generation script + run: python .github/workflows/bib2readme.py + + # Step 5: Commit and push changes if README.md was updated + - name: Commit and push changes + run: | + git config --global user.name 'github-actions[bot]' + git config --global user.email 'github-actions[bot]@users.noreply.github.com' + git add README.md + git diff-index --quiet HEAD || git commit -m "Update README.md" + git push diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..f794505 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.html +.DS_Store +README_files/ \ No newline at end of file diff --git a/.nojekyll b/.nojekyll new file mode 100644 index 0000000..e69de29 diff --git a/README.md b/README.md index 02f4802..b8479cf 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,243 @@ # Awesome Amortized Inference -Under construction +Welcome to the Awesome Amortized Inference repository! +This is a curated list of resources, including overviews, software, papers, and other resources related to amortized inference. +Feel free to explore the entries below and use the provided BibTeX information for citation purposes. +Contributioons always welcome, this shall be a community-driven project. +Contribution guide will follow ASAP. + +## Overview + +- **Normalizing flows for probabilistic modeling and inference** +Papamakarios, George, Nalisnick, Eric, Rezende, Danilo Jimenez, Mohamed, Shakir, Lakshminarayanan, Balaji +
+ Show BibTeX + +

+@article{papamakarios2021normalizing,
+    category = {overview},
+    numpages = {64},
+    articleno = {57},
+    month = {jan},
+    journal = {J. Mach. Learn. Res.},
+    issn = {1532-4435},
+    number = {1},
+    volume = {22},
+    publisher = {JMLR.org},
+    issue_date = {January 2021},
+    year = {2021},
+    title = {Normalizing flows for probabilistic modeling and inference},
+    author = {Papamakarios, George and Nalisnick, Eric and Rezende, Danilo Jimenez and Mohamed, Shakir and Lakshminarayanan, Balaji}
+}
+
+
+ +## Software + +- **BayesFlow: Amortized Bayesian Workflows With Neural Networks** +Stefan T. Radev, Marvin Schmitt, Lukas Schumacher, Lasse Elsemüller, Valentin Pratz, Yannik Schälte, Ullrich Köthe, Paul-Christian Bürkner +[Link](https://bayesflow.org/) +
+ Show BibTeX + +

+@article{radev2023bayesflow,
+    category = {software},
+    journal = {Journal of Open Source Software},
+    title = {BayesFlow: Amortized Bayesian Workflows With Neural Networks},
+    author = {Stefan T. Radev and Marvin Schmitt and Lukas Schumacher and Lasse Elsemüller and Valentin Pratz and Yannik Schälte and Ullrich Köthe and Paul-Christian Bürkner},
+    pages = {5702},
+    number = {89},
+    volume = {8},
+    publisher = {The Open Journal},
+    year = {2023},
+    url = {https://bayesflow.org/},
+    doi = {10.21105/joss.05702}
+}
+
+
+ +- **sbi: A toolkit for simulation-based inference** +Alvaro Tejero-Cantero, Jan Boelts, Michael Deistler, Jan-Matthis Lueckmann, Conor Durkan, Pedro J. Gonçalves, David S. Greenberg, Jakob H. Macke +[Link](https://sbi-dev.github.io/sbi/latest/) +
+ Show BibTeX + +

+@article{tejero-cantero2020sbi,
+    category = {software},
+    journal = {Journal of Open Source Software},
+    title = {sbi: A toolkit for simulation-based inference},
+    author = {Alvaro Tejero-Cantero and Jan Boelts and Michael Deistler and Jan-Matthis Lueckmann and Conor Durkan and Pedro J. Gonçalves and David S. Greenberg and Jakob H. Macke},
+    pages = {2505},
+    number = {52},
+    volume = {5},
+    publisher = {The Open Journal},
+    year = {2020},
+    url = {https://sbi-dev.github.io/sbi/latest/},
+    doi = {10.21105/joss.02505}
+}
+
+
+ +## Paper + +- **Neural Importance Sampling for Rapid and Reliable Gravitational-Wave Inference** +Dax, Maximilian, Green, Stephen R., Gair, Jonathan, P\"{u}rrer, Michael, Wildberger, Jonas, Macke, Jakob H., Buonanno, Alessandra, Sch\"{o}lkopf, Bernhard +[Link](http://dx.doi.org/10.1103/PhysRevLett.130.171403) +
+ Show BibTeX + +

+@article{dax2023neural,
+    category = {paper},
+    year = {2023},
+    author = {Dax,  Maximilian and Green,  Stephen R. and Gair,  Jonathan and P\"{u}rrer,  Michael and Wildberger,  Jonas and Macke,  Jakob H. and Buonanno,  Alessandra and Sch\"{o}lkopf,  Bernhard},
+    publisher = {American Physical Society (APS)},
+    journal = {Physical Review Letters},
+    number = {17},
+    doi = {10.1103/physrevlett.130.171403},
+    url = {http://dx.doi.org/10.1103/PhysRevLett.130.171403},
+    issn = {1079-7114},
+    volume = {130},
+    title = {Neural Importance Sampling for Rapid and Reliable Gravitational-Wave Inference}
+}
+
+
+ +- **JANA: Jointly Amortized Neural Approximation of Complex Bayesian Models** +Radev, Stefan T., Schmitt, Marvin, Pratz, Valentin, Picchini, Umberto, K\"othe, Ullrich, B\"urkner, Paul-Christian +
+ Show BibTeX + +

+@inproceedings{radev2023jana,
+    category = {paper},
+    publisher = {PMLR},
+    series = {Proceedings of Machine Learning Research},
+    volume = {216},
+    editor = {Evans, Robin J. and Shpitser, Ilya},
+    year = {2023},
+    pages = {1695--1706},
+    booktitle = {Proceedings of the 39th Conference on Uncertainty in Artificial Intelligence},
+    author = {Radev, Stefan T. and Schmitt, Marvin and Pratz, Valentin and Picchini, Umberto and K\"othe, Ullrich and B\"urkner, Paul-Christian},
+    title = {{JANA: Jointly Amortized Neural Approximation of Complex Bayesian Models}}
+}
+
+
+ +- **ASPIRE: Iterative Amortized Posterior Inference for Bayesian Inverse Problems** +Rafael Orozco, Ali Siahkoohi, Mathias Louboutin, Felix J. Herrmann +[Link](https://arxiv.org/abs/2405.05398) +
+ Show BibTeX + +

+@misc{orozco2024aspire,
+    category = {paper},
+    url = {https://arxiv.org/abs/2405.05398},
+    eprint = {arXiv:2405.05398},
+    year = {2024},
+    title = {ASPIRE: Iterative Amortized Posterior Inference for Bayesian Inverse Problems},
+    author = {Rafael Orozco and Ali Siahkoohi and Mathias Louboutin and Felix J. Herrmann}
+}
+
+
diff --git a/data.bib b/data.bib new file mode 100644 index 0000000..50c337d --- /dev/null +++ b/data.bib @@ -0,0 +1,79 @@ +@article{dax2023neural, + title = {Neural Importance Sampling for Rapid and Reliable Gravitational-Wave Inference}, + volume = {130}, + ISSN = {1079-7114}, + url = {http://dx.doi.org/10.1103/PhysRevLett.130.171403}, + DOI = {10.1103/physrevlett.130.171403}, + number = {17}, + journal = {Physical Review Letters}, + publisher = {American Physical Society (APS)}, + author = {Dax, Maximilian and Green, Stephen R. and Gair, Jonathan and P\"{u}rrer, Michael and Wildberger, Jonas and Macke, Jakob H. and Buonanno, Alessandra and Sch\"{o}lkopf, Bernhard}, + year = {2023}, + category = {paper}, +} + +@article{radev2023bayesflow, + doi = {10.21105/joss.05702}, + url = {https://bayesflow.org/}, + year = {2023}, + publisher = {The Open Journal}, + volume = {8}, + number = {89}, + pages = {5702}, + author = {Stefan T. Radev and Marvin Schmitt and Lukas Schumacher and Lasse Elsemüller and Valentin Pratz and Yannik Schälte and Ullrich Köthe and Paul-Christian Bürkner}, + title = {BayesFlow: Amortized Bayesian Workflows With Neural Networks}, + journal = {Journal of Open Source Software} , + category = {software} +} + +@article{tejero-cantero2020sbi, + doi = {10.21105/joss.02505}, + url = {https://sbi-dev.github.io/sbi/latest/}, + year = {2020}, + publisher = {The Open Journal}, + volume = {5}, + number = {52}, + pages = {2505}, + author = {Alvaro Tejero-Cantero and Jan Boelts and Michael Deistler and Jan-Matthis Lueckmann and Conor Durkan and Pedro J. Gonçalves and David S. Greenberg and Jakob H. Macke}, + title = {sbi: A toolkit for simulation-based inference}, + journal = {Journal of Open Source Software}, + category = {software} +} + +@article{papamakarios2021normalizing, +author = {Papamakarios, George and Nalisnick, Eric and Rezende, Danilo Jimenez and Mohamed, Shakir and Lakshminarayanan, Balaji}, +title = {Normalizing flows for probabilistic modeling and inference}, +year = {2021}, +issue_date = {January 2021}, +publisher = {JMLR.org}, +volume = {22}, +number = {1}, +issn = {1532-4435}, +journal = {J. Mach. Learn. Res.}, +month = {jan}, +articleno = {57}, +numpages = {64}, +category = {overview} +} + +@InProceedings{radev2023jana, + title = {{JANA: Jointly Amortized Neural Approximation of Complex Bayesian Models}}, + author = {Radev, Stefan T. and Schmitt, Marvin and Pratz, Valentin and Picchini, Umberto and K\"othe, Ullrich and B\"urkner, Paul-Christian}, + booktitle = {Proceedings of the 39th Conference on Uncertainty in Artificial Intelligence}, + pages = {1695--1706}, + year = {2023}, + editor = {Evans, Robin J. and Shpitser, Ilya}, + volume = {216}, + series = {Proceedings of Machine Learning Research}, + publisher = {PMLR}, + category = {paper}, +} + +@misc{orozco2024aspire, +Author = {Rafael Orozco and Ali Siahkoohi and Mathias Louboutin and Felix J. Herrmann}, +Title = {ASPIRE: Iterative Amortized Posterior Inference for Bayesian Inverse Problems}, +Year = {2024}, +Eprint = {arXiv:2405.05398}, +url = {https://arxiv.org/abs/2405.05398}, +category = {paper} +} \ No newline at end of file