Skip to content

Commit

Permalink
raise ValueError on non-https author URLs
Browse files Browse the repository at this point in the history
fix yaml whitespace
  • Loading branch information
janosh committed Sep 22, 2024
1 parent d4320f5 commit f05bccd
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 28 deletions.
2 changes: 1 addition & 1 deletion data/applications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
26 changes: 13 additions & 13 deletions data/make_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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."

Expand Down
5 changes: 3 additions & 2 deletions data/packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 2 additions & 0 deletions data/posts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
20 changes: 10 additions & 10 deletions data/publications.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion data/videos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ Table 1 in the paper has a good comparison with traditional NFs.

## 🌐 Blog Posts <small>(5)</small>

1. 2020-08-19 - [Chapter on flows from the book 'Deep Learning for Molecules and Materials'](https://dmol.pub/dl/flows) by Andrew White<br>
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)<br>
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<br>
Expand Down

0 comments on commit f05bccd

Please sign in to comment.