From d7425d160f78cce5c2b0fa565c8cda54bfc428ff Mon Sep 17 00:00:00 2001 From: Joseph Viviano Date: Thu, 3 Aug 2023 15:18:25 -0400 Subject: [PATCH 1/3] trying new sphinx settings --- docs/source/conf.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/source/conf.py b/docs/source/conf.py index 44c31583..eda470d4 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -9,8 +9,8 @@ import sys project = "torchgfn" -copyright = "2022, Salem Lahlou" -author = "Salem Lahlou" +copyright = "2022-2023, Salem Lahlou, Joseph Viviano, & Victor Schmidt" +author = "Salem Lahlou, Joseph Viviano, & Victor Schmidt" sys.path.insert(0, os.path.abspath("../..")) @@ -27,8 +27,15 @@ "autoapi.extension", "sphinx.ext.napoleon", ] + +source_suffix = { + ".rst": "restructuredtext", + ".txt": "restructuredtext", + ".md": "markdown", +} + autoapi_type = "python" -autoapi_dirs = ["../../src/gfn"] +autoapi_dirs = ["../../src/gfn", "../../tutorials"] autoapi_member_order = "alphabetical" autodoc_typehints = "description" From 5c18ca2d4fd434a6ed27ac31e041f0c25b2e5f52 Mon Sep 17 00:00:00 2001 From: Salem Date: Thu, 3 Aug 2023 15:26:24 -0400 Subject: [PATCH 2/3] rename scripts to examples, and make the top file comments raw strings --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 12af5096..627f933f 100644 --- a/README.md +++ b/README.md @@ -199,4 +199,4 @@ Currently, the implemented losses are: - Log Partition Variance loss. Introduced [here](https://arxiv.org/abs/2302.05446) # Scripts -Example scripts are provided [here](https://github.com/saleml/torchgfn/tree/master/tutorials/scripts/). They can be used to reproduce published results in the HyperGrid environment, and the Box environment. \ No newline at end of file +Example scripts are provided [here](https://github.com/saleml/torchgfn/tree/master/tutorials/examples/). They can be used to reproduce published results in the HyperGrid environment, and the Box environment. \ No newline at end of file From 61934bd7c740eb48f0d7a1073d5c0c6e3573d845 Mon Sep 17 00:00:00 2001 From: Salem Date: Thu, 3 Aug 2023 15:26:57 -0400 Subject: [PATCH 3/3] rename scripts to examples --- tutorials/README.md | 2 +- tutorials/{scripts => examples}/README.md | 0 tutorials/{scripts => examples}/__init__.py | 0 tutorials/{scripts => examples}/train_box.py | 2 +- tutorials/{scripts => examples}/train_discreteebm.py | 2 +- tutorials/{scripts => examples}/train_hypergrid.py | 2 +- 6 files changed, 4 insertions(+), 4 deletions(-) rename tutorials/{scripts => examples}/README.md (100%) rename tutorials/{scripts => examples}/__init__.py (100%) rename tutorials/{scripts => examples}/train_box.py (99%) rename tutorials/{scripts => examples}/train_discreteebm.py (99%) rename tutorials/{scripts => examples}/train_hypergrid.py (99%) diff --git a/tutorials/README.md b/tutorials/README.md index 7d8a0c51..90e05758 100644 --- a/tutorials/README.md +++ b/tutorials/README.md @@ -1,5 +1,5 @@ # Welcome to the `torchgfn` tutorials 1. Learn the building blocks of your GflowNet with [notebooks](https://github.com/saleml/torchgfn/tree/master/tutorials/notebooks/) -2. See `torchgfn` in action with example [training scripts](https://github.com/saleml/torchgfn/tree/master/tutorials/scripts/) +2. See `torchgfn` in action with example [training scripts](https://github.com/saleml/torchgfn/tree/master/tutorials/examples/) 3. Read a summary of what you need to do to create your own [Environment](https://github.com/saleml/torchgfn/tree/master/tutorials/ENV.md) diff --git a/tutorials/scripts/README.md b/tutorials/examples/README.md similarity index 100% rename from tutorials/scripts/README.md rename to tutorials/examples/README.md diff --git a/tutorials/scripts/__init__.py b/tutorials/examples/__init__.py similarity index 100% rename from tutorials/scripts/__init__.py rename to tutorials/examples/__init__.py diff --git a/tutorials/scripts/train_box.py b/tutorials/examples/train_box.py similarity index 99% rename from tutorials/scripts/train_box.py rename to tutorials/examples/train_box.py index d3762a13..30d6d854 100644 --- a/tutorials/scripts/train_box.py +++ b/tutorials/examples/train_box.py @@ -1,4 +1,4 @@ -""" +r""" The goal of this script is to reproduce some of the published results on the Box environment. Run one of the following commands to reproduce some of the results in [A theory of continuous generative flow networks](https://arxiv.org/abs/2301.12594) diff --git a/tutorials/scripts/train_discreteebm.py b/tutorials/examples/train_discreteebm.py similarity index 99% rename from tutorials/scripts/train_discreteebm.py rename to tutorials/examples/train_discreteebm.py index 6a713615..84191f2d 100644 --- a/tutorials/scripts/train_discreteebm.py +++ b/tutorials/examples/train_discreteebm.py @@ -1,4 +1,4 @@ -""" +r""" The goal of this script is to reproduce some of the published results on the HyperGrid environment. Run one of the following commands to reproduce some of the results in [Trajectory balance: Improved credit assignment in GFlowNets](https://arxiv.org/abs/2201.13259) diff --git a/tutorials/scripts/train_hypergrid.py b/tutorials/examples/train_hypergrid.py similarity index 99% rename from tutorials/scripts/train_hypergrid.py rename to tutorials/examples/train_hypergrid.py index 7acf5599..5a613faf 100644 --- a/tutorials/scripts/train_hypergrid.py +++ b/tutorials/examples/train_hypergrid.py @@ -1,4 +1,4 @@ -""" +r""" The goal of this script is to reproduce some of the published results on the HyperGrid environment. Run one of the following commands to reproduce some of the results in [Trajectory balance: Improved credit assignment in GFlowNets](https://arxiv.org/abs/2201.13259)