text:
export d4rl_policy_params

function d4rl_policy_params()
    d4rl_policy_paths = [split(policy["policy_path"], "/")[2] for policy in D4RL_POLICIES]
    env = Set(join.(map(x->x[1:end-2], split.(d4rl_policy_paths, "_")), "_"))
    agent = ["dapg", "online"]
    epoch = 0:10

    @info env agent epoch
end

const D4RL_POLICIES = [
    Dict(
        "policy_path" => "antmaze_large/antmaze_large_dapg_0.pkl",
        "task.task_names" => [
            "antmaze-large-play-v0",
            "antmaze-large-diverse-v0"
        ],
        "agent_name" => "BC",
        "return_mean" => 0.0,
        "return_std =>" => 0.0
    ),
    Dict(
        "policy_path" => "antmaze_large/antmaze_large_dapg_10.pkl",
        "task.task_names" => [
            "antmaze-large-play-v0",
            "antmaze-large-diverse-v0"
        ],
        "agent_name" => "BC",
        "return_mean" => 0.48,
        "return_std =>" => 0.4995998398718718
    ),
    Dict(
        "policy_path" => "antmaze_large/antmaze_large_dapg_1.pkl",
        "task.task_names" => [
            "antmaze-large-play-v0",
            "antmaze-large-diverse-v0"
        ],
        "agent_name" => "BC",
        "return_mean" => 0.0,
        "return_std =>" => 0.0
    ),
    Dict(
        "policy_path" => "antmaze_large/antmaze_large_dapg_2.pkl",
        "task.task_names" => [
            "antmaze-large-play-v0",
            "antmaze-large-diverse-v0"
        ],
        "agent_name" => "BC",
        "return_mean" => 0.0,
        "return_std =>" => 0.0
    ),
    Dict(
        "policy_path" => "antmaze_large/antmaze_large_dapg_3.pkl",
        "task.task_names" => [
            "antmaze-large-play-v0",
            "antmaze-large-diverse-v0"
        ],
        "agent_name" => "BC",
        "return_mean" => 0.0,
        "return_std =>" => 0.0
    ),
    Dict(
        "policy_path" => "antmaze_large/antmaze_large_dapg_4.pkl",
        "task.task_names" => [
            "antmaze-large-play-v0",
            "antmaze-large-diverse-v0"
        ],
        "agent_name" => "BC",
        "return_mean" => 0.01,
        "return_std =>" => 0.09949874371066199
    ),
    Dict(
        "policy_path" => "antmaze_large/antmaze_large_dapg_5.pkl",
        "task.task_names" => [
            "antmaze-large-play-v0",
            "antmaze-large-diverse-v0"
        ],
        "agent_name" => "BC",
        "return_mean" => 0.13,
        "return_std =>" => 0.33630343441600474
    ),
    Dict(
        "policy_path" => "antmaze_large/antmaze_large_dapg_6.pkl",
        "task.task_names" => [
            "antmaze-large-play-v0",
            "antmaze-large-diverse-v0"
        ],
        "agent_name" => "BC",
        "return_mean" => 0.22,
        "return_std =>" => 0.41424630354415964
    ),
    Dict(
        "policy_path" => "antmaze_large/antmaze_large_dapg_7.pkl",
        "task.task_names" => [
            "antmaze-large-play-v0",
            "antmaze-large-diverse-v0"
        ],
        "agent_name" => "BC",
        "return_mean" => 0.12,
        "return_std =>" => 0.32496153618543844
    ),
    Dict(
        "policy_path" => "antmaze_large/antmaze_large_dapg_8.pkl",
        "task.task_names" => [
            "antmaze-large-play-v0",
            "antmaze-large-diverse-v0"
        ],
        "agent_name" => "BC",
        "return_mean" => 0.39,
        "return_std =>" => 0.487749935930288
    ),
    Dict(
        "policy_path" => "antmaze_large/antmaze_large_dapg_9.pkl",
        "task.task_names" => [
            "antmaze-large-play-v0",
            "antmaze-large-diverse-v0"
        ],
        "agent_name" => "BC",
        "return_mean" => 0.49,
        "return_std =>" => 0.4998999899979995
    ),
    Dict(
        "policy_path" => "antmaze_medium/antmaze_medium_dapg_0.pkl",
        "task.task_names" => [
            "antmaze-medium-play-v0",
            "antmaze-medium-diverse-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.66,
        "return_std =>" => 0.4737087712930805
    ),
    Dict(
        "policy_path" => "antmaze_medium/antmaze_medium_dapg_10.pkl",
        "task.task_names" => [
            "antmaze-medium-play-v0",
            "antmaze-medium-diverse-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.12,
        "return_std =>" => 0.32496153618543844
    ),
    Dict(
        "policy_path" => "antmaze_medium/antmaze_medium_dapg_1.pkl",
        "task.task_names" => [
            "antmaze-medium-play-v0",
            "antmaze-medium-diverse-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.53,
        "return_std =>" => 0.49909918853871116
    ),
    Dict(
        "policy_path" => "antmaze_medium/antmaze_medium_dapg_2.pkl",
        "task.task_names" => [
            "antmaze-medium-play-v0",
            "antmaze-medium-diverse-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.66,
        "return_std =>" => 0.4737087712930805
    ),
    Dict(
        "policy_path" => "antmaze_medium/antmaze_medium_dapg_3.pkl",
        "task.task_names" => [
            "antmaze-medium-play-v0",
            "antmaze-medium-diverse-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.57,
        "return_std =>" => 0.49507575177946245
    ),
    Dict(
        "policy_path" => "antmaze_medium/antmaze_medium_dapg_4.pkl",
        "task.task_names" => [
            "antmaze-medium-play-v0",
            "antmaze-medium-diverse-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.58,
        "return_std =>" => 0.49355850717012273
    ),
    Dict(
        "policy_path" => "antmaze_medium/antmaze_medium_dapg_5.pkl",
        "task.task_names" => [
            "antmaze-medium-play-v0",
            "antmaze-medium-diverse-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.42,
        "return_std =>" => 0.49355850717012273
    ),
    Dict(
        "policy_path" => "antmaze_medium/antmaze_medium_dapg_6.pkl",
        "task.task_names" => [
            "antmaze-medium-play-v0",
            "antmaze-medium-diverse-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.45,
        "return_std =>" => 0.49749371855331004
    ),
    Dict(
        "policy_path" => "antmaze_medium/antmaze_medium_dapg_7.pkl",
        "task.task_names" => [
            "antmaze-medium-play-v0",
            "antmaze-medium-diverse-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.27,
        "return_std =>" => 0.4439594576084623
    ),
    Dict(
        "policy_path" => "antmaze_medium/antmaze_medium_dapg_8.pkl",
        "task.task_names" => [
            "antmaze-medium-play-v0",
            "antmaze-medium-diverse-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.1,
        "return_std =>" => 0.29999999999999993
    ),
    Dict(
        "policy_path" => "antmaze_medium/antmaze_medium_dapg_9.pkl",
        "task.task_names" => [
            "antmaze-medium-play-v0",
            "antmaze-medium-diverse-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.15,
        "return_std =>" => 0.3570714214271425
    ),
    Dict(
        "policy_path" => "antmaze_umaze/antmaze_umaze_dapg_0.pkl",
        "task.task_names" => [
            "antmaze-umaze-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.11,
        "return_std =>" => 0.31288975694324034
    ),
    Dict(
        "policy_path" => "antmaze_umaze/antmaze_umaze_dapg_10.pkl",
        "task.task_names" => [
            "antmaze-umaze-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.84,
        "return_std =>" => 0.36660605559646725
    ),
    Dict(
        "policy_path" => "antmaze_umaze/antmaze_umaze_dapg_1.pkl",
        "task.task_names" => [
            "antmaze-umaze-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.15,
        "return_std =>" => 0.3570714214271425
    ),
    Dict(
        "policy_path" => "antmaze_umaze/antmaze_umaze_dapg_2.pkl",
        "task.task_names" => [
            "antmaze-umaze-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.08,
        "return_std =>" => 0.2712931993250107
    ),
    Dict(
        "policy_path" => "antmaze_umaze/antmaze_umaze_dapg_3.pkl",
        "task.task_names" => [
            "antmaze-umaze-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.13,
        "return_std =>" => 0.33630343441600474
    ),
    Dict(
        "policy_path" => "antmaze_umaze/antmaze_umaze_dapg_4.pkl",
        "task.task_names" => [
            "antmaze-umaze-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.19,
        "return_std =>" => 0.3923009049186606
    ),
    Dict(
        "policy_path" => "antmaze_umaze/antmaze_umaze_dapg_5.pkl",
        "task.task_names" => [
            "antmaze-umaze-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.27,
        "return_std =>" => 0.4439594576084623
    ),
    Dict(
        "policy_path" => "antmaze_umaze/antmaze_umaze_dapg_6.pkl",
        "task.task_names" => [
            "antmaze-umaze-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.41,
        "return_std =>" => 0.4918333050943175
    ),
    Dict(
        "policy_path" => "antmaze_umaze/antmaze_umaze_dapg_7.pkl",
        "task.task_names" => [
            "antmaze-umaze-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.66,
        "return_std =>" => 0.4737087712930805
    ),
    Dict(
        "policy_path" => "antmaze_umaze/antmaze_umaze_dapg_8.pkl",
        "task.task_names" => [
            "antmaze-umaze-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.72,
        "return_std =>" => 0.4489988864128729
    ),
    Dict(
        "policy_path" => "antmaze_umaze/antmaze_umaze_dapg_9.pkl",
        "task.task_names" => [
            "antmaze-umaze-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 0.45,
        "return_std =>" => 0.49749371855331
    ),
    Dict(
        "policy_path" => "ant/ant_online_0.pkl",
        "task.task_names" => [
            "ant-medium-v0",
            "ant-random-v0",
            "ant-expert-v0",
            "ant-medium-replay-v0",
            "ant-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => -61.02055183305979,
        "return_std =>" => 118.86259895376526
    ),
    Dict(
        "policy_path" => "ant/ant_online_10.pkl",
        "task.task_names" => [
            "ant-medium-v0",
            "ant-random-v0",
            "ant-expert-v0",
            "ant-medium-replay-v0",
            "ant-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 5226.071929273204,
        "return_std =>" => 1351.489114884685
    ),
    Dict(
        "policy_path" => "ant/ant_online_1.pkl",
        "task.task_names" => [
            "ant-medium-v0",
            "ant-random-v0",
            "ant-expert-v0",
            "ant-medium-replay-v0",
            "ant-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 1128.957315814236,
        "return_std =>" => 545.9910621405912
    ),
    Dict(
        "policy_path" => "ant/ant_online_2.pkl",
        "task.task_names" => [
            "ant-medium-v0",
            "ant-random-v0",
            "ant-expert-v0",
            "ant-medium-replay-v0",
            "ant-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 1874.9426222623788,
        "return_std =>" => 821.523301172575
    ),
    Dict(
        "policy_path" => "ant/ant_online_3.pkl",
        "task.task_names" => [
            "ant-medium-v0",
            "ant-random-v0",
            "ant-expert-v0",
            "ant-medium-replay-v0",
            "ant-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 2694.0050365558186,
        "return_std =>" => 829.1251729756312
    ),
    Dict(
        "policy_path" => "ant/ant_online_4.pkl",
        "task.task_names" => [
            "ant-medium-v0",
            "ant-random-v0",
            "ant-expert-v0",
            "ant-medium-replay-v0",
            "ant-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 2927.728155987557,
        "return_std =>" => 1218.962159178784
    ),
    Dict(
        "policy_path" => "ant/ant_online_5.pkl",
        "task.task_names" => [
            "ant-medium-v0",
            "ant-random-v0",
            "ant-expert-v0",
            "ant-medium-replay-v0",
            "ant-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => -271.0455967662947,
        "return_std =>" => 181.7343490946006
    ),
    Dict(
        "policy_path" => "ant/ant_online_6.pkl",
        "task.task_names" => [
            "ant-medium-v0",
            "ant-random-v0",
            "ant-expert-v0",
            "ant-medium-replay-v0",
            "ant-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 3923.0820284011284,
        "return_std =>" => 1384.459574872169
    ),
    Dict(
        "policy_path" => "ant/ant_online_7.pkl",
        "task.task_names" => [
            "ant-medium-v0",
            "ant-random-v0",
            "ant-expert-v0",
            "ant-medium-replay-v0",
            "ant-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 4564.024787293475,
        "return_std =>" => 1207.181426135141
    ),
    Dict(
        "policy_path" => "ant/ant_online_8.pkl",
        "task.task_names" => [
            "ant-medium-v0",
            "ant-random-v0",
            "ant-expert-v0",
            "ant-medium-replay-v0",
            "ant-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 5116.58562094113,
        "return_std =>" => 962.8694737383373
    ),
    Dict(
        "policy_path" => "ant/ant_online_9.pkl",
        "task.task_names" => [
            "ant-medium-v0",
            "ant-random-v0",
            "ant-expert-v0",
            "ant-medium-replay-v0",
            "ant-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 5176.548960934259,
        "return_std =>" => 1000.122269767824
    ),
    Dict(
        "policy_path" => "door/door_dapg_0.pkl",
        "task.task_names" => [
            "door-cloned-v0",
            "door-expert-v0",
            "door-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => -53.63337645679012,
        "return_std =>" => 2.0058239428094895
    ),
    Dict(
        "policy_path" => "door/door_dapg_10.pkl",
        "task.task_names" => [
            "door-cloned-v0",
            "door-expert-v0",
            "door-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 2974.9306587121887,
        "return_std =>" => 52.48250668645121
    ),
    Dict(
        "policy_path" => "door/door_dapg_1.pkl",
        "task.task_names" => [
            "door-cloned-v0",
            "door-expert-v0",
            "door-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => -51.41658735064874,
        "return_std =>" => 0.6978335854285623
    ),
    Dict(
        "policy_path" => "door/door_dapg_2.pkl",
        "task.task_names" => [
            "door-cloned-v0",
            "door-expert-v0",
            "door-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 86.28632719532406,
        "return_std =>" => 256.30747202806475
    ),
    Dict(
        "policy_path" => "door/door_dapg_3.pkl",
        "task.task_names" => [
            "door-cloned-v0",
            "door-expert-v0",
            "door-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 1282.0275007615646,
        "return_std =>" => 633.9669441391286
    ),
    Dict(
        "policy_path" => "door/door_dapg_4.pkl",
        "task.task_names" => [
            "door-cloned-v0",
            "door-expert-v0",
            "door-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 1607.4255566289276,
        "return_std =>" => 499.58651630841575
    ),
    Dict(
        "policy_path" => "door/door_dapg_5.pkl",
        "task.task_names" => [
            "door-cloned-v0",
            "door-expert-v0",
            "door-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 2142.36638691816,
        "return_std =>" => 442.0537003890031
    ),
    Dict(
        "policy_path" => "door/door_dapg_6.pkl",
        "task.task_names" => [
            "door-cloned-v0",
            "door-expert-v0",
            "door-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 2525.495218483574,
        "return_std =>" => 160.8683834534215
    ),
    Dict(
        "policy_path" => "door/door_dapg_7.pkl",
        "task.task_names" => [
            "door-cloned-v0",
            "door-expert-v0",
            "door-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 2794.653907232321,
        "return_std =>" => 62.78226619278986
    ),
    Dict(
        "policy_path" => "door/door_dapg_8.pkl",
        "task.task_names" => [
            "door-cloned-v0",
            "door-expert-v0",
            "door-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 2870.85173247603,
        "return_std =>" => 37.96052715176604
    ),
    Dict(
        "policy_path" => "door/door_dapg_9.pkl",
        "task.task_names" => [
            "door-cloned-v0",
            "door-expert-v0",
            "door-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 2959.4718836123457,
        "return_std =>" => 53.31391818495784
    ),
    Dict(
        "policy_path" => "halfcheetah/halfcheetah_online_0.pkl",
        "task.task_names" => [
            "halfcheetah-medium-v0",
            "halfcheetah-random-v0",
            "halfcheetah-expert-v0",
            "halfcheetah-medium-replay-v0",
            "halfcheetah-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => -309.2417932614121,
        "return_std =>" => 91.3640277992432
    ),
    Dict(
        "policy_path" => "halfcheetah/halfcheetah_online_10.pkl",
        "task.task_names" => [
            "halfcheetah-medium-v0",
            "halfcheetah-random-v0",
            "halfcheetah-expert-v0",
            "halfcheetah-medium-replay-v0",
            "halfcheetah-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 12695.696030461002,
        "return_std =>" => 209.98612023443096
    ),
    Dict(
        "policy_path" => "halfcheetah/halfcheetah_online_1.pkl",
        "task.task_names" => [
            "halfcheetah-medium-v0",
            "halfcheetah-random-v0",
            "halfcheetah-expert-v0",
            "halfcheetah-medium-replay-v0",
            "halfcheetah-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 5686.148033603298,
        "return_std =>" => 77.60317050580818
    ),
    Dict(
        "policy_path" => "halfcheetah/halfcheetah_online_2.pkl",
        "task.task_names" => [
            "halfcheetah-medium-v0",
            "halfcheetah-random-v0",
            "halfcheetah-expert-v0",
            "halfcheetah-medium-replay-v0",
            "halfcheetah-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 6898.252473142946,
        "return_std =>" => 131.2808199171071
    ),
    Dict(
        "policy_path" => "halfcheetah/halfcheetah_online_3.pkl",
        "task.task_names" => [
            "halfcheetah-medium-v0",
            "halfcheetah-random-v0",
            "halfcheetah-expert-v0",
            "halfcheetah-medium-replay-v0",
            "halfcheetah-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 7843.345957832609,
        "return_std =>" => 119.82879594969056
    ),
    Dict(
        "policy_path" => "halfcheetah/halfcheetah_online_4.pkl",
        "task.task_names" => [
            "halfcheetah-medium-v0",
            "halfcheetah-random-v0",
            "halfcheetah-expert-v0",
            "halfcheetah-medium-replay-v0",
            "halfcheetah-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 8661.367146815282,
        "return_std =>" => 142.1433195543218
    ),
    Dict(
        "policy_path" => "halfcheetah/halfcheetah_online_5.pkl",
        "task.task_names" => [
            "halfcheetah-medium-v0",
            "halfcheetah-random-v0",
            "halfcheetah-expert-v0",
            "halfcheetah-medium-replay-v0",
            "halfcheetah-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 9197.889639800613,
        "return_std =>" => 125.40543058761767
    ),
    Dict(
        "policy_path" => "halfcheetah/halfcheetah_online_6.pkl",
        "task.task_names" => [
            "halfcheetah-medium-v0",
            "halfcheetah-random-v0",
            "halfcheetah-expert-v0",
            "halfcheetah-medium-replay-v0",
            "halfcheetah-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 9623.789519132608,
        "return_std =>" => 130.91946985245835
    ),
    Dict(
        "policy_path" => "halfcheetah/halfcheetah_online_7.pkl",
        "task.task_names" => [
            "halfcheetah-medium-v0",
            "halfcheetah-random-v0",
            "halfcheetah-expert-v0",
            "halfcheetah-medium-replay-v0",
            "halfcheetah-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 10255.26711299773,
        "return_std =>" => 173.52116806555978
    ),
    Dict(
        "policy_path" => "halfcheetah/halfcheetah_online_8.pkl",
        "task.task_names" => [
            "halfcheetah-medium-v0",
            "halfcheetah-random-v0",
            "halfcheetah-expert-v0",
            "halfcheetah-medium-replay-v0",
            "halfcheetah-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 10899.460856799158,
        "return_std =>" => 324.2557642475202
    ),
    Dict(
        "policy_path" => "halfcheetah/halfcheetah_online_9.pkl",
        "task.task_names" => [
            "halfcheetah-medium-v0",
            "halfcheetah-random-v0",
            "halfcheetah-expert-v0",
            "halfcheetah-medium-replay-v0",
            "halfcheetah-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 11829.054827593913,
        "return_std =>" => 240.63510160394745
    ),
    Dict(
        "policy_path" => "hammer/hammer_dapg_0.pkl",
        "task.task_names" => [
            "hammer-cloned-v0",
            "hammer-expert-v0",
            "hammer-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => -236.37114898868305,
        "return_std =>" => 5.2941436284324075
    ),
    Dict(
        "policy_path" => "hammer/hammer_dapg_10.pkl",
        "task.task_names" => [
            "hammer-cloned-v0",
            "hammer-expert-v0",
            "hammer-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 17585.58837262877,
        "return_std =>" => 96.53489547795978
    ),
    Dict(
        "policy_path" => "hammer/hammer_dapg_1.pkl",
        "task.task_names" => [
            "hammer-cloned-v0",
            "hammer-expert-v0",
            "hammer-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 128.60395654435058,
        "return_std =>" => 30.68441678661929
    ),
    Dict(
        "policy_path" => "hammer/hammer_dapg_2.pkl",
        "task.task_names" => [
            "hammer-cloned-v0",
            "hammer-expert-v0",
            "hammer-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 7408.354956936379,
        "return_std =>" => 7294.096332941535
    ),
    Dict(
        "policy_path" => "hammer/hammer_dapg_3.pkl",
        "task.task_names" => [
            "hammer-cloned-v0",
            "hammer-expert-v0",
            "hammer-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 15594.112899701715,
        "return_std =>" => 197.28904701529942
    ),
    Dict(
        "policy_path" => "hammer/hammer_dapg_4.pkl",
        "task.task_names" => [
            "hammer-cloned-v0",
            "hammer-expert-v0",
            "hammer-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 16245.548923178216,
        "return_std =>" => 262.7060238728634
    ),
    Dict(
        "policy_path" => "hammer/hammer_dapg_5.pkl",
        "task.task_names" => [
            "hammer-cloned-v0",
            "hammer-expert-v0",
            "hammer-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 16595.136728219404,
        "return_std =>" => 124.5270089215883
    ),
    Dict(
        "policy_path" => "hammer/hammer_dapg_6.pkl",
        "task.task_names" => [
            "hammer-cloned-v0",
            "hammer-expert-v0",
            "hammer-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 17065.590900836418,
        "return_std =>" => 55.85140116556182
    ),
    Dict(
        "policy_path" => "hammer/hammer_dapg_7.pkl",
        "task.task_names" => [
            "hammer-cloned-v0",
            "hammer-expert-v0",
            "hammer-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 17209.380445590097,
        "return_std =>" => 35.922080086069116
    ),
    Dict(
        "policy_path" => "hammer/hammer_dapg_8.pkl",
        "task.task_names" => [
            "hammer-cloned-v0",
            "hammer-expert-v0",
            "hammer-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 17388.10343669515,
        "return_std =>" => 71.04818789434533
    ),
    Dict(
        "policy_path" => "hammer/hammer_dapg_9.pkl",
        "task.task_names" => [
            "hammer-cloned-v0",
            "hammer-expert-v0",
            "hammer-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 17565.807571496796,
        "return_std =>" => 83.22119300427666
    ),
    Dict(
        "policy_path" => "hopper/hopper_online_0.pkl",
        "task.task_names" => [
            "hopper-medium-v0",
            "hopper-random-v0",
            "hopper-expert-v0",
            "hopper-medium-replay-v0",
            "hopper-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 89.08207455972816,
        "return_std =>" => 45.69740377810402
    ),
    Dict(
        "policy_path" => "hopper/hopper_online_10.pkl",
        "task.task_names" => [
            "hopper-medium-v0",
            "hopper-random-v0",
            "hopper-expert-v0",
            "hopper-medium-replay-v0",
            "hopper-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 1290.7677147248753,
        "return_std =>" => 86.34701290680572
    ),
    Dict(
        "policy_path" => "hopper/hopper_online_1.pkl",
        "task.task_names" => [
            "hopper-medium-v0",
            "hopper-random-v0",
            "hopper-expert-v0",
            "hopper-medium-replay-v0",
            "hopper-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 1134.244611055915,
        "return_std =>" => 407.6547443287992
    ),
    Dict(
        "policy_path" => "hopper/hopper_online_2.pkl",
        "task.task_names" => [
            "hopper-medium-v0",
            "hopper-random-v0",
            "hopper-expert-v0",
            "hopper-medium-replay-v0",
            "hopper-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 727.0768143435397,
        "return_std =>" => 92.94955320157855
    ),
    Dict(
        "policy_path" => "hopper/hopper_online_3.pkl",
        "task.task_names" => [
            "hopper-medium-v0",
            "hopper-random-v0",
            "hopper-expert-v0",
            "hopper-medium-replay-v0",
            "hopper-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 1571.2810005160163,
        "return_std =>" => 447.3216244940128
    ),
    Dict(
        "policy_path" => "hopper/hopper_online_4.pkl",
        "task.task_names" => [
            "hopper-medium-v0",
            "hopper-random-v0",
            "hopper-expert-v0",
            "hopper-medium-replay-v0",
            "hopper-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 1140.2394986005213,
        "return_std =>" => 671.1379607505328
    ),
    Dict(
        "policy_path" => "hopper/hopper_online_5.pkl",
        "task.task_names" => [
            "hopper-medium-v0",
            "hopper-random-v0",
            "hopper-expert-v0",
            "hopper-medium-replay-v0",
            "hopper-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 1872.571834592923,
        "return_std =>" => 793.8865779126361
    ),
    Dict(
        "policy_path" => "hopper/hopper_online_6.pkl",
        "task.task_names" => [
            "hopper-medium-v0",
            "hopper-random-v0",
            "hopper-expert-v0",
            "hopper-medium-replay-v0",
            "hopper-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 3088.2017624993064,
        "return_std =>" => 356.52713477862386
    ),
    Dict(
        "policy_path" => "hopper/hopper_online_7.pkl",
        "task.task_names" => [
            "hopper-medium-v0",
            "hopper-random-v0",
            "hopper-expert-v0",
            "hopper-medium-replay-v0",
            "hopper-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 1726.0060438089222,
        "return_std =>" => 761.6326666292086
    ),
    Dict(
        "policy_path" => "hopper/hopper_online_8.pkl",
        "task.task_names" => [
            "hopper-medium-v0",
            "hopper-random-v0",
            "hopper-expert-v0",
            "hopper-medium-replay-v0",
            "hopper-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 2952.957468938808,
        "return_std =>" => 682.5831907733249
    ),
    Dict(
        "policy_path" => "hopper/hopper_online_9.pkl",
        "task.task_names" => [
            "hopper-medium-v0",
            "hopper-random-v0",
            "hopper-expert-v0",
            "hopper-medium-replay-v0",
            "hopper-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 2369.7998719150673,
        "return_std =>" => 1119.4914225331481
    ),
    Dict(
        "policy_path" => "maze2d_large/maze2d_large_dapg_0.pkl",
        "task.task_names" => [
            "maze2d-large-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 2.21,
        "return_std =>" => 8.873888662812938
    ),
    Dict(
        "policy_path" => "maze2d_large/maze2d_large_dapg_10.pkl",
        "task.task_names" => [
            "maze2d-large-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 627.86,
        "return_std =>" => 161.0254650668645
    ),
    Dict(
        "policy_path" => "maze2d_large/maze2d_large_dapg_1.pkl",
        "task.task_names" => [
            "maze2d-large-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 41.74,
        "return_std =>" => 72.2068722491149
    ),
    Dict(
        "policy_path" => "maze2d_large/maze2d_large_dapg_2.pkl",
        "task.task_names" => [
            "maze2d-large-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 124.9,
        "return_std =>" => 131.5638628195448
    ),
    Dict(
        "policy_path" => "maze2d_large/maze2d_large_dapg_3.pkl",
        "task.task_names" => [
            "maze2d-large-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 107.78,
        "return_std =>" => 109.32251186283638
    ),
    Dict(
        "policy_path" => "maze2d_large/maze2d_large_dapg_4.pkl",
        "task.task_names" => [
            "maze2d-large-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 289.46,
        "return_std =>" => 262.69070862898826
    ),
    Dict(
        "policy_path" => "maze2d_large/maze2d_large_dapg_5.pkl",
        "task.task_names" => [
            "maze2d-large-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 356.17,
        "return_std =>" => 276.9112151936068
    ),
    Dict(
        "policy_path" => "maze2d_large/maze2d_large_dapg_6.pkl",
        "task.task_names" => [
            "maze2d-large-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 393.87,
        "return_std =>" => 309.08651394067647
    ),
    Dict(
        "policy_path" => "maze2d_large/maze2d_large_dapg_7.pkl",
        "task.task_names" => [
            "maze2d-large-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 517.4,
        "return_std =>" => 274.58688970888613
    ),
    Dict(
        "policy_path" => "maze2d_large/maze2d_large_dapg_8.pkl",
        "task.task_names" => [
            "maze2d-large-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 565.42,
        "return_std =>" => 210.94450360225082
    ),
    Dict(
        "policy_path" => "maze2d_large/maze2d_large_dapg_9.pkl",
        "task.task_names" => [
            "maze2d-large-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 629.22,
        "return_std =>" => 123.23023817229276
    ),
    Dict(
        "policy_path" => "maze2d_medium/maze2d_medium_dapg_0.pkl",
        "task.task_names" => [
            "maze2d-medium-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 83.15,
        "return_std =>" => 177.59827561099797
    ),
    Dict(
        "policy_path" => "maze2d_medium/maze2d_medium_dapg_10.pkl",
        "task.task_names" => [
            "maze2d-medium-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 442.35,
        "return_std =>" => 161.2205554512203
    ),
    Dict(
        "policy_path" => "maze2d_medium/maze2d_medium_dapg_1.pkl",
        "task.task_names" => [
            "maze2d-medium-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 177.8,
        "return_std =>" => 218.1089635938881
    ),
    Dict(
        "policy_path" => "maze2d_medium/maze2d_medium_dapg_2.pkl",
        "task.task_names" => [
            "maze2d-medium-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 249.33,
        "return_std =>" => 237.2338110388146
    ),
    Dict(
        "policy_path" => "maze2d_medium/maze2d_medium_dapg_3.pkl",
        "task.task_names" => [
            "maze2d-medium-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 214.81,
        "return_std =>" => 246.09809812349224
    ),
    Dict(
        "policy_path" => "maze2d_medium/maze2d_medium_dapg_4.pkl",
        "task.task_names" => [
            "maze2d-medium-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 254.63,
        "return_std =>" => 262.0181541420365
    ),
    Dict(
        "policy_path" => "maze2d_medium/maze2d_medium_dapg_5.pkl",
        "task.task_names" => [
            "maze2d-medium-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 238.76,
        "return_std =>" => 260.3596404975241
    ),
    Dict(
        "policy_path" => "maze2d_medium/maze2d_medium_dapg_6.pkl",
        "task.task_names" => [
            "maze2d-medium-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 374.9,
        "return_std =>" => 222.18107480161314
    ),
    Dict(
        "policy_path" => "maze2d_medium/maze2d_medium_dapg_7.pkl",
        "task.task_names" => [
            "maze2d-medium-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 379.68,
        "return_std =>" => 228.59111443798514
    ),
    Dict(
        "policy_path" => "maze2d_medium/maze2d_medium_dapg_8.pkl",
        "task.task_names" => [
            "maze2d-medium-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 392.9,
        "return_std =>" => 217.99805044999832
    ),
    Dict(
        "policy_path" => "maze2d_medium/maze2d_medium_dapg_9.pkl",
        "task.task_names" => [
            "maze2d-medium-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 432.03,
        "return_std =>" => 173.93714123211294
    ),
    Dict(
        "policy_path" => "maze2d_umaze/maze2d_umaze_dapg_0.pkl",
        "task.task_names" => [
            "maze2d-umaze-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 22.19,
        "return_std =>" => 25.18320670605711
    ),
    Dict(
        "policy_path" => "maze2d_umaze/maze2d_umaze_dapg_10.pkl",
        "task.task_names" => [
            "maze2d-umaze-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 250.64,
        "return_std =>" => 36.357810715168206
    ),
    Dict(
        "policy_path" => "maze2d_umaze/maze2d_umaze_dapg_1.pkl",
        "task.task_names" => [
            "maze2d-umaze-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 43.33,
        "return_std =>" => 66.01621846182951
    ),
    Dict(
        "policy_path" => "maze2d_umaze/maze2d_umaze_dapg_2.pkl",
        "task.task_names" => [
            "maze2d-umaze-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 100.97,
        "return_std =>" => 95.598060126762
    ),
    Dict(
        "policy_path" => "maze2d_umaze/maze2d_umaze_dapg_3.pkl",
        "task.task_names" => [
            "maze2d-umaze-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 115.26,
        "return_std =>" => 120.07919220247945
    ),
    Dict(
        "policy_path" => "maze2d_umaze/maze2d_umaze_dapg_4.pkl",
        "task.task_names" => [
            "maze2d-umaze-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 106.56,
        "return_std =>" => 123.82562901112192
    ),
    Dict(
        "policy_path" => "maze2d_umaze/maze2d_umaze_dapg_5.pkl",
        "task.task_names" => [
            "maze2d-umaze-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 142.5,
        "return_std =>" => 111.55568116416124
    ),
    Dict(
        "policy_path" => "maze2d_umaze/maze2d_umaze_dapg_6.pkl",
        "task.task_names" => [
            "maze2d-umaze-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 172.13,
        "return_std =>" => 118.24048841238772
    ),
    Dict(
        "policy_path" => "maze2d_umaze/maze2d_umaze_dapg_7.pkl",
        "task.task_names" => [
            "maze2d-umaze-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 190.98,
        "return_std =>" => 73.81706848690214
    ),
    Dict(
        "policy_path" => "maze2d_umaze/maze2d_umaze_dapg_8.pkl",
        "task.task_names" => [
            "maze2d-umaze-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 228.17,
        "return_std =>" => 39.635856241539685
    ),
    Dict(
        "policy_path" => "maze2d_umaze/maze2d_umaze_dapg_9.pkl",
        "task.task_names" => [
            "maze2d-umaze-v1"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 239.34,
        "return_std =>" => 37.597664821102924
    ),
    Dict(
        "policy_path" => "pen/pen_dapg_0.pkl",
        "task.task_names" => [
            "pen-cloned-v0",
            "pen-expert-v0",
            "pen-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 1984.096763504694,
        "return_std =>" => 1929.6110474391166
    ),
    Dict(
        "policy_path" => "pen/pen_dapg_10.pkl",
        "task.task_names" => [
            "pen-cloned-v0",
            "pen-expert-v0",
            "pen-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 3808.794849593491,
        "return_std =>" => 1932.9965631785215
    ),
    Dict(
        "policy_path" => "pen/pen_dapg_1.pkl",
        "task.task_names" => [
            "pen-cloned-v0",
            "pen-expert-v0",
            "pen-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 2480.1224231814135,
        "return_std =>" => 2125.5773427152635
    ),
    Dict(
        "policy_path" => "pen/pen_dapg_2.pkl",
        "task.task_names" => [
            "pen-cloned-v0",
            "pen-expert-v0",
            "pen-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 2494.1335875747145,
        "return_std =>" => 2118.0014860996175
    ),
    Dict(
        "policy_path" => "pen/pen_dapg_3.pkl",
        "task.task_names" => [
            "pen-cloned-v0",
            "pen-expert-v0",
            "pen-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 2802.87073294418,
        "return_std =>" => 2120.3981104287323
    ),
    Dict(
        "policy_path" => "pen/pen_dapg_4.pkl",
        "task.task_names" => [
            "pen-cloned-v0",
            "pen-expert-v0",
            "pen-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 3136.18545171068,
        "return_std =>" => 2112.923714191993
    ),
    Dict(
        "policy_path" => "pen/pen_dapg_5.pkl",
        "task.task_names" => [
            "pen-cloned-v0",
            "pen-expert-v0",
            "pen-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 3110.619191864754,
        "return_std =>" => 2012.2585161410343
    ),
    Dict(
        "policy_path" => "pen/pen_dapg_6.pkl",
        "task.task_names" => [
            "pen-cloned-v0",
            "pen-expert-v0",
            "pen-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 3410.4384362331157,
        "return_std =>" => 2029.187357465904
    ),
    Dict(
        "policy_path" => "pen/pen_dapg_7.pkl",
        "task.task_names" => [
            "pen-cloned-v0",
            "pen-expert-v0",
            "pen-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 3489.353704450997,
        "return_std =>" => 2035.2279026017748
    ),
    Dict(
        "policy_path" => "pen/pen_dapg_8.pkl",
        "task.task_names" => [
            "pen-cloned-v0",
            "pen-expert-v0",
            "pen-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 3673.9622983303598,
        "return_std =>" => 2052.8837762657795
    ),
    Dict(
        "policy_path" => "pen/pen_dapg_9.pkl",
        "task.task_names" => [
            "pen-cloned-v0",
            "pen-expert-v0",
            "pen-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 3683.932983177092,
        "return_std =>" => 2028.9543873822265
    ),
    Dict(
        "policy_path" => "relocate/relocate_dapg_0.pkl",
        "task.task_names" => [
            "relocate-cloned-v0",
            "relocate-expert-v0",
            "relocate-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => -4.4718813284277195,
        "return_std =>" => 0.9021515021945451
    ),
    Dict(
        "policy_path" => "relocate/relocate_dapg_10.pkl",
        "task.task_names" => [
            "relocate-cloned-v0",
            "relocate-expert-v0",
            "relocate-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 3481.7834354311035,
        "return_std =>" => 813.1857720257618
    ),
    Dict(
        "policy_path" => "relocate/relocate_dapg_1.pkl",
        "task.task_names" => [
            "relocate-cloned-v0",
            "relocate-expert-v0",
            "relocate-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 5.070946470816939,
        "return_std =>" => 31.708695854456067
    ),
    Dict(
        "policy_path" => "relocate/relocate_dapg_2.pkl",
        "task.task_names" => [
            "relocate-cloned-v0",
            "relocate-expert-v0",
            "relocate-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 54.976670129729555,
        "return_std =>" => 140.09635704443158
    ),
    Dict(
        "policy_path" => "relocate/relocate_dapg_3.pkl",
        "task.task_names" => [
            "relocate-cloned-v0",
            "relocate-expert-v0",
            "relocate-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 54.11338525066304,
        "return_std =>" => 146.87277676706216
    ),
    Dict(
        "policy_path" => "relocate/relocate_dapg_4.pkl",
        "task.task_names" => [
            "relocate-cloned-v0",
            "relocate-expert-v0",
            "relocate-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 97.16474411169358,
        "return_std =>" => 164.81156449057102
    ),
    Dict(
        "policy_path" => "relocate/relocate_dapg_5.pkl",
        "task.task_names" => [
            "relocate-cloned-v0",
            "relocate-expert-v0",
            "relocate-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 366.3185681324701,
        "return_std =>" => 581.577837554543
    ),
    Dict(
        "policy_path" => "relocate/relocate_dapg_6.pkl",
        "task.task_names" => [
            "relocate-cloned-v0",
            "relocate-expert-v0",
            "relocate-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 1254.0676523894747,
        "return_std =>" => 929.5248207929493
    ),
    Dict(
        "policy_path" => "relocate/relocate_dapg_7.pkl",
        "task.task_names" => [
            "relocate-cloned-v0",
            "relocate-expert-v0",
            "relocate-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 2700.2361856493385,
        "return_std =>" => 1089.9871332809942
    ),
    Dict(
        "policy_path" => "relocate/relocate_dapg_8.pkl",
        "task.task_names" => [
            "relocate-cloned-v0",
            "relocate-expert-v0",
            "relocate-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 2570.351217370911,
        "return_std =>" => 1266.9305994339466
    ),
    Dict(
        "policy_path" => "relocate/relocate_dapg_9.pkl",
        "task.task_names" => [
            "relocate-cloned-v0",
            "relocate-expert-v0",
            "relocate-human-v0"
        ],
        "agent_name" => "DAPG",
        "return_mean" => 3379.424369497742,
        "return_std =>" => 948.6183219418235
    ),
    Dict(
        "policy_path" => "walker/walker_online_0.pkl",
        "task.task_names" => [
            "walker2d-medium-v0",
            "walker2d-random-v0",
            "walker2d-expert-v0",
            "walker2d-medium-replay-v0",
            "walker2d-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 17.57372020467802,
        "return_std =>" => 51.686802739349666
    ),
    Dict(
        "policy_path" => "walker/walker_online_10.pkl",
        "task.task_names" => [
            "walker2d-medium-v0",
            "walker2d-random-v0",
            "walker2d-expert-v0",
            "walker2d-medium-replay-v0",
            "walker2d-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 4120.947079569632,
        "return_std =>" => 468.1515654051671
    ),
    Dict(
        "policy_path" => "walker/walker_online_1.pkl",
        "task.task_names" => [
            "walker2d-medium-v0",
            "walker2d-random-v0",
            "walker2d-expert-v0",
            "walker2d-medium-replay-v0",
            "walker2d-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 193.84631742541606,
        "return_std =>" => 185.16785303932383
    ),
    Dict(
        "policy_path" => "walker/walker_online_2.pkl",
        "task.task_names" => [
            "walker2d-medium-v0",
            "walker2d-random-v0",
            "walker2d-expert-v0",
            "walker2d-medium-replay-v0",
            "walker2d-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 942.6191179097373,
        "return_std =>" => 532.9834162811841
    ),
    Dict(
        "policy_path" => "walker/walker_online_3.pkl",
        "task.task_names" => [
            "walker2d-medium-v0",
            "walker2d-random-v0",
            "walker2d-expert-v0",
            "walker2d-medium-replay-v0",
            "walker2d-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 2786.7497792224794,
        "return_std =>" => 477.5450988462439
    ),
    Dict(
        "policy_path" => "walker/walker_online_4.pkl",
        "task.task_names" => [
            "walker2d-medium-v0",
            "walker2d-random-v0",
            "walker2d-expert-v0",
            "walker2d-medium-replay-v0",
            "walker2d-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 914.4680927038296,
        "return_std =>" => 559.5155757967623
    ),
    Dict(
        "policy_path" => "walker/walker_online_5.pkl",
        "task.task_names" => [
            "walker2d-medium-v0",
            "walker2d-random-v0",
            "walker2d-expert-v0",
            "walker2d-medium-replay-v0",
            "walker2d-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 3481.491012709211,
        "return_std =>" => 87.12729823320758
    ),
    Dict(
        "policy_path" => "walker/walker_online_6.pkl",
        "task.task_names" => [
            "walker2d-medium-v0",
            "walker2d-random-v0",
            "walker2d-expert-v0",
            "walker2d-medium-replay-v0",
            "walker2d-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 2720.2509272083826,
        "return_std =>" => 746.9753406110725
    ),
    Dict(
        "policy_path" => "walker/walker_online_7.pkl",
        "task.task_names" => [
            "walker2d-medium-v0",
            "walker2d-random-v0",
            "walker2d-expert-v0",
            "walker2d-medium-replay-v0",
            "walker2d-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 3926.346852318098,
        "return_std =>" => 365.4230491920236
    ),
    Dict(
        "policy_path" => "walker/walker_online_8.pkl",
        "task.task_names" => [
            "walker2d-medium-v0",
            "walker2d-random-v0",
            "walker2d-expert-v0",
            "walker2d-medium-replay-v0",
            "walker2d-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 3695.4887678612936,
        "return_std =>" => 262.0350155576298
    ),
    Dict(
        "policy_path" => "walker/walker_online_9.pkl",
        "task.task_names" => [
            "walker2d-medium-v0",
            "walker2d-random-v0",
            "walker2d-expert-v0",
            "walker2d-medium-replay-v0",
            "walker2d-medium-expert-v0"
        ],
        "agent_name" => "SAC",
        "return_mean" => 4122.358396232011,
        "return_std =>" => 107.76279305206488
    )
]


text:
# Fit a Brownian motion with drift to and scale to
# Georgia election data:
# fraction of total count of votes vs difference in votes
using DelimitedFiles
datafile = download("https://alex.github.io/nyt-2020-election-scraper/battleground-state-changes.csv")
datatable, header = readdlm(datafile, ',', header=true)

ii = datatable[:,1] .== "Pennsylvania (EV: 20)"

ss = 2(datatable[ii,3] .== "Trump") .- 1
c = reverse(datatable[ii,5] + datatable[ii,6])
x = reverse(datatable[ii,7].*ss)

N = c[end]
# N = C + J
R = datatable[ii, 8][1]
T = (N - R)/N # remaining percentage to count
X = x[end] #vote difference

t = c ./ (R + N)

#=
(1, "state")
(2, "timestamp")
(3, "leading_candidate_name")
(4, "trailing_candidate_name")
(5, "leading_candidate_votes")
(6, "trailing_candidate_votes")
(7, "vote_differential")
(8, "votes_remaining")
(9, "new_votes")
(10, "new_votes_relevant")
(11, "new_votes_formatted")
(12, "leading_candidate_partition")
(13, "trailing_candidate_partition")
(14, "precincts_reporting")
(15, "precincts_total")
(16, "hurdle")
(17, "hurdle_change")
(18, "hurdle_mov_avg")
(19, "counties_partition")
(20, "total_votes_count")

data = [0.9222672139181572 103896.10389610389
    0.9267802009311443 87662.33766233765
    0.9277217593727027 85714.28571428571
    0.9285683655966674 83116.88311688312
    0.9299797843665768 79220.77922077922
    0.9310169076206811 78571.42857142857
    0.9329974271012007 77922.07792207792
    0.9332804459691252 77922.07792207792
    0.9364788042146532 68181.81818181818
    0.9368567753001715 68831.16883116882
    0.9372335211957853 68181.81818181818
    0.9426035285469248 60389.61038961039
    0.9435438617985787 57142.85714285713
    0.9438268806665033 57142.85714285713
    0.9471195785346729 47402.597402597385
    0.9484409458466062 48051.94805194806
    0.9526721391815731 33116.88311688311
    0.9532369517275178 31818.18181818181
    0.9578473413379074 18831.16883116882]
    t = data[:, 1]
    x = data[:, 2]

=#

using Mitosis
using Random, Test, LinearAlgebra, Statistics
using Distributions

function gibbs(t, x, iterations)
    # prior μ
    mw, Λw = zeros(1), Matrix(1e-12I(1))
    # prior σ2
    α0, β0 = 0.01, 0.01 # Inverse Gamma

    n = length(t)
    μ = -1e5
    σ = 1e5
    out = [(μ, σ)]
    for iter in 1:iterations
        # conjugate μ
        p0 = Gaussian{(:F,:Γ)}(mw, Λw)
        p = p0
        for i in n-1:-1:1
            Δ = t[i+1] - t[i]
            r = Mitosis.Regression([μ], (ConstantMap(Δ),), identity)
            k = kernel(Gaussian; μ=r, Σ=ConstantMap(σ^2*Δ))
            con = Mitosis.conjugate(k, x[i])
            _, pi = backward(BF(), con, [x[i+1]])
            _, p = fuse(p, pi)
        end

        # conjugate σ2
        #α = α0
        #β = β0
        α = 2n
        β = var(Binomial(N, (1-μ/N)/2))*α
        μ = rand(convert(Gaussian{(:μ,:Σ)}, p))[]
        for i in n-1:-1:1
            Δ = t[i+1] - t[i]
            r = Mitosis.Regression([μ], (ConstantMap(Δ),), identity)
            s = Mitosis.Regression([σ^2], (ConstantMap(Δ),), zero)
            k = kernel(Gaussian; μ=r, Σ=s)
            α = α + 1/2
            β = β + (x[i+1] - mean(k(x[i])))^2/(2Δ)
        end
        #σ = sqrt(rand(InverseGamma(α, β)))
        σ = std(Binomial(N, (1-μ/N)/2))
        push!(out, (μ, σ))
    end
    out
end

chain = gibbs(t, x, 1000)
μs = first.(chain)
σs = last.(chain)

println("μ")
describe(μs)
println("σ")
describe(σs)

using Makie
# Chain mixing

pl1 = hbox(lines(getindex.(chain, 1)),
   lines(getindex.(chain, 2)))

s = range(T, 1.00-eps(), length=100)
μu = quantile(μs, 0.80)
μl = quantile(μs, 0.20)
μ = median(μs)
σ = median(σs)

σu = quantile(σs, 0.8)
m = X .+ (s .- T)*μ
u = X .+ (s .- T)*μu .+ 2σu*sqrt.(s .- T)
l = X .+ (s .- T)*μl .- 2σu*sqrt.(s .- T)
Scene(resolution = (600, 600), textsize=20)
scatter!([T], [X])
#lines!(s, u)
lines!(s, m)
#lines!(s, l)
pl2 = band!(s, l, u)

v = [rand(kernel(Gaussian; μ=x->x+rand(μs)*(1-T), Σ=_->rand(σs)^2*(1-T))(X))
   for k in 1:1000]
mean(v .> 0)
mean(u[end] .> v .> l[end])
#scatter!(one.(v)+0.00001*randn(length(v)), v, markersize=0.1)
pl2

function bm(x, s, μ, σ)
    y = float(x)
    ys = [y]
    for i in 1:length(s)-1
        Δ = s[i+1] - s[i]
        r = Mitosis.Regression([μ], (ConstantMap(Δ),), identity)
        k = kernel(Gaussian; μ=r, Σ=ConstantMap(σ^2*Δ))
        y = rand(k(y))
        push!(ys, y)
    end
    ys
end

for i in 1:100
    lines!(s, bm(X, s, rand(μs), rand(σs)))
end
pl2

#
σ = std(Binomial(N, (1-μ/N)/2))

ext: jl


text:
module FactNSF

using Base: Float64
using SparseArrays
using LinearAlgebra

import Base: copy, transpose

export TensorDec
export NSFVector
export NSFMatrix
export to_dense

include("utils.jl")
include("wavelets.jl")
include("TensorDec.jl")
include("NSFVector.jl")
include("NSFMatrix.jl")

end

max_stars_repo_name: xinshuoyang/FactNSF

max_issues_repo_name: xinshuoyang/FactNSF

max_forks_repo_name: xinshuoyang/FactNSF


text:
"""
    calcHypotenuse(a,b)

Calculates the hypotenuse of right-angled triangle

`a` : adjacent leg

`b` : opposite leg
"""
function calcHypotenuse(a,b)
    return sqrt(a^2 + b^2)
end


text:
using Tilde
using Documenter

import Literate

include(joinpath(dirname(dirname(@__FILE__)), "test", "examples-list.jl"))

pages_before_examples = [
    "Home" => "index.md",
    "Installing Tilde" => "installing-Tilde.md",
]
pages_examples = ["Examples" => ["$(example[1])" => "example-$(example[2]).md" for example in EXAMPLES]]
pages_after_examples = [
    "Tilde API" => "api.md",
    "TildeMLJ.jl" => "Tildemlj.md",
    "Internals" => "internals.md",
    "Miscellaneous" => "misc.md",
    "To-Do List" => "to-do-list.md",
]
pages = vcat(
    pages_before_examples,
    pages_examples,
    pages_after_examples,
)

# Use Literate.jl to generate Markdown files for each of the examples
for example in EXAMPLES
    input_file = joinpath(EXAMPLESROOT, "example-$(example[2]).jl")
    Literate.markdown(input_file, DOCSOURCE)
end

DocMeta.setdocmeta!(Tilde, :DocTestSetup,
    quote
        using Tilde
        import Random
        Random.seed!(3)
    end; recursive=true)

makedocs(;
    modules=[Tilde],
    format=Documenter.HTML(),
    pages=pages,
    repo="https://github.com/cscherrer/Tilde.jl/blob/{commit}{path}#L{line}",
    sitename="Tilde.jl",
    authors="Chad Scherrer",
    strict=true,
)

deploydocs(;
    repo="github.com/cscherrer/Tilde.jl",
)


text:
# MIT License
#
# Copyright (c) 2018 Martin Biel
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

@stochastic_model vec_simple begin
    @stage 1 begin
        @parameters begin
            lb = [40.0, 20.0]
            c  = [100., 150.]
            A  = [1. 1.]
            b  = [120.]
        end
        @decision(vec_simple, x[i in 1:2] >= lb[i])
        @objective(vec_simple, Min, dot(c, x))
        @constraint(vec_simple, A * x - b in MOI.Nonpositives(1))
    end
    @stage 2 begin
        @parameters begin
            lb = [0., 0.]
            T  = [-60. 0.;
                  0.  -80.]
            W  = [6. 10.;
                  8. 5.]
        end
        @uncertain ξ[1:4]
        q  = [ξ[1], ξ[2]]
        ub = [ξ[3], ξ[4]]
        @recourse(vec_simple, lb[i] <= y[i in 1:2] <= ub[i])
        @objective(vec_simple, Max, dot(q, y))
        @constraint(vec_simple, T * x + W * y in MOI.Nonpositives(2))
    end
end

ξ₁ = @scenario ξ[1:4] = [24.0, 28.0, 500.0, 100.0] probability = 0.4
ξ₂ = @scenario ξ[1:4] = [28.0, 32.0, 300.0, 300.0] probability = 0.6

vec_simple_res = SPResult([46.67, 36.25], Dict(1 => [300., 100.], 2 => [300., 100.]), -855.83, -1518.75, 662.92, 286.92, -1445.92, -568.92)
push!(problems, (vec_simple, [ξ₁,ξ₂], vec_simple_res, "Vectorized Simple"))


text:
module CloudGraphsDFGs

using ...DistributedFactorGraphs

import ...DistributedFactorGraphs:  setSolverParams!,
                                    getFactor,
                                    setDescription!,
                                    # getLabelDict,
                                    getUserData,
                                    setUserData!,
                                    getRobotData,
                                    setRobotData!,
                                    getSessionData,
                                    setSessionData!,
                                    addVariable!,
                                    getVariable,
                                    getAddHistory,
                                    addFactor!,
                                    getSolverParams,
                                    exists,
                                    isVariable,
                                    isFactor,
                                    getVariableType,
                                    getDescription,
                                    updateVariable!,
                                    updateFactor!,
                                    deleteVariable!,
                                    deleteFactor!,
                                    getVariables,
                                    listVariables,
                                    ls,
                                    getFactors,
                                    listFactors,
                                    lsf,
                                    isConnected,
                                    getNeighbors,
                                    buildSubgraph,
                                    copyGraph!,
                                    getBiadjacencyMatrix,
                                    _getDuplicatedEmptyDFG,
                                    toDot,
                                    toDotFile,
                                    AbstractDataEntry,
                                    isValidLabel,
                                    _invalidIds,#TODO Export from DFG
                                    _validLabelRegex, #TODO Export from DFG
                                    updateUserData!,
                                    getUserData,
                                    deleteUserData!,
                                    emptyUserData!,
                                    updateRobotData!,
                                    getRobotData,
                                    deleteRobotData!,
                                    emptyRobotData!,
                                    updateSessionData!,
                                    getSessionData,
                                    deleteSessionData!,
                                    emptySessionData!,
                                    listTags,
                                    mergeTags!,
                                    removeTags!,
                                    emptyTags!,
                                    listVariableSolverData,
                                    addVariableSolverData!,
                                    updateVariableSolverData!,
                                    deleteVariableSolverData!,
                                    getVariableSolverData,
                                    mergeVariableData!,
                                    getPPE,
                                    addPPE!,
                                    listPPEs,
                                    deletePPE!,
                                    updatePPE!,
                                    getSolvable,
                                    setSolvable!,
                                    getEstimateFields,
                                    _getname,
                                    _getmodule,
                                    getTypeFromSerializationModule,
                                    listBlobStores,
                                    BlobStoreEntry,
                                    AbstractDataEntry,
                                    MongodbDataEntry,
                                    getDataEntries,
                                    listDataEntries,
                                    getDataEntry,
                                    addDataEntry!,
                                    updateDataEntry!,
                                    deleteDataEntry!,
                                    _getDFGVersion

using Neo4j
using Base64

using DocStringExtensions
using Requires
using Dates, TimeZones
using Distributions
using Reexport
using JSON
using Unmarshal
using JSON2 # JSON2 requires all properties to be in correct sequence, can't guarantee that from DB.
using LinearAlgebra
using SparseArrays
using UUIDs

# Entities
include("entities/CloudGraphsDFG.jl")
include("entities/CGStructure.jl")

# Services
include("services/CommonFunctions.jl")
include("services/CGStructure.jl")
include("services/CloudGraphsDFG.jl")

# Exports
export Neo4jInstance, CloudGraphsDFG

# Additional exports for CGStructure
export copySession!
# Please be careful with these
# With great power comes great "Oh crap, I deleted everything..."
export clearSession!!, clearRobot!!, clearUser!!
export createSession, createRobot, createUser, createDfgSessionIfNotExist
export existsSession, existsRobot, existsUser
export getSession, getRobot, getUser
export updateSession, updateRobot, updateUser
export lsSessions, lsRobots, lsUsers

end


text:
using GalacticEvolutionary, GalacticOptim
using Test

@testset "GalacticEvolutionary.jl" begin
    rosenbrock(x, p) = (p[1] - x[1])^2 + p[2] * (x[2] - x[1]^2)^2
    x0 = zeros(2)
    _p = [1.0, 100.0]
    l1 = rosenbrock(x0, _p)
    optprob = OptimizationFunction(rosenbrock)
    prob = GalacticOptim.OptimizationProblem(optprob, x0, _p)
    sol = solve(prob, CMAES(μ=40, λ=100), abstol=1e-15)
    @test 10 * sol.minimum < l1
end


text:
"""
    put_assets_into_blocks(ts::SortedDataFrame, new_group_mult::Real)

This splits assets into seperate blocks depending on their number of ticks.
### Inputs
* `ts` - The tick data.
* `new_group_mult` - The relative number of ticks needed before a new block is made. So if this is 1.2 that means a new group is made when one asset has 20% or more ticks than the slowest traded asset in the previous block.
### Returns
* A `DataFrame`.
"""
function put_assets_into_blocks(ts::SortedDataFrame, new_group_mult::Real)
    frequencies = time_between_refreshes(ts)
    group_stack = Vector{Vector{Symbol}}()
    this_group = Vector{Symbol}()
    this_group_start = frequencies[1,:number_of_ticks]
    for i in 1:nrow(frequencies)
        this_group_start = (length(this_group) == 0) ? frequencies[i,:number_of_ticks] : this_group_start
        if (frequencies[i,:number_of_ticks]/this_group_start - 1) > new_group_mult
            push!(group_stack, this_group) # finish off old group
            this_group_start = frequencies[i,:number_of_ticks] # Start new group
            this_group = Vector{Symbol}([frequencies[i,:Asset]])
        else
            push!(this_group, frequencies[i,:Asset])
        end
    end
    if length(this_group) > 0 push!(group_stack, this_group) end
end
#blocks = put_assets_into_blocks(ts, obs_multiple_for_new_block)

function make_adjacent_block_sequence(blocks::Vector{Vector{Symbol}})
    len = length(blocks)
    if len == 1 return [blocks...] end
    left  = make_adjacent_block_sequence(blocks[1:Integer(floor(len/2))])
    right = make_adjacent_block_sequence(setdiff(blocks[1:len], blocks[1:Integer(floor(len/2))]))
    bigblock = [(blocks...)...]
    return [bigblock, left..., right...]
end
function make_sorted_adjacent_block_sequence(blocks::Vector{Vector{Symbol}})
    unsorted = make_adjacent_block_sequence(blocks)
    lens = length.(unsorted)
    d = DataFrame(one = unsorted, lens = lens)
    sort!(d, :lens, rev=true)
    return d.one
end

"""
    put_assets_into_blocks_by_trading_frequency(ts::SortedDataFrame,
                                                obs_multiple_for_new_block::Real, func::Symbol,
                                                optional_parameters::NamedTuple = NamedTuple())

This makes a DataFrame that describes how to estimate the covariance matrix blockwise.
### Inputs
* `ts` - The tick data.
* `obs_multiple_for_new_block` - The relative number of ticks needed before a new block is made. So if this is 1.2 that means a new group is made when one asset has 20% or more ticks than the slowest traded asset in the previous block.
* `func` - A symbol representing the covariance estimation function to be used.
* `optional_parameters` - Optional parameters to be used in the `func` function.
### Returns
* A `DataFrame` representing what estimations should be performed. The order of rows in the `DataFrame` shows the order of estimation.

### References
Hautsch, N., Kyj, L.M. and Oomen, R.C.A. (2012), A blocking and regularization approach to high‐dimensional realized covariance estimation. J. Appl. Econ., 27: 625-645
"""
function put_assets_into_blocks_by_trading_frequency(ts::SortedDataFrame, obs_multiple_for_new_block::Real,
                                                     func::Symbol, optional_parameters::NamedTuple = NamedTuple())
    blocks      = put_assets_into_blocks(ts, obs_multiple_for_new_block)
    blocks2     = make_sorted_adjacent_block_sequence(blocks)
    num_blocks  = length(blocks2)
    blocking_dd = DataFrame(assets = Set.(blocks2), f = Array{Symbol}(repeat([func], num_blocks)))
    blocking_dd[!,:optional_parameters]  .= Ref(optional_parameters)

    blocking_dd[!,:number_of_assets] = map(i -> length(blocking_dd[i, :assets]), 1:nrow(blocking_dd))
    frequencies = time_between_refreshes(ts)
    blocking_dd[!,:mean_number_of_ticks] =  map(i -> mean(map(a -> frequencies[findall(frequencies[:,:Asset] .== a), :number_of_ticks], collect(blocking_dd[i, :assets])))[1], 1:nrow(blocking_dd))
    blocking_dd[!,:mean_time_per_tick]   =  map(i -> mean(map(a -> frequencies[findall(frequencies[:,:Asset] .== a), :time_between_ticks], collect(blocking_dd[i, :assets])))[1], 1:nrow(blocking_dd))
    return blocking_dd
end

"""
    blockwise_estimation(ts::SortedDataFrame, blocking_frame::DataFrame)

Run a series of covariance estimations and combine the results. Two things should be input, a SortedDataFrame with the price
update data and a dataframe describing what estimations should be performed. This should be of the same form as is output by
`put_assets_into_blocks_by_trading_frequency` (although the actual estimations can be customised to something different as to what that function outputs).
### Inputs
* `ts` - The tick data.
* `blocking_frame` - A `DataFrame` representing what estimations to do and in what order. This is often be one generated by the `put_assets_into_blocks_by_trading_frequency` function (and potentially then modified).
### Returns
* A `CovarianceMatrix`.
"""
function blockwise_estimation(ts::SortedDataFrame, blocking_frame::DataFrame)
    covar = estimate_covariance(ts, collect(blocking_frame[1,:assets]), blocking_frame[1,:f] ; blocking_frame[1,:optional_parameters]... )
    if nrow(blocking_frame) == 1 return covar end
    for i in 2:nrow(blocking_frame)
        new_covar = estimate_covariance(ts, collect(blocking_frame[i,:assets]), blocking_frame[i,:f] ; blocking_frame[i,:optional_parameters]... )
        covar = combine_covariance_matrices([covar, new_covar], [0,1])
    end
    return covar
end


text:
"RegularizationPath segment selector supertype"
abstract type SegSelect end

"Index of the selected RegularizationPath segment"
segselect(path::RegularizationPath, select::S) where S<:SegSelect =
    throw("segselect(path, ::$S) is not implemented")

"A RegularizationPath segment selector that returns all segments"
struct AllSeg <: SegSelect end

"Selects the RegularizationPath segment with the minimum AIC"
struct MinAIC <: SegSelect end

"Index of the selected RegularizationPath segment"
segselect(path::RegularizationPath, select::MinAIC) = minAIC(path)

"Selects the RegularizationPath segment with the minimum corrected AIC"
struct MinAICc <: SegSelect
    k::Int # k parameter used to correct AIC criterion
    MinAICc(k::Int=2) = new(k)
end
segselect(path::RegularizationPath, select::MinAICc) = minAICc(path; k=select.k)

"Selects the RegularizationPath segment with the minimum BIC"
struct MinBIC <: SegSelect end

segselect(path::RegularizationPath, select::MinBIC) = minBIC(path)

"RegularizationPath segment selector supertype"
abstract type CVSegSelect <: SegSelect end

"Selects the RegularizationPath segment with the minimum cross-validation mse"
struct MinCVmse <: CVSegSelect
    gen::CrossValGenerator

    MinCVmse(gen::CrossValGenerator) = new(gen)
    MinCVmse(path::RegularizationPath, k::Int=10) = new(Kfold(length(path.m.rr.y), k))
end

CVfun(oosdevs, ::MinCVmse) = CVmin(oosdevs)

"""
Selects the RegularizationPath segment with the largest λt with mean
OOS deviance no more than one standard error away from minimum
"""
struct MinCV1se <: CVSegSelect
    gen::CrossValGenerator

    MinCV1se(gen::CrossValGenerator) = new(gen)
    MinCV1se(path::RegularizationPath, k::Int=10) = new(Kfold(length(path.m.rr.y), k))
end

CVfun(oosdevs, ::MinCV1se) = CV1se(oosdevs)

"""
    coef(path::RegularizationPath; kwargs...)

Coefficient vector for a selected segment of a regularization path.

# Examples
```julia
coef(path; select=MinBIC())     # BIC minimizing segment
coef(path; select=AllSeg())     # Array with entire path's coefficents
```
"""
StatsBase.coef(path::RegularizationPath; select=AllSeg(), kwargs...) = coef(path, select; kwargs...)

"""
    coef(path::RegularizationPath, select::SegSelect)

Coefficient vector for a selected segment of a regularization path.

# Examples
```julia
coef(path, MinBIC())     # BIC minimizing segment
coef(path, AllSeg())     # Array with entire path's coefficents
```
"""
function StatsBase.coef(path::RegularizationPath, select::S) where S <: SegSelect
    if !isdefined(path,:coefs)
        X = path.m.pp.X
        p,nλ = size(path)
        return zeros(eltype(X),p)
    end

    seg = segselect(path, select)

    if hasintercept(path)
        vec(vcat(path.b0[seg],path.coefs[:,seg]))
    else
        path.coefs[:,seg]
    end
end

function StatsBase.coef(path::RegularizationPath, select::AllSeg)
    if !isdefined(path,:coefs)
        X = path.m.pp.X
        p,nλ = size(path)
        return spzeros(eltype(X),p,nλ)
    end

    if hasintercept(path)
        vcat(path.b0',path.coefs)
    else
        path.coefs
    end
end

segselect(path::RegularizationPath, select::S) where S<:CVSegSelect =
    cross_validate_path(path, select)

segselect(path::RegularizationPath,
           X::AbstractMatrix{T}, y::V,        # potentially new data
           select::S;
           kwargs...) where {T<:AbstractFloat,V<:FPVector, S<:CVSegSelect} =
    cross_validate_path(path, X, y, select; kwargs...)

"A RegularizedModel represents a selected segment from a RegularizationPath"
abstract type RegularizedModel <: RegressionModel end

"LassoModel represents a selected segment from a LassoPath"
struct LassoModel{M<:LinPredModel, S<:SegSelect} <: RegularizedModel
    lpm::M          # underlying GLM
    intercept::Bool # whether path added an intercept
    select::S       # segment selector
end

"GammaLassoModel represents a selected segment from a GammaLassoPath"
struct GammaLassoModel{M<:LinPredModel, S<:SegSelect} <: RegularizedModel
    lpm::M          # underlying GLM
    intercept::Bool # whether path added an intercept
    select::S       # segment selector
end

"""
predict(m::RegularizedModel, newX::AbstractMatrix; kwargs...)

Predicted values using a selected segment of a regularization path.

# Examples
```julia
m = fit(LassoModel, X, y; select=MinBIC())
predict(m, newX)     # predict using BIC minimizing segment
"""
function StatsBase.predict(m::RegularizedModel, newX::AbstractMatrix{T}; kwargs...) where T
    # add an interecept to newX if the model has one
    if m.intercept
        newX = [ones(T,size(newX,1),1) newX]
    end

    predict(m.lpm, newX; kwargs...)
end
StatsBase.predict(m::RegularizedModel) = predict(m.lpm)

"Returns the RegularizedPath type R used in fit(R,...)"
pathtype(::Type{LassoModel}) = LassoPath
pathtype(::Type{GammaLassoModel}) = GammaLassoPath

"""
    selectmodel(path::RegularizationPath, select::SegSelect)

Returns a LinearModel or GeneralizedLinearModel representing the selected
segment of a regularization path.

# Examples
```julia
selectmodel(path, MinBIC())            # BIC minimizing model
selectmodel(path, MinCVmse(path, 5))   # 5-fold CV mse minimizing model
```
"""
function selectmodel(path::R, select::SegSelect) where R<:RegularizationPath
    # extract reusable path parts
    m = path.m
    rr = deepcopy(m.rr)
    pp = m.pp
    X = pp.X

    # destandardize X if needed
    if !isempty(path.Xnorm)
        X = X ./ transpose(path.Xnorm)
    end

    # add an interecept to X if the model has one
    if hasintercept(path)
        segX = [ones(eltype(X),size(X,1),1) X]
    else
        segX = X
    end

    # select coefs
    beta0 = Vector{Float64}(coef(path, select))

    # create new linear predictor
    pivot = true
    p = cholpred(segX, pivot)

    # rescale weights, which in GLM sum to nobs
    rr.wts .*= nobs(path)

    # same things GLM does to init just before fit!
    lp = rr.mu
    copyto!(p.beta0, beta0)
    fill!(p.delbeta, 0)
    GLM.linpred!(lp, p, 0)
    updateμ!(rr, lp)

    # create a LinearModel or GeneralizedLinearModel with the new linear predictor
    newglm(m, rr, p)
end

"""
    fit(RegularizedModel, X, y, dist, link; <kwargs>)

Returns a LinearModel or GeneralizedLinearModel representing the selected
segment of a regularization path.

# Examples
```julia
fit(LassoModel, X, y; select=MinBIC()) # BIC minimizing LinearModel
fit(LassoModel, X, y, Binomial(), Logit();
    select=MinCVmse(path, 5)) # 5-fold CV mse minimizing model
```
# Arguments
- `select::SegSelect=MinAICc()`: segment selector.
- `wts=ones(length(y))`: Weights for each observation
- `offset=zeros(length(y))`: Offset of each observation
- `λ`: can be used to specify a specific set of λ values at which models are fit.
    If λ is unspecified, Lasso.jl selects nλ logarithmically spaced λ values from
    `λmax`, the smallest λ value yielding a null model, to
    `λminratio * λmax`.
- `nλ=100` number of λ values to use
- `λminratio=1e-4` if more observations than predictors otherwise 0.001.
- `stopearly=true`: When `true`, if the proportion of deviance explained
    exceeds 0.999 or the difference between the deviance explained by successive λ
    values falls below `1e-5`, the path stops early.
- `standardize=true`: Whether to standardize predictors to unit standard deviation
    before fitting.
- `intercept=true`: Whether to fit an (unpenalized) model intercept.
- `algorithm`: Algorithm to use.
    `NaiveCoordinateDescent` iteratively computes the dot product of the
    predictors with the  residuals, as opposed to the
    `CovarianceCoordinateDescent` algorithm, which uses a precomputed Gram matrix.
    `NaiveCoordinateDescent` is typically faster when there are many
    predictors that will not enter the model or when fitting
    generalized linear models.
    By default uses `NaiveCoordinateDescent` if more than 5x as many predictors
    as observations or model is a GLM. `CovarianceCoordinateDescent` otherwise.
- `randomize=true`: Whether to randomize the order in which coefficients are
    updated by coordinate descent. This can drastically speed
    convergence if coefficients are highly correlated.
- `maxncoef=min(size(X, 2), 2*size(X, 1))`: maximum number of coefficients
    allowed in the model. If exceeded, an error will be thrown.
- `dofit=true`: Whether to fit the model upon construction. If `false`, the
    model can be fit later by calling `fit!(model)`.
- `cd_tol=1e-7`: The tolerance for coordinate descent iterations iterations in
    the inner loop.
- `irls_tol=1e-7`: The tolerance for outer iteratively reweighted least squares
    iterations. This is ignored unless the model is a generalized linear model.
- `criterion=:coef` Convergence criterion. Controls how ``cd_tol`` and ``irls_tol``
    are to be interpreted. Possible values are:
    - ``:coef``: The model is considered to have converged if the
    the maximum absolute squared difference in coefficients
    between successive iterations drops below the specified
    tolerance. This is the criterion used by glmnet.
    - ``:obj``: The model is considered to have converged if the
    the relative change in the Lasso/Elastic Net objective
    between successive iterations drops below the specified
    tolerance. This is the criterion used by GLM.jl.
- `minStepFac=0.001`: The minimum step fraction for backtracking line search.
- `penalty_factor=ones(size(X, 2))`: Separate penalty factor ``\\omega_j``
    for each coefficient ``j``, i.e. instead of ``\\lambda`` penalties become
    ``\\lambda\\omega_j``.
    Note the penalty factors are internally rescaled to sum to
    the number of variables (`glmnet.R` convention).
- `standardizeω=true`: Whether to scale penalty factors to sum to the number of
    variables (glmnet.R convention).

See also [`fit(::RegularizationPath...)`](@ref) for a full list of arguments
"""
function StatsBase.fit(::Type{R}, X::AbstractMatrix{T}, y::V,
    d::UnivariateDistribution=Normal(), l::Link=canonicallink(d);
    select::SegSelect=MinAICc(),
    intercept=true,
    kwargs...) where {R<:RegularizedModel,T<:AbstractFloat,V<:FPVector}

    # fit a regularization path
    M = pathtype(R)
    path = fit(M, X, y, d, l; intercept=intercept, kwargs...)

    R(selectmodel(path, select), intercept, select)
end

newglm(m::LinearModel, rr, pp) = LinearModel(rr, pp)
newglm(m::GeneralizedLinearModel, rr, pp) = GeneralizedLinearModel(rr, pp, true)

# don't add an intercept when using a @formula because we use the intercept keyword arg to add an intercept
StatsModels.drop_intercept(::Type{R}) where R<:RegularizedModel = true

StatsModels.@delegate StatsModels.TableRegressionModel.model [segselect, MinCVmse, MinCV1se]
for modeltype in (:LassoModel, :GammaLassoModel)
    @eval begin
        StatsModels.@delegate $modeltype.lpm [StatsBase.coef, StatsBase.confint,
                                     StatsBase.deviance, StatsBase.nulldeviance,
                                     StatsBase.loglikelihood, StatsBase.nullloglikelihood,
                                     StatsBase.dof, StatsBase.dof_residual, StatsBase.nobs,
                                     StatsBase.residuals, StatsBase.response
                                     ]
    end
end

# same ediom as in https://github.com/JuliaStats/GLM.jl/blob/0926a95dfc2b09179151683053de7c69e22bbe2b/src/glmfit.jl#L375
# makes converts X and y to floats
StatsBase.fit(::Type{M},
    X::AbstractMatrix,
    y::AbstractVector,
    d::UnivariateDistribution=Normal(),
    l::Link=canonicallink(d); kwargs...) where {M<:Union{RegularizationPath, RegularizedModel}} =
    fit(M, float(X), float(y), d, l; kwargs...)

function coeftable(mm::RegularizedModel)
    cc = coef(mm)
    CoefTable([cc],
                ["Estimate"],
                ["x$i" for i = 1:size(mm.lpm.pp.X, 2)])
end

function Base.show(io::IO, obj::RegularizedModel)
    # prefix = isa(obj.m, GeneralizedLinearModel) ? string(typeof(distfun(path)).name.name, " ") : ""
    println(io, "$(typeof(obj).name.name) using $(obj.select) segment of the regulatization path.")

    println(io, "\nCoefficients:\n", coeftable(obj))
end

StatsBase.vcov(obj::RegularizedModel, args...) = error("variance-covariance matrix for a regularized model is not yet implemented")


text:
#using SparseArrays
#using LinearAlgebra

function test_julia_unsym(A,b,n,m,inertia,timer)
    # just one function for all julia solvers.
    safe = false
    recycle = false
    solver_julia = OnePhase.linear_solver_JULIA(:unsymmetric, safe, recycle)
    OnePhase.initialize!(solver_julia)
    @test inertia == OnePhase.ls_factor!(solver_julia, A, n, m, timer)
    res1 = zeros(length(b))
    OnePhase.ls_solve!(solver_julia, b, res1, timer)
    res2 = OnePhase.ls_solve(solver_julia, b, timer)
    @test res1 == res2
    return res1
end

function test_julia_sym(A,b,n,m,inertia,timer)
    safe = false
    recycle = false
    solver_julia = OnePhase.linear_solver_JULIA(:symmetric, safe, recycle)
    OnePhase.initialize!(solver_julia)
    @test inertia == OnePhase.ls_factor!(solver_julia, A, n, m, timer)
    res1 = zeros(length(b))
    OnePhase.ls_solve!(solver_julia, b, res1, timer)
    res2 = OnePhase.ls_solve(solver_julia, b, timer)
    @test res1 == res2
    return res1
end

function test_julia_chol(A,b,n,m,inertia,timer)
    safe = false
    recycle = false
    solver_julia = OnePhase.linear_solver_JULIA(:definite, safe, recycle)
    OnePhase.initialize!(solver_julia)
    @test inertia == OnePhase.ls_factor!(solver_julia, A, n, m, timer)
    res1 = zeros(length(b))
    OnePhase.ls_solve!(solver_julia, b, res1, timer)
    res2 = OnePhase.ls_solve(solver_julia, b, timer)
    @test res1 == res2
    return res1
end

function test_ma57(A,b,n,m,inertia,timer)
    safe = false
    recycle = false
    solver_julia = OnePhase.linear_solver_HSL(:symmetric, safe, recycle, 0.0)
    OnePhase.initialize!(solver_julia)
    @test inertia == OnePhase.ls_factor!(solver_julia, A, n, m, timer)
    res1 = zeros(length(b))
    OnePhase.ls_solve!(solver_julia, b, res1, timer)
    res2 = OnePhase.ls_solve(solver_julia, b, timer)
    @test res1 == res2
    return res1
end

function run_linear_solvers(A,b,n,m,inertia)
    timer = OnePhase.class_advanced_timer()
    OnePhase.start_advanced_timer(timer)

    tol = 1e-9

    #dir_julia_unsym = test_julia_unsym(A,b,n,m,inertia,timer)
    dir_julia_sym = test_julia_sym(A,b,n,m,inertia,timer)
    dir_julia_chol = test_julia_chol(A,b,n,m,inertia,timer)
    @test LinearAlgebra.norm(dir_julia_sym - dir_julia_chol) < tol

    if OnePhase.USE_HSL
        dir_ma57 = test_ma57(A,b,n,m,inertia,timer)
        @test LinearAlgebra.norm(dir_ma57 - dir_julia_chol) < tol
    end

    A_2 = (A + A')
    for i = 1:size(A,1)
        A_2[i,i] = A[i,i]
    end
    #display(full(A))
    #display(full(A_2))

    dir_julia_sym_2 = test_julia_sym(A_2,b,n,m,inertia,timer)
    @test LinearAlgebra.norm(dir_julia_sym - dir_julia_sym_2) < tol
    dir_julia_chol_2 = test_julia_chol(A_2,b,n,m,inertia,timer)
    @test LinearAlgebra.norm(dir_julia_chol - dir_julia_chol_2) < tol

    if OnePhase.USE_HSL
        dir_ma57_2 = test_ma57(A_2,b,n,m,inertia,timer)
        @test LinearAlgebra.norm(dir_ma57 - dir_ma57_2) < tol
    end

    OnePhase.pause_advanced_timer(timer)
end

function test_linear_solvers()
    @testset "test_linear_solvers" begin
        n = 10
        m = 0
        #A = SparseArrays.speye(10)
	A = SparseMatrixCSC{Float64}(LinearAlgebra.I, 10, 10)
        b = rand(10)
        inertia = 1
        run_linear_solvers(A,b,n,m,inertia)

        # add some off diagonal elements
        n = 10
        m = 0
        #A = SparseArrays.speye(10)
	A = SparseMatrixCSC{Float64}(LinearAlgebra.I, 10, 10)

        A[10,1] = 0.1
        A[9,2] = 0.1
        b = rand(10)
        inertia = 1
        run_linear_solvers(A,b,n,m,inertia)
    end
end


text:
@testset "Core" begin
    @test sprint(showerror, JSONRPC.JSONRPCError(-32700, "FOO", "BAR")) == "ParseError: FOO (BAR)"
    @test sprint(showerror, JSONRPC.JSONRPCError(-32600, "FOO", "BAR")) == "InvalidRequest: FOO (BAR)"
    @test sprint(showerror, JSONRPC.JSONRPCError(-32601, "FOO", "BAR")) == "MethodNotFound: FOO (BAR)"
    @test sprint(showerror, JSONRPC.JSONRPCError(-32602, "FOO", "BAR")) == "InvalidParams: FOO (BAR)"
    @test sprint(showerror, JSONRPC.JSONRPCError(-32603, "FOO", "BAR")) == "InternalError: FOO (BAR)"
    @test sprint(showerror, JSONRPC.JSONRPCError(-32099, "FOO", "BAR")) == "serverErrorStart: FOO (BAR)"
    @test sprint(showerror, JSONRPC.JSONRPCError(-32000, "FOO", "BAR")) == "serverErrorEnd: FOO (BAR)"
    @test sprint(showerror, JSONRPC.JSONRPCError(-32002, "FOO", "BAR")) == "ServerNotInitialized: FOO (BAR)"
    @test sprint(showerror, JSONRPC.JSONRPCError(-32001, "FOO", "BAR")) == "UnknownErrorCode: FOO (BAR)"
    @test sprint(showerror, JSONRPC.JSONRPCError(-32800, "FOO", "BAR")) == "RequestCancelled: FOO (BAR)"
    @test sprint(showerror, JSONRPC.JSONRPCError(-32801, "FOO", "BAR")) == "ContentModified: FOO (BAR)"
    @test sprint(showerror, JSONRPC.JSONRPCError(1, "FOO", "BAR")) == "Unkonwn: FOO (BAR)"
end


text:
function igyp00()
#
#  generalization of Igarash and Ypma
#
    p = poly([2.35;2.37;2.39])
    z = [2.35 1;2.37 1;2.39 1];
    p, PolyZeros(z)
end


text:
module Videos

using FileType

TypeM4v  = FileType.Types("m4v", MIME("video/x-m4v"))
TypeMov  = FileType.Types("mov", MIME("video/quicktime"))
TypeAvi  = FileType.Types("avi", MIME("video/x-msvideo"))
TypeWmv  = FileType.Types("wmv", MIME("video/x-ms-wmv"))
TypeMpeg = FileType.Types("mpg", MIME("video/mpeg"))
TypeFlv  = FileType.Types("flv", MIME("video/x-flv"))
Type3gp  = FileType.Types("3gp", MIME("video/3gpp"))

function M4v(buf)::Bool
	return length(buf) > 10 &&
		buf[5] == 0x66 && buf[6] == 0x74 &&
		buf[7] == 0x79 && buf[8] == 0x70 &&
		buf[9] == 0x4D && buf[10] == 0x34 &&
		buf[11] == 0x56
end

function Mov(buf)::Bool
	return length(buf) > 15 && ((buf[1] == 0x0 && buf[2] == 0x0 &&
		buf[3] == 0x0 && buf[4] == 0x14 &&
		buf[5] == 0x66 && buf[6] == 0x74 &&
		buf[7] == 0x79 && buf[8] == 0x70) ||
		(buf[5] == 0x6d && buf[6] == 0x6f && buf[7] == 0x6f && buf[8] == 0x76) ||
		(buf[5] == 0x6d && buf[6] == 0x64 && buf[7] == 0x61 && buf[8] == 0x74) ||
		(buf[13] == 0x6d && buf[14] == 0x64 && buf[15] == 0x61 && buf[16] == 0x74))
end

function Avi(buf)::Bool
	return length(buf) > 10 &&
		buf[1] == 0x52 && buf[2] == 0x49 &&
		buf[3] == 0x46 && buf[4] == 0x46 &&
		buf[9] == 0x41 && buf[10] == 0x56 &&
		buf[11] == 0x49
end

function Wmv(buf)::Bool
	return length(buf) > 9 &&
		buf[1] == 0x30 && buf[2] == 0x26 &&
		buf[3] == 0xB2 && buf[4] == 0x75 &&
		buf[5] == 0x8E && buf[6] == 0x66 &&
		buf[7] == 0xCF && buf[8] == 0x11 &&
		buf[9] == 0xA6 && buf[10] == 0xD9
end

function Mpeg(buf)::Bool
	return length(buf) > 3 &&
		buf[1] == 0x0 && buf[2] == 0x0 &&
		buf[3] == 0x1 && buf[4] >= 0xb0 &&
		buf[4] <= 0xbf
end

function Flv(buf)::Bool
	return length(buf) > 3 &&
		buf[1] == 0x46 && buf[2] == 0x4C &&
		buf[3] == 0x56 && buf[4] == 0x01
end

function Match3gp(buf)::Bool
	return length(buf) > 10 &&
		buf[5] == 0x66 && buf[6] == 0x74 && buf[7] == 0x79 &&
		buf[8] == 0x70 && buf[9] == 0x33 && buf[10] == 0x67 &&
		buf[11] == 0x70
end

Video = Dict(
	TypeM4v=>M4v,
	TypeMov=>Mov,
	TypeAvi=>Avi,
	TypeWmv=>Wmv,
	TypeMpeg=>Mpeg,
	TypeFlv=>Flv,
	Type3gp=>Match3gp,
)

end


text:
include("ComMatrix_test.jl")
#include("Constructors_test.jl")
include("Grid_and_points_test.jl")
include("Views_test.jl")
include("Assemblage_tests.jl")
include("Analysis_tests.jl")


text:
# The functions in this file may not be used anywhere in this package but may
# needed by different modules of BinaryBuilder.jl

with_logfile(f::Function, prefix::Prefix, name::String) = with_logfile(f, joinpath(logdir(prefix), name))
function with_logfile(f::Function, logfile::String)
    mkpath(dirname(logfile))

    # If it's already a file, remove it, as it is probably an incorrect symlink
    if isfile(logfile)
        rm(logfile; force=true)
    end
    open(logfile, "w") do io
        f(io)
    end
end

"""
    get_concrete_platform(platform::Platform, shards::Vector{CompilerShard})

Return the concrete platform for the given `platform` based on the GCC compiler
ABI in the `shards`.
"""
function get_concrete_platform(platform::Platform, shards::Vector{CompilerShard})
    # We want to get dependencies that have exactly the same GCC ABI as the
    # chosen compiler, otherwise we risk, e.g., to build in an environment
    # with libgfortran3 a dependency built with libgfortran5.
    # `concrete_platform` is needed only to setup the dependencies and the
    # runner.  We _don't_ want the platform passed to `audit()` or
    # `package()` to be more specific than it is.
    concrete_platform = deepcopy(platform)
    gccboostrap_shard_idx = findfirst(x -> x.name == "GCCBootstrap" &&
                                      arch(x.target) == arch(platform) &&
                                      libc(x.target) == libc(platform),
                                      shards)
    if !isnothing(gccboostrap_shard_idx)
        cs = shards[gccboostrap_shard_idx]
        concrete_platform["libgfortran_version"] = string(preferred_libgfortran_version(platform, cs))
        concrete_platform["cxxstring_abi"] = string(preferred_cxxstring_abi(platform, cs))
        if haskey(cs.target, "os_version")
            concrete_platform["os_version"] = cs.target["os_version"]
        end
    end
    return concrete_platform
end

"""
    get_concrete_platform(platform::AbstractPlatform;
                          preferred_gcc_version = nothing,
                          preferred_llvm_version = nothing,
                          compilers = nothing)

Return the concrete platform for the given `platform` based on the GCC compiler
ABI.  The set of shards is chosen by the keyword arguments (see [`choose_shards`](@ref)).
"""
function get_concrete_platform(platform::AbstractPlatform; kwargs...)
    shards = choose_shards(platform; kwargs...)
    return get_concrete_platform(platform, shards)
end

# XXX: we want the AnyPlatform to look like `x86_64-linux-musl`,
get_concrete_platform(::AnyPlatform, shards::Vector{CompilerShard}) =
    get_concrete_platform(default_host_platform, shards)


text:
isinstalled(pkg) = isdir(Pkg.dir(pkg))
function installgizmo(pkg)
    isinstalled(pkg) || Pkg.clone("https://github.com/JuliaGizmos/$(pkg).jl")
end
function installweb(pkg)
    if isinstalled(pkg)
        Pkg.checkout(pkg)
    else
        Pkg.clone("https://github.com/SimonDanisch/$(pkg).jl")
    end
end

installweb("WebWidgets")
installweb("WebPlayer")
installweb("WebStitcher")

installgizmo("WebIO"); Pkg.checkout("WebIO", "legacy")
Pkg.checkout("Observables")
installgizmo("Vue");Pkg.checkout("Vue", "legacy")
installgizmo("CSSUtil")
installgizmo("InteractNext");Pkg.checkout("InteractNext", "legacy")
asset_dir = Pkg.dir("WebStitcher", "assets")
wio_asset_dir = Pkg.dir("WebIO", "assets")
for elem in readdir(asset_dir)
    file_source = joinpath(asset_dir, elem)
    file_target = joinpath(wio_asset_dir, elem)
    if !(isfile(file_target) || isdir(file_target))
        try
            println("Copying: $file_target")
            cp(file_source, file_target)
        catch e
            warn(e)
        end
    end
end


text:
# This file was generated by the Julia Swagger Code Generator
# Do not modify this file directly. Modify the swagger specification instead.

@doc raw"""CSINode holds information about all CSI drivers installed on a node. CSI drivers do not need to create the CSINode object directly. As long as they use the node-driver-registrar sidecar container, the kubelet will automatically populate the CSINode object for the CSI driver as part of kubelet plugin registration. CSINode has the same name as a node. If the object is missing, it means either there are no CSI Drivers available on the node, or the Kubelet version is low enough that it doesn't create this object. CSINode has an OwnerReference that points to the corresponding node object.

    IoK8sApiStorageV1CSINode(;
        apiVersion=nothing,
        kind=nothing,
        metadata=nothing,
        spec=nothing,
    )

    - apiVersion::String : APIVersion defines the versioned schema of this representation of an object. Servers should convert recognized schemas to the latest internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources
    - kind::String : Kind is a string value representing the REST resource this object represents. Servers may infer this from the endpoint the client submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds
    - metadata::IoK8sApimachineryPkgApisMetaV1ObjectMeta : metadata.name must be the Kubernetes node name.
    - spec::IoK8sApiStorageV1CSINodeSpec : spec is the specification of CSINode
"""
mutable struct IoK8sApiStorageV1CSINode <: SwaggerModel
    apiVersion::Any # spec type: Union{ Nothing, String } # spec name: apiVersion
    kind::Any # spec type: Union{ Nothing, String } # spec name: kind
    metadata::Any # spec type: Union{ Nothing, IoK8sApimachineryPkgApisMetaV1ObjectMeta } # spec name: metadata
    spec::Any # spec type: Union{ Nothing, IoK8sApiStorageV1CSINodeSpec } # spec name: spec

    function IoK8sApiStorageV1CSINode(;apiVersion=nothing, kind=nothing, metadata=nothing, spec=nothing)
        o = new()
        validate_property(IoK8sApiStorageV1CSINode, Symbol("apiVersion"), apiVersion)
        setfield!(o, Symbol("apiVersion"), apiVersion)
        validate_property(IoK8sApiStorageV1CSINode, Symbol("kind"), kind)
        setfield!(o, Symbol("kind"), kind)
        validate_property(IoK8sApiStorageV1CSINode, Symbol("metadata"), metadata)
        setfield!(o, Symbol("metadata"), metadata)
        validate_property(IoK8sApiStorageV1CSINode, Symbol("spec"), spec)
        setfield!(o, Symbol("spec"), spec)
        o
    end
end # type IoK8sApiStorageV1CSINode

const _property_map_IoK8sApiStorageV1CSINode = Dict{Symbol,Symbol}(Symbol("apiVersion")=>Symbol("apiVersion"), Symbol("kind")=>Symbol("kind"), Symbol("metadata")=>Symbol("metadata"), Symbol("spec")=>Symbol("spec"))
const _property_types_IoK8sApiStorageV1CSINode = Dict{Symbol,String}(Symbol("apiVersion")=>"String", Symbol("kind")=>"String", Symbol("metadata")=>"IoK8sApimachineryPkgApisMetaV1ObjectMeta", Symbol("spec")=>"IoK8sApiStorageV1CSINodeSpec")
Base.propertynames(::Type{ IoK8sApiStorageV1CSINode }) = collect(keys(_property_map_IoK8sApiStorageV1CSINode))
Swagger.property_type(::Type{ IoK8sApiStorageV1CSINode }, name::Symbol) = Union{Nothing,eval(Base.Meta.parse(_property_types_IoK8sApiStorageV1CSINode[name]))}
Swagger.field_name(::Type{ IoK8sApiStorageV1CSINode }, property_name::Symbol) =  _property_map_IoK8sApiStorageV1CSINode[property_name]

function check_required(o::IoK8sApiStorageV1CSINode)
    (getproperty(o, Symbol("spec")) === nothing) && (return false)
    true
end

function validate_property(::Type{ IoK8sApiStorageV1CSINode }, name::Symbol, val)
end