diff --git a/Artifacts.toml b/Artifacts.toml index e1a3f6961d64bfa3d8f1823d8e78b68666a64e19..ef6feeb208a4afe4c6498c80d0d94e62c22377fc 100644 --- a/Artifacts.toml +++ b/Artifacts.toml @@ -1,3 +1,19 @@ +[20230311] +git-tree-sha1 = "bd21d3575d436576f40116304d31f75ac1026c0f" +lazy = true + + [[20230311.download]] + url = "https://gitlab.pasteur.fr/nyx/artefacts/-/raw/ef0f4de04620a87c15c7855c192f76731bd603ec/MaggotUBA/20230311.tar.gz?inline=false" + sha256 = "9cb79c0d75e883e1bb80904fb3bacf030758cadfbd874d627c46554b5eafaf51" + +[20230311-0] +git-tree-sha1 = "0790eefe8b0990622aa91b6ffdff9cbf862c983f" +lazy = true + + [[20230311-0.download]] + url = "https://gitlab.pasteur.fr/nyx/artefacts/-/raw/ef0f4de04620a87c15c7855c192f76731bd603ec/MaggotUBA/20230311-0.tar.gz?inline=false" + sha256 = "e7405cf9a6bda62422f89dcf8edd651a7b11164ac53d13d214e06b1d612802d3" + [20230524-6behaviors-25-0] git-tree-sha1 = "361d2ecebbd74f0dbc7840f06db2aa8c2b3293c6" lazy = true diff --git a/scripts/make_models.jl b/scripts/make_models.jl index 1cc5d9d8cdc891d853d216c99f6940ac9f67586c..dff70ce92641cc27d32c40edb2e4816be0e314dd 100755 --- a/scripts/make_models.jl +++ b/scripts/make_models.jl @@ -10,7 +10,7 @@ using LazyArtifacts projectdir = dirname(Base.active_project()) function pretrained_models(name) - artifact = @artifact_str("$name") + artifact = @artifact_str(name) src = @artifact_str("$name/pretrained_models") dst = mkpath(joinpath(projectdir, "pretrained_models")) for filename in readdir(src; join=false) @@ -19,9 +19,19 @@ function pretrained_models(name) rm(artifact; recursive=true, force=true) end +function models(name) + src = artifact = @artifact_str(name) + dst = mkpath(joinpath(projectdir, "models")) + for filename in readdir(src; join=false) + mv(joinpath(src, filename), joinpath(dst, filename)) + end + rm(artifact; recursive=true, force=true) + @assert isdir(joinpath(dst, name)) +end + function main(args=ARGS) if isempty(args) - print("missing model name") + print("missing pretrained model name") exit() elseif length(args) == 1 && args[1] == "default" args = ["20230524-6behaviors-25", "20230524-hunch-25", "20230524-roll-25"] @@ -32,6 +42,9 @@ function main(args=ARGS) for arg in args pretrained_models(arg) end + for arg in ("20230311", "20230311-0") + models(arg) + end end main()