From f05bccd0b66aa43fcd9f2f7abc328c0de462f9e2 Mon Sep 17 00:00:00 2001 From: Janosh Riebesell Date: Sun, 22 Sep 2024 10:24:27 -0400 Subject: [PATCH] raise ValueError on non-https author URLs fix yaml whitespace --- data/applications.yml | 2 +- data/make_readme.py | 26 +++++++++++++------------- data/packages.yml | 5 +++-- data/posts.yml | 2 ++ data/publications.yml | 20 ++++++++++---------- data/videos.yml | 2 +- readme.md | 2 +- 7 files changed, 31 insertions(+), 28 deletions(-) diff --git a/data/applications.yml b/data/applications.yml index adb97b7..56eb4c0 100644 --- a/data/applications.yml +++ b/data/applications.yml @@ -35,7 +35,7 @@ - name: Srinivas Vasudevan description: Uses normalizing flows in conjunction with Monte Carlo estimation to have more expressive distributions and better posterior estimation. -- title: 'SRFlow: Learning the Super-Resolution Space with Normalizing Flow' +- title: "SRFlow: Learning the Super-Resolution Space with Normalizing Flow" url: https://arxiv.org/abs/2006.14200 date: 2020-06-25 authors: diff --git a/data/make_readme.py b/data/make_readme.py index 471516d..3a82632 100755 --- a/data/make_readme.py +++ b/data/make_readme.py @@ -66,13 +66,7 @@ def load_items(key: str) -> list[Item]: seen_titles: set[tuple[str, str]] = set() required_keys = {"title", "url", "date", "authors", "description"} -optional_keys = { - "lang", - "repo", - "docs", - "date_added", - "last_updated", -} +optional_keys = {"lang", "repo", "docs", "date_added", "last_updated"} valid_languages = {"PyTorch", "TensorFlow", "JAX", "Julia", "Other"} et_al_after = 2 @@ -157,12 +151,18 @@ def validate_item(itm: Item, section_title: str) -> None: auth | {"name": auth["name"].split(" ")[-1]} for auth in authors ] - authors_str = ", ".join( - f"[{auth['name']}]({auth_url})" - if (auth_url := auth.get("url")) - else auth["name"] - for auth in authors[:et_al_after] - ) + def auth_str(auth: Author) -> str: + """Return a markdown string for an author.""" + auth_str = auth["name"] + if url := auth.get("url"): + if not url.startswith("https://"): + raise ValueError( + f"Invalid author {url=}, must start with https://" + ) + auth_str = f"[{auth_str}]({url})" + return auth_str + + authors_str = ", ".join(map(auth_str, authors[:et_al_after])) if len(authors) > et_al_after: authors_str += " et al." diff --git a/data/packages.yml b/data/packages.yml index 40b7e5b..cccc1ba 100644 --- a/data/packages.yml +++ b/data/packages.yml @@ -55,8 +55,9 @@ date: 2021-04-12 url: https://github.com/deepmind/distrax authors: - - name: DeepMind - url: https://deepmind.com + - name: DeepMind + url: https://deepmind.com + github: https://github.com/google-deepmind lang: JAX description: Distrax is a lightweight library of probability distributions and bijectors. It acts as a JAX-native re-implementation of a subset of TensorFlow Probability (TFP), with some new features and emphasis on extensibility. diff --git a/data/posts.yml b/data/posts.yml index 7ece892..54ce721 100644 --- a/data/posts.yml +++ b/data/posts.yml @@ -36,4 +36,6 @@ # file url: https://github.com/whitead/dmol-book/blob/master/dl/flows.ipynb authors: - name: Andrew White + url: https://thewhitelab.org + github: https://github.com/whitead description: A nice introduction starting with the change of variables formula (aka flow equation), going on to cover some common bijectors and finishing with a code example showing how to fit the double-moon distribution with TensorFlow Probability. diff --git a/data/publications.yml b/data/publications.yml index d95028f..aa3138d 100644 --- a/data/publications.yml +++ b/data/publications.yml @@ -194,13 +194,13 @@ url: https://arxiv.org/abs/1907.08982 date: 2019-07-21 authors: - - name: Jonas Rothfuss - - name: Fabio Ferreira - - name: Simon Boehm - - name: Simon Walther - - name: Maxim Ulrich - - name: Tamim Asfour - - name: Andreas Krause + - name: Jonas Rothfuss + - name: Fabio Ferreira + - name: Simon Boehm + - name: Simon Walther + - name: Maxim Ulrich + - name: Tamim Asfour + - name: Andreas Krause description: Normalizing flows for conditional density estimation. This paper proposes noise regularization to reduce overfitting. [[Blog](https://siboehm.com/articles/19/normalizing-flow-network)] - title: "Normalizing Flows: An Introduction and Review of Current Methods" @@ -337,9 +337,9 @@ url: https://arxiv.org/abs/2006.08545 date: 2020-06-15 authors: - - name: Polina Kirichenko - - name: Pavel Izmailov - - name: Andrew Gordon Wilson + - name: Polina Kirichenko + - name: Pavel Izmailov + - name: Andrew Gordon Wilson description: This study how traditional normalizing flow models can suffer from out-of-distribution data. They offer a solution to combat this issue by modifying the coupling layers. [[Tweet](https://twitter.com/polkirichenko/status/1272715634544119809)] repo: https://github.com/PolinaKirichenko/flows_ood diff --git a/data/videos.yml b/data/videos.yml index 98bae5f..50d0987 100644 --- a/data/videos.yml +++ b/data/videos.yml @@ -2,7 +2,7 @@ url: https://youtu.be/VeYyUcIDVHI date: 2018-10-04 authors: - - name: Rianne van den Berg + - name: Rianne van den Berg description: Introduces Sylvester normalizing flows which remove the single-unit bottleneck from planar flows for increased flexibility in the variational posterior. - title: Graph Normalizing Flows diff --git a/readme.md b/readme.md index 30ac505..9752f37 100644 --- a/readme.md +++ b/readme.md @@ -515,7 +515,7 @@ Table 1 in the paper has a good comparison with traditional NFs. ## 🌐 Blog Posts (5) -1. 2020-08-19 - [Chapter on flows from the book 'Deep Learning for Molecules and Materials'](https://dmol.pub/dl/flows) by Andrew White
+1. 2020-08-19 - [Chapter on flows from the book 'Deep Learning for Molecules and Materials'](https://dmol.pub/dl/flows) by [Andrew White](https://thewhitelab.org)
A nice introduction starting with the change of variables formula (aka flow equation), going on to cover some common bijectors and finishing with a code example showing how to fit the double-moon distribution with TensorFlow Probability. 1. 2018-10-21 - [Change of Variables for Normalizing Flows](https://nealjean.com/ml/change-of-variables) by Neal Jean