Skip to content

Commit

Permalink
Reactivate docs (#842)
Browse files Browse the repository at this point in the history
* Reactivate docs

* Fix config.json

* basic fixes

* Spaces in paths

* Try path fix

* Temporarily drop most experiments

* Tweak config.json

* Drop problematic dependencies

* Try to get stuff to run?

* Tweak imports
  • Loading branch information
jeremiahpslewis authored Mar 15, 2023
1 parent 28a76e6 commit 29cdce8
Show file tree
Hide file tree
Showing 12 changed files with 75 additions and 71 deletions.
98 changes: 49 additions & 49 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,52 +144,52 @@ jobs:
Pkg.build("ReinforcementLearningExperiments")
Pkg.test("ReinforcementLearningExperiments")'
# docs:
# name: Documentation
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Setup python
# uses: actions/setup-python@v1
# with:
# python-version: ${{ matrix.python-version }}
# architecture: ${{ matrix.arch }}
# - run: python -m pip install --user matplotlib
# - uses: julia-actions/setup-julia@v1
# with:
# version: '1.8'
# - name: Build homepage
# run: |
# cd docs/homepage
# julia --project --color=yes -e '
# using Pkg; Pkg.instantiate();
# using NodeJS; run(`$(npm_cmd()) install highlight.js`);
# using Franklin;
# optimize()' > build.log

# - name: Make sure homepage is generated without error
# run: |
# if grep -1 "Franklin Warning" build.log; then
# echo "Franklin reported a warning"
# exit 1
# else
# echo "Franklin did not report a warning"
# fi

# - name: Build docs
# run: |
# cd docs
# julia --project --color=yes -e '
# using Pkg; Pkg.instantiate();
# include("make.jl")'
# mv build homepage/__site/docs

# - name: Deploy to the main repo
# uses: peaceiris/actions-gh-pages@v3
# if: ${{ github.event_name == 'push' }}
# with:
# deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
# external_repository: JuliaReinforcementLearning/JuliaReinforcementLearning.github.io
# force_orphan: true
# publish_branch: master
# publish_dir: ./docs/homepage/__site
docs:
name: Documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.arch }}
- run: python -m pip install --user matplotlib
- uses: julia-actions/setup-julia@v1
with:
version: '1.8'
- name: Build homepage
run: |
cd docs/homepage
julia --project --color=yes -e '
using Pkg; Pkg.instantiate();
using NodeJS; run(`$(npm_cmd()) install highlight.js`);
using Franklin;
optimize()' > build.log
- name: Make sure homepage is generated without error
run: |
if grep -1 "Franklin Warning" build.log; then
echo "Franklin reported a warning"
exit 1
else
echo "Franklin did not report a warning"
fi
- name: Build docs
run: |
cd docs
julia --project --color=yes -e '
using Pkg; Pkg.instantiate();
include("make.jl")'
mv build homepage/__site/docs
- name: Deploy to the main repo
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' }}
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }}
external_repository: JuliaReinforcementLearning/JuliaReinforcementLearning.github.io
force_orphan: true
publish_branch: main
publish_dir: ./docs/homepage/__site
1 change: 1 addition & 0 deletions Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Reexport = "189a3867-3050-52da-a836-e630ba90ab69"
ReinforcementLearningBase = "e575027e-6cd6-5018-9292-cdc6200d2b44"
ReinforcementLearningCore = "de1b191a-4ae0-4afa-a27b-92d07f46b2d6"
ReinforcementLearningDatasets = "dd1544ca-2576-438c-a599-ae96278fd687"
ReinforcementLearningEnvironments = "25e41dd2-4622-11e9-1641-f1adca772921"
ReinforcementLearningZoo = "d607f57d-ee1e-4ba7-bcf2-7734c1e31854"

Expand Down
6 changes: 0 additions & 6 deletions docs/Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ DemoCards = "311a05b2-6137-4a5a-b473-18580a3d38b5"
Distributions = "31c24e10-a181-5473-b8eb-7969acd0382f"
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
Flux = "587475ba-b771-5e3f-ad9e-33799f191a9c"
GridWorlds = "e15a9946-cd7f-4d03-83e2-6c30bacb0043"
ImageTransformations = "02fcd773-0e25-5acc-982a-7f6622650795"
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953"
Expand All @@ -19,16 +18,11 @@ Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80"
PyPlot = "d330b81b-6aea-500a-939a-2ce795aea3ee"
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
ReinforcementLearning = "158674fc-8238-5cab-b5ba-03dfc80d1318"
ReinforcementLearningBase = "e575027e-6cd6-5018-9292-cdc6200d2b44"
ReinforcementLearningCore = "de1b191a-4ae0-4afa-a27b-92d07f46b2d6"
ReinforcementLearningDatasets = "dd1544ca-2576-438c-a599-ae96278fd687"
ReinforcementLearningEnvironments = "25e41dd2-4622-11e9-1641-f1adca772921"
ReinforcementLearningZoo = "d607f57d-ee1e-4ba7-bcf2-7734c1e31854"
Setfield = "efcf1570-3423-57d1-acb7-fd33fddbac46"
StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
TensorBoardLogger = "899adc3e-224a-11e9-021f-63837185c80f"

