Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Fluxbot #278

Merged
merged 18 commits into from
Feb 5, 2021
152 changes: 152 additions & 0 deletions .fluxbot/Manifest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
# This file is machine-generated - editing it directly is not advised

[[Artifacts]]
deps = ["Pkg"]
git-tree-sha1 = "c30985d8821e0cd73870b17b0ed0ce6dc44cb744"
uuid = "56f22d72-fd6d-98f1-02f0-08ddc0907c33"
version = "1.3.0"

[[Base64]]
uuid = "2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"

[[Dates]]
deps = ["Printf"]
uuid = "ade2ca70-3891-5945-98fb-dc099432e06a"

[[Distributed]]
deps = ["Random", "Serialization", "Sockets"]
uuid = "8ba89e20-285c-5b6f-9357-94700520ee1b"

[[FluxBot]]
deps = ["GitHub", "Glob", "Pkg", "Sockets"]
git-tree-sha1 = "7c5fedc22b3e9ca4d7e891c43f91df382bded7d5"
repo-rev = "zoo"
repo-url = "https://github.com/dhairyagandhi96/FluxBot.jl"
uuid = "352bd040-0f98-11ea-1faf-6f930ca83554"
version = "0.1.0"

[[GitHub]]
deps = ["Base64", "Dates", "HTTP", "JSON", "MbedTLS", "Sockets", "SodiumSeal"]
git-tree-sha1 = "a4f61fc1b1724e6eec1d9333eac2d4b01d8fcc8f"
uuid = "bc5e4493-9b4d-5f90-b8aa-2b2bcaad7a26"
version = "5.4.0"

[[Glob]]
git-tree-sha1 = "4df9f7e06108728ebf00a0a11edee4b29a482bb2"
uuid = "c27321d9-0574-5035-807b-f59d2c89b15c"
version = "1.3.0"

[[HTTP]]
deps = ["Base64", "Dates", "IniFile", "MbedTLS", "Sockets", "URIs"]
git-tree-sha1 = "63055ee44b5c2b95ec1921edcf856c60124ff0c3"
uuid = "cd3eb016-35fb-5094-929b-558a96fad6f3"
version = "0.9.2"

[[IniFile]]
deps = ["Test"]
git-tree-sha1 = "098e4d2c533924c921f9f9847274f2ad89e018b8"
uuid = "83e8ac13-25f8-5344-8a64-a9f2b223428f"
version = "0.5.0"

[[InteractiveUtils]]
deps = ["Markdown"]
uuid = "b77e0a4c-d291-57a0-90e8-8db25a27a240"

[[JLLWrappers]]
git-tree-sha1 = "a431f5f2ca3f4feef3bd7a5e94b8b8d4f2f647a0"
uuid = "692b3bcd-3c85-4b1f-b108-f13ce0eb3210"
version = "1.2.0"

[[JSON]]
deps = ["Dates", "Mmap", "Parsers", "Unicode"]
git-tree-sha1 = "81690084b6198a2e1da36fcfda16eeca9f9f24e4"
uuid = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
version = "0.21.1"

[[LibGit2]]
deps = ["Printf"]
uuid = "76f85450-5226-5b5a-8eaa-529ad045b433"

[[Libdl]]
uuid = "8f399da3-3557-5675-b5ff-fb832c97cbdb"

[[Logging]]
uuid = "56ddb016-857b-54e1-b83d-db4d58db5568"

[[Markdown]]
deps = ["Base64"]
uuid = "d6f4376e-aef5-505a-96c1-9c027394607a"

[[MbedTLS]]
deps = ["Dates", "MbedTLS_jll", "Random", "Sockets"]
git-tree-sha1 = "1c38e51c3d08ef2278062ebceade0e46cefc96fe"
uuid = "739be429-bea8-5141-9913-cc70e7f3736d"
version = "1.0.3"

[[MbedTLS_jll]]
deps = ["Artifacts", "JLLWrappers", "Libdl", "Pkg"]
git-tree-sha1 = "0eef589dd1c26a3ac9d753fe1a8bcad63f956fa6"
uuid = "c8ffd9c3-330d-5841-b78e-0817d7145fa1"
version = "2.16.8+1"

[[Mmap]]
uuid = "a63ad114-7e13-5084-954f-fe012c677804"

[[Parsers]]
deps = ["Dates"]
git-tree-sha1 = "50c9a9ed8c714945e01cd53a21007ed3865ed714"
uuid = "69de0a69-1ddd-5017-9359-2bf0b02dc9f0"
version = "1.0.15"

[[Pkg]]
deps = ["Dates", "LibGit2", "Libdl", "Logging", "Markdown", "Printf", "REPL", "Random", "SHA", "UUIDs"]
uuid = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"

[[Printf]]
deps = ["Unicode"]
uuid = "de0858da-6303-5e67-8744-51eddeeeb8d7"

[[REPL]]
deps = ["InteractiveUtils", "Markdown", "Sockets"]
uuid = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb"

[[Random]]
deps = ["Serialization"]
uuid = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"

[[SHA]]
uuid = "ea8e919c-243c-51af-8825-aaa63cd721ce"