[compat]
GridWorlds = "0.5"
23 changes: 17 additions & 6 deletions docs/make.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using ReinforcementLearning
using ReinforcementLearningDatasets
# using ReinforcementLearning
# using ReinforcementLearningDatasets
using ReinforcementLearningCore, ReinforcementLearningBase, ReinforcementLearningZoo, ReinforcementLearningEnvironments
using Documenter
using Markdown
using DemoCards
Expand All @@ -15,7 +16,17 @@ end

exp_src_dir = joinpath(@__DIR__, "..", "src", "ReinforcementLearningExperiments", "deps", "experiments")
exp_dest_dir = joinpath(@__DIR__, "experiments")
cp(exp_src_dir, exp_dest_dir;force=true)
cp(exp_src_dir, exp_dest_dir; force=true)

# TODO: remove this as experiments are updated to run using latest RLCore
# NOTE: config.json needs to be updated as well
rm(joinpath(exp_dest_dir, "experiments", "CFR"), force=true, recursive=true)
rm(joinpath(exp_dest_dir, "experiments", "DQN"), force=true, recursive=true)
rm(joinpath(exp_dest_dir, "experiments", "ED"), force=true, recursive=true)
rm(joinpath(exp_dest_dir, "experiments", "NFSP"), force=true, recursive=true)
rm(joinpath(exp_dest_dir, "experiments", "Offline"), force=true, recursive=true)
rm(joinpath(exp_dest_dir, "experiments", "Policy Gradient"), force=true, recursive=true)
# rm(joinpath(exp_dest_dir, "experiments", "Search"), force=true, recursive=true)

experiments, postprocess_cb, experiments_assets = makedemos("experiments")

Expand All @@ -27,12 +38,12 @@ assets = [

makedocs(
modules = [
ReinforcementLearning,
# ReinforcementLearning,
ReinforcementLearningBase,
ReinforcementLearningCore,
ReinforcementLearningEnvironments,
ReinforcementLearningZoo,
ReinforcementLearningDatasets,
# ReinforcementLearningDatasets,
],
format = Documenter.HTML(
prettyurls = true,
Expand All @@ -52,7 +63,7 @@ makedocs(
"Episodic vs. Non-episodic environments" => "non_episodic.md",
],
"Zoo Algorithms" => [
"MPO" => "src/Zoo Algorithms/MPO.md"
"MPO" => "Zoo_Algorithms/MPO.md"
],
"FAQ" => "FAQ.md",
experiments,
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/ReinforcementLearningExperiments/deps/build.jl
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ for (root, dirs, files) in walkdir(joinpath(@__DIR__, "experiments"))
tangle(joinpath(root, f); informat="script", out_path=DEST_DIR)
end
end
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"JuliaRL_PrioritizedDQN_CartPole.jl",
"JuliaRL_DQN_MountainCar.jl",
"JuliaRL_IQN_CartPole.jl",
"JuliaRL_QRDQN_Cartpole.jl",
"JuliaRL_QRDQN_CartPole.jl",
"JuliaRL_REMDQN_CartPole.jl",
"JuliaRL_Rainbow_CartPole.jl",
"Dopamine_DQN_Atari.jl",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# ---
# title: GenDataset\_BasicDQN\_CartPole
# cover: assets/logo.svg
# description: Collect CartPole dataset generated by BasicDQN
# date: 2021-09-17
# author: "[Guoyu Yang](https://github.com/pilgrimygy)"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# ---
# title: GenDataset\_SAC\_Pendulum
# cover: assets/logo.svg
# description: Collect Pendulum dataset generated by SAC
# date: 2021-09-17
# author: "[Guoyu Yang](https://github.com/pilgrimygy)"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# ---
# title: JuliaRL\_MPO\_Cartpole
# cover:
# cover: assets/logo.svg
# description: Solving Cartpole with MPO with a Discrete or a Continuous action space.
# date: 2022-12-20
# author: "[Henri Dehaybe](https://github.com/HenriDeh)"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"JuliaRL_TD3_Pendulum.jl",
"JuliaRL_VMPO_CartPole.jl",
"JuliaRL_VPG_CartPole.jl",
"JuliaRL_MPO_CartPole.jl",
"JuliaRL_TRPO_CartPole.jl",
"rlpyt_A2C_Atari.jl",
"rlpyt_PPO_Atari.jl"
]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
{
"order": [
"DQN",
"Policy Gradient",
"Offline",
"Search",
"CFR",
"NFSP",
"ED"
"Search"
]
}

0 comments on commit 29cdce8

Please sign in to comment.