[[Serialization]]
uuid = "9e88b42a-f829-5b0c-bbe9-9e923198166b"

[[Sockets]]
uuid = "6462fe0b-24de-5631-8697-dd941f90decc"

[[SodiumSeal]]
deps = ["Base64", "Libdl", "libsodium_jll"]
git-tree-sha1 = "80cef67d2953e33935b41c6ab0a178b9987b1c99"
uuid = "2133526b-2bfb-4018-ac12-889fb3908a75"
version = "0.1.1"

[[Test]]
deps = ["Distributed", "InteractiveUtils", "Logging", "Random"]
uuid = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[[URIs]]
git-tree-sha1 = "7855809b88d7b16e9b029afd17880930626f54a2"
uuid = "5c2747f8-b7ea-4ff2-ba2e-563bfd36b1d4"
version = "1.2.0"

[[UUIDs]]
deps = ["Random", "SHA"]
uuid = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"

[[Unicode]]
uuid = "4ec0a83e-493e-50e2-b9ac-8f72acf5a8f5"

[[libsodium_jll]]
deps = ["Libdl", "Pkg"]
git-tree-sha1 = "7127f5f40332ccfa43ee07dcd0c4d81a27d9bb23"
uuid = "a9144af2-ca23-56d9-984f-0d03f7b5ccf8"
version = "1.0.18+1"
2 changes: 2 additions & 0 deletions .fluxbot/Project.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[deps]
FluxBot = "352bd040-0f98-11ea-1faf-6f930ca83554"
28 changes: 28 additions & 0 deletions .github/workflows/fluxbot.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: FluxBot

on:
issue_comment:
types: [created, edited]

jobs:
build:
if: contains(github.event.comment.body, '@ModelZookeeper')
runs-on: ${{ matrix.os }}
strategy:
matrix:
julia-version: [1.5.0]
julia-arch: [x86]
os: [ubuntu-latest]
steps:
- uses: actions/checkout@af513c7a016048ae468971c52ed77d9562c7c819 # v1.0.0
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.julia-version }}
- name: Install dependencies
run: julia --project=.fluxbot/ -e 'using Pkg; Pkg.instantiate()'
- name: FluxBot.respond
env:
FLUXBOT_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BOT_SECRET: ${{ secrets.BOT_SECRET }}
MODELZOO_TRIGGER_TOKEN: ${{ secrets.MODELZOO_TRIGGER_TOKEN }}
run: julia --project=.fluxbot -e 'using FluxBot; FluxBot.trial()'
39 changes: 37 additions & 2 deletions script/Notebooks.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,47 @@
[MNIST]
path = "vision/mnist"
notebook = "mlp.jl"
deps = ["vae.jl"]
notebook = ["mlp.jl", "autoencoder.jl", "vae.jl"]

[CIFAR10]
path = "vision/cifar10"
notebook = "cifar10.jl"

[char-rnn]
path = "text/char-rnn"
notebook = "char-rnn.jl"

[lang-detection]
path = "text/lang-detection"
notebook = "model.jl"
deps = ["scrape.jl"]

[phonemes]
path = "text/phonemes"
notebook = "1-model.jl"
deps = ["0-data.jl"]

[treebank]
path = "text/treebank"
notebook = "recursive.jl"
deps = ["data.jl"]

[diffeq]
path = "other/diffeq"
notebook = "diffeq.jl"

#[bitstring-parity]
#path = "other/bitstring-parity"
#notebook = ["xor1.jl", "xor2.jl", "xor3.jl"]
#deps = "data.jl"

[fizzbuzz]
path = "other/fizzbuzz"
notebook = "fizzbuzz.jl"

[housing]
path = "other/housing"
notebook = "housing.jl"

[tutorials]
path="tutorials"
notebook="60-minute-blitz.jl"
14 changes: 13 additions & 1 deletion script/convert.jl
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,17 @@ Pkg.activate(joinpath(root, "notebooks", path))

using Literate

function postprocess_nb(content)
content = replace(content, r"\s*using CUDA" => "## using CUDA")
return content
end

function preprocess_nb(content)
content = replace(content, r"#\s*using CUDA" => "using CUDA")
content = "using Pkg; Pkg.activate(\".\"); Pkg.instantiate();\n\n" * content
return content
end

function init_nb(content)
content = "using Pkg; Pkg.activate(\"$root\"); Pkg.status();\n\n" * content
return content
Expand All @@ -34,7 +45,8 @@ scripts isa String && (scripts = [scripts])
for script in scripts
Literate.notebook(joinpath(root, path, script),
joinpath(root, "notebooks", path),
credit = false, preprocess = init_nb)
credit = false, preprocess = preprocess_nb,
postprocess = postprocess_nb)
end

scripts = map(x -> x[1:end - 3] * ".ipynb", scripts)
Expand Down
1 change: 1 addition & 0 deletions script/notebook.jl
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
using Pkg
Pkg.activate(@__DIR__)
Pkg.instantiate()

using Pkg.TOML
meta = length(ARGS) > 0 ? ARGS :
Expand Down