diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 74576611..9128b905 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,8 +1,8 @@ // For format details, see https://aka.ms/devcontainer.json. For config options, see the README at: // https://github.com/microsoft/vscode-dev-containers/tree/v0.224.2/containers/docker-existing-dockerfile { - "name": "rwnd", - "image": "ccanel/rwnd:latest", + "name": "ratemon", + "image": "ccanel/ratemon:latest", // Sets the run context to one level up instead of the .devcontainer folder. "context": "..", // Update the 'dockerFile' property if you aren't using the standard 'Dockerfile' filename. diff --git a/.vscode/launch.json b/.vscode/launch.json index 3cef2e5b..9f077bc5 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -8,7 +8,7 @@ "name": "(d) runtime", "type": "python", "request": "launch", - "program": "${workspaceFolder}/rwnd/runtime/rwnd_runtime.py", + "program": "${workspaceFolder}/ratemon/runtime/ratemon_runtime.py", "console": "integratedTerminal", "args": [ "-h" @@ -26,7 +26,7 @@ "name": "(r) runtime", "type": "python", "request": "launch", - "program": "${workspaceFolder}/rwnd/runtime/rwnd_runtime.py", + "program": "${workspaceFolder}/ratemon/runtime/ratemon_runtime.py", "console": "integratedTerminal", "args": [ "--model=HistGbdtSklearn", @@ -36,7 +36,7 @@ "--cgroup=${workspaceFolder}/test/test_cgroup", "--inference-interval-ms=100", "--batch-size=10", - "--log=/tmp/rwnd.log", + "--log=/tmp/ratemon.log", "--skip-localhost", "--listen-ports=9999", "--debug", @@ -56,17 +56,17 @@ "name": "(r) runtime, schedule", "type": "python", "request": "launch", - "program": "${workspaceFolder}/rwnd/runtime/rwnd_runtime.py", + "program": "${workspaceFolder}/ratemon/runtime/ratemon_runtime.py", "console": "integratedTerminal", "args": [ "--model=HistGbdtSklearn", "--model-file=${workspaceFolder}/test/HistGbdtSklearn_fewer_features.pickle", "--interface=ens3", "--reaction-strategy=file", - "--schedule=${workspaceFolder}/test/rwnd_schedule_step.csv", + "--schedule=${workspaceFolder}/test/ratemon_schedule_step.csv", "--cgroup=${workspaceFolder}/test/test_cgroup", "--inference-interval-ms=1000", - "--log=/tmp/rwnd.log", + "--log=/tmp/ratemon.log", // "--disable-inference" ], "autoReload": { @@ -87,14 +87,14 @@ "args": [ "-o", "/tmp/tmp.prof", - "${workspaceFolder}/rwnd/runtime/rwnd_runtime.py", + "${workspaceFolder}/ratemon/runtime/ratemon_runtime.py", "--model=HistGbdtSklearn", "--model-file=${workspaceFolder}/test/HistGbdtSklearn_fewer_features.pickle", "--interface=ens3", "--reaction-strategy=aimd", "--cgroup=${workspaceFolder}/test/test_cgroup", "--inference-interval-ms=1000", - "--log=/tmp/rwnd.log", + "--log=/tmp/ratemon.log", // "--skip-localhost", "--constrain-port", "--debug", @@ -113,7 +113,7 @@ "name": "(r) train cubic bbr", "type": "python", "request": "launch", - "program": "${workspaceFolder}/rwnd/model/train.py", + "program": "${workspaceFolder}/ratemon/model/train.py", "console": "integratedTerminal", "args": [ "--no-rand", @@ -147,7 +147,7 @@ "name": "(r) prepare_data", "type": "python", "request": "launch", - "program": "${workspaceFolder}/rwnd/model/prepare_data.py", + "program": "${workspaceFolder}/ratemon/model/prepare_data.py", "console": "integratedTerminal", "args": [ "--data-dir=/home/ccanel/fawnstore2/out/cloudlab/2021-5-12/cubic-bbr", @@ -172,7 +172,7 @@ "name": "(r) gen_features", "type": "python", "request": "launch", - "program": "${workspaceFolder}/rwnd/model/gen_features.py", + "program": "${workspaceFolder}/ratemon/model/gen_features.py", "console": "integratedTerminal", "args": [ "--exp-dir=/home/ccanel/fawnstore2/out/cloudlab/2022-06-10/cubic-bbr/experiments", @@ -195,7 +195,7 @@ "name": "(r) eval", "type": "python", "request": "launch", - "program": "${workspaceFolder}/rwnd/scripts/eval.py", + "program": "${workspaceFolder}/ratemon/scripts/eval.py", "console": "integratedTerminal", "args": [ "--exp-dir=/home/ccanel/out/cloudlab/2022-4-21/", diff --git a/README.md b/README.md index 50c61eb2..8d5c8e03 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,2 @@ -# rwnd +# RateMon Receiver-side mechanisms for rate control of TCP flows. diff --git a/fstab b/fstab index 73f7d33a..32484572 100644 --- a/fstab +++ b/fstab @@ -1,3 +1,3 @@ # /etc/fstab configuration for MAAS cluster -192.168.0.11:/volume1/datapository/users/ccanel/rwnd /home/ubuntu/fawnstore2 nfs rw,soft,intr,nofail 2 0 +192.168.0.11:/volume1/datapository/users/ccanel/ratemon /home/ubuntu/fawnstore2 nfs rw,soft,intr,nofail 2 0 tmpfs /tmp tmpfs defaults,noatime,nosuid,nodev,noexec,mode=1777,size=50G 0 0 \ No newline at end of file diff --git a/rwnd/__init__.py b/ratemon/__init__.py similarity index 100% rename from rwnd/__init__.py rename to ratemon/__init__.py diff --git a/rwnd/model/.gitignore b/ratemon/model/.gitignore similarity index 100% rename from rwnd/model/.gitignore rename to ratemon/model/.gitignore diff --git a/rwnd/model/__init__.py b/ratemon/model/__init__.py similarity index 100% rename from rwnd/model/__init__.py rename to ratemon/model/__init__.py diff --git a/rwnd/model/check_mathis_accuracy.py b/ratemon/model/check_mathis_accuracy.py similarity index 100% rename from rwnd/model/check_mathis_accuracy.py rename to ratemon/model/check_mathis_accuracy.py diff --git a/rwnd/model/cl_args.py b/ratemon/model/cl_args.py similarity index 99% rename from rwnd/model/cl_args.py rename to ratemon/model/cl_args.py index f07b178a..350355b8 100644 --- a/rwnd/model/cl_args.py +++ b/ratemon/model/cl_args.py @@ -3,7 +3,7 @@ import os from os import path -from rwnd.model import defaults, models +from ratemon.model import defaults, models def add_out(psr, psr_verify=lambda args: args): diff --git a/rwnd/model/correlation.py b/ratemon/model/correlation.py similarity index 100% rename from rwnd/model/correlation.py rename to ratemon/model/correlation.py diff --git a/rwnd/model/data.py b/ratemon/model/data.py similarity index 99% rename from rwnd/model/data.py rename to ratemon/model/data.py index 412bf7aa..d8125a04 100644 --- a/rwnd/model/data.py +++ b/ratemon/model/data.py @@ -8,7 +8,7 @@ from numpy.lib import recfunctions import torch -from rwnd.model import defaults, features, models, utils +from ratemon.model import defaults, features, models, utils def get_dataloaders(args, net): diff --git a/rwnd/model/defaults.py b/ratemon/model/defaults.py similarity index 100% rename from rwnd/model/defaults.py rename to ratemon/model/defaults.py diff --git a/rwnd/model/features.py b/ratemon/model/features.py similarity index 99% rename from rwnd/model/features.py rename to ratemon/model/features.py index bfcb8954..178716fe 100644 --- a/rwnd/model/features.py +++ b/ratemon/model/features.py @@ -2,7 +2,7 @@ import itertools -from rwnd.model import defaults +from ratemon.model import defaults def make_ewma_metric(metric, alpha): diff --git a/rwnd/model/fet_hists.py b/ratemon/model/fet_hists.py similarity index 100% rename from rwnd/model/fet_hists.py rename to ratemon/model/fet_hists.py diff --git a/rwnd/model/gen_features.py b/ratemon/model/gen_features.py similarity index 99% rename from rwnd/model/gen_features.py rename to ratemon/model/gen_features.py index 71de918d..268bf988 100755 --- a/rwnd/model/gen_features.py +++ b/ratemon/model/gen_features.py @@ -19,7 +19,7 @@ import json import numpy as np -from rwnd.model import cl_args, defaults, features, loss_event_rate, utils +from ratemon.model import cl_args, defaults, features, loss_event_rate, utils def get_time_bounds(pkts, direction="data"): diff --git a/rwnd/model/gen_training_data.py b/ratemon/model/gen_training_data.py similarity index 100% rename from rwnd/model/gen_training_data.py rename to ratemon/model/gen_training_data.py diff --git a/rwnd/model/graph_one.py b/ratemon/model/graph_one.py similarity index 100% rename from rwnd/model/graph_one.py rename to ratemon/model/graph_one.py diff --git a/rwnd/model/hyper.py b/ratemon/model/hyper.py similarity index 100% rename from rwnd/model/hyper.py rename to ratemon/model/hyper.py diff --git a/rwnd/model/loss_event_rate.py b/ratemon/model/loss_event_rate.py similarity index 99% rename from rwnd/model/loss_event_rate.py rename to ratemon/model/loss_event_rate.py index 80e2f437..2d5bb0d8 100644 --- a/rwnd/model/loss_event_rate.py +++ b/ratemon/model/loss_event_rate.py @@ -3,7 +3,7 @@ import collections import logging -from rwnd.model import features +from ratemon.model import features class LossTracker: diff --git a/rwnd/model/models.py b/ratemon/model/models.py similarity index 99% rename from rwnd/model/models.py rename to ratemon/model/models.py index 45709f3e..ad19e3e2 100644 --- a/rwnd/model/models.py +++ b/ratemon/model/models.py @@ -17,7 +17,7 @@ from sklearn import svm import torch -from rwnd.model import defaults, features, utils +from ratemon.model import defaults, features, utils SMOOTHING_THRESHOLD = 0.4 diff --git a/rwnd/model/parse_validation_exps.sh b/ratemon/model/parse_validation_exps.sh similarity index 86% rename from rwnd/model/parse_validation_exps.sh rename to ratemon/model/parse_validation_exps.sh index 18d4b4a3..1d8453bd 100755 --- a/rwnd/model/parse_validation_exps.sh +++ b/ratemon/model/parse_validation_exps.sh @@ -4,13 +4,13 @@ # validate the CloudLab parallel testbed. # # Usage: ./parse_validation_exps.sh \ -# \ +# \ # set -o errexit set -o nounset -RWND_DIR=$1 +RATEMON_DIR=$1 ITERS_DIR=$2 UNTAR_DIR=$3 DIRECTION=$4 @@ -23,7 +23,7 @@ parse_iter_batchsize () { ITER=$1 BATCH_SIZE=$2 EXP_DIR="$ITERS_DIR/iter_$ITER/batchsize_$BATCH_SIZE" - python "$RWND_DIR/model/parse_cloudlab.py" --exp-dir "$EXP_DIR" \ + python "$RATEMON_DIR/model/parse_cloudlab.py" --exp-dir "$EXP_DIR" \ --untar-dir "$UNTAR_DIR" --out-dir "$EXP_DIR" \ --skip-smoothed-features } diff --git a/rwnd/model/prepare_data.py b/ratemon/model/prepare_data.py similarity index 99% rename from rwnd/model/prepare_data.py rename to ratemon/model/prepare_data.py index 9cd2084f..8141fac7 100755 --- a/rwnd/model/prepare_data.py +++ b/ratemon/model/prepare_data.py @@ -17,7 +17,7 @@ import numpy as np -from rwnd.model import cl_args, defaults, features, models, utils +from ratemon.model import cl_args, defaults, features, models, utils SPLIT_NAMES = ["train", "val", "test"] diff --git a/rwnd/model/requirements.txt b/ratemon/model/requirements.txt similarity index 100% rename from rwnd/model/requirements.txt rename to ratemon/model/requirements.txt diff --git a/rwnd/model/sim.py b/ratemon/model/sim.py similarity index 98% rename from rwnd/model/sim.py rename to ratemon/model/sim.py index 54ae37e2..5ea48cdb 100755 --- a/rwnd/model/sim.py +++ b/ratemon/model/sim.py @@ -12,7 +12,7 @@ # Path to the ns-3 top-level directory. -# Warning: If you move this file from the directory "rwnd/model", then you +# Warning: If you move this file from the directory "ratemon/model", then you # must update this variable. NS3_DIR = path.join(path.dirname(path.realpath(__file__)), "..", "ns-3-unfair") # The name of the ns-3 application to run. diff --git a/rwnd/model/test.py b/ratemon/model/test.py similarity index 100% rename from rwnd/model/test.py rename to ratemon/model/test.py diff --git a/rwnd/model/test_all.py b/ratemon/model/test_all.py similarity index 100% rename from rwnd/model/test_all.py rename to ratemon/model/test_all.py diff --git a/rwnd/model/test_data/1-3-False-100-2-False-5.0-linear-0.001-10-1-LrSklearn-0.09-False-0-2-l1-False-None-False-False-9223372036854775807-0-9223372036854775807-0.1-10-0.pickle b/ratemon/model/test_data/1-3-False-100-2-False-5.0-linear-0.001-10-1-LrSklearn-0.09-False-0-2-l1-False-None-False-False-9223372036854775807-0-9223372036854775807-0.1-10-0.pickle similarity index 100% rename from rwnd/model/test_data/1-3-False-100-2-False-5.0-linear-0.001-10-1-LrSklearn-0.09-False-0-2-l1-False-None-False-False-9223372036854775807-0-9223372036854775807-0.1-10-0.pickle rename to ratemon/model/test_data/1-3-False-100-2-False-5.0-linear-0.001-10-1-LrSklearn-0.09-False-0-2-l1-False-None-False-False-9223372036854775807-0-9223372036854775807-0.1-10-0.pickle diff --git a/rwnd/model/test_data/1-3-False-100-2-False-5.0-linear-0.001-10-20-LrSklearn-0.09-False-0-1000-l1-False-None-True-False-9223372036854775807-0-9223372036854775807-0.1-10-0.pickle b/ratemon/model/test_data/1-3-False-100-2-False-5.0-linear-0.001-10-20-LrSklearn-0.09-False-0-1000-l1-False-None-True-False-9223372036854775807-0-9223372036854775807-0.1-10-0.pickle similarity index 100% rename from rwnd/model/test_data/1-3-False-100-2-False-5.0-linear-0.001-10-20-LrSklearn-0.09-False-0-1000-l1-False-None-True-False-9223372036854775807-0-9223372036854775807-0.1-10-0.pickle rename to ratemon/model/test_data/1-3-False-100-2-False-5.0-linear-0.001-10-20-LrSklearn-0.09-False-0-1000-l1-False-None-True-False-9223372036854775807-0-9223372036854775807-0.1-10-0.pickle diff --git a/rwnd/model/test_data/experiments/unfair-bbr-cubic-30bw-10rtt-1024q-1bbr-9cubic-100s-20210111T000310.tar.gz b/ratemon/model/test_data/experiments/unfair-bbr-cubic-30bw-10rtt-1024q-1bbr-9cubic-100s-20210111T000310.tar.gz similarity index 100% rename from rwnd/model/test_data/experiments/unfair-bbr-cubic-30bw-10rtt-1024q-1bbr-9cubic-100s-20210111T000310.tar.gz rename to ratemon/model/test_data/experiments/unfair-bbr-cubic-30bw-10rtt-1024q-1bbr-9cubic-100s-20210111T000310.tar.gz diff --git a/rwnd/model/test_data/scale_params.json b/ratemon/model/test_data/scale_params.json similarity index 100% rename from rwnd/model/test_data/scale_params.json rename to ratemon/model/test_data/scale_params.json diff --git a/rwnd/model/test_data/simulations/unfair-bbr-cubic-2bw-18rtt-128q-1bbr-10cubic-100s-20201202T225122.npz b/ratemon/model/test_data/simulations/unfair-bbr-cubic-2bw-18rtt-128q-1bbr-10cubic-100s-20201202T225122.npz similarity index 100% rename from rwnd/model/test_data/simulations/unfair-bbr-cubic-2bw-18rtt-128q-1bbr-10cubic-100s-20201202T225122.npz rename to ratemon/model/test_data/simulations/unfair-bbr-cubic-2bw-18rtt-128q-1bbr-10cubic-100s-20201202T225122.npz diff --git a/rwnd/model/test_data/simulations/unfair-bbr-cubic-30bw-10rtt-1024q-1bbr-9cubic-100s-20210111T000310.npz b/ratemon/model/test_data/simulations/unfair-bbr-cubic-30bw-10rtt-1024q-1bbr-9cubic-100s-20210111T000310.npz similarity index 100% rename from rwnd/model/test_data/simulations/unfair-bbr-cubic-30bw-10rtt-1024q-1bbr-9cubic-100s-20210111T000310.npz rename to ratemon/model/test_data/simulations/unfair-bbr-cubic-30bw-10rtt-1024q-1bbr-9cubic-100s-20210111T000310.npz diff --git a/rwnd/model/test_data/untar/.gitignore b/ratemon/model/test_data/untar/.gitignore similarity index 100% rename from rwnd/model/test_data/untar/.gitignore rename to ratemon/model/test_data/untar/.gitignore diff --git a/rwnd/model/tests.py b/ratemon/model/tests.py similarity index 100% rename from rwnd/model/tests.py rename to ratemon/model/tests.py diff --git a/rwnd/model/train.py b/ratemon/model/train.py similarity index 99% rename from rwnd/model/train.py rename to ratemon/model/train.py index fa60912e..c38ce546 100755 --- a/rwnd/model/train.py +++ b/ratemon/model/train.py @@ -31,7 +31,7 @@ import torch -from rwnd.model import cl_args, data, defaults, models, utils +from ratemon.model import cl_args, data, defaults, models, utils # The threshold of the new throughout to the old throughput above which a diff --git a/rwnd/model/trained_models/ai_final_report.csv b/ratemon/model/trained_models/ai_final_report.csv similarity index 100% rename from rwnd/model/trained_models/ai_final_report.csv rename to ratemon/model/trained_models/ai_final_report.csv diff --git a/rwnd/model/trained_models/ai_final_report.pth b/ratemon/model/trained_models/ai_final_report.pth similarity index 100% rename from rwnd/model/trained_models/ai_final_report.pth rename to ratemon/model/trained_models/ai_final_report.pth diff --git a/rwnd/model/training_param_sweep.py b/ratemon/model/training_param_sweep.py similarity index 100% rename from rwnd/model/training_param_sweep.py rename to ratemon/model/training_param_sweep.py diff --git a/rwnd/model/utils.py b/ratemon/model/utils.py similarity index 99% rename from rwnd/model/utils.py rename to ratemon/model/utils.py index 07e050b7..e98ec196 100644 --- a/rwnd/model/utils.py +++ b/ratemon/model/utils.py @@ -29,7 +29,7 @@ from sklearn import inspection import torch -from rwnd.model import defaults, features +from ratemon.model import defaults, features # Values considered unsafe for division and min(). diff --git a/rwnd/model/validate_sim.py b/ratemon/model/validate_sim.py similarity index 100% rename from rwnd/model/validate_sim.py rename to ratemon/model/validate_sim.py diff --git a/rwnd/runtime/__init__.py b/ratemon/runtime/__init__.py similarity index 100% rename from rwnd/runtime/__init__.py rename to ratemon/runtime/__init__.py diff --git a/rwnd/runtime/flow_utils.py b/ratemon/runtime/flow_utils.py similarity index 99% rename from rwnd/runtime/flow_utils.py rename to ratemon/runtime/flow_utils.py index c52d0106..2964de5e 100644 --- a/rwnd/runtime/flow_utils.py +++ b/ratemon/runtime/flow_utils.py @@ -6,7 +6,7 @@ import threading import time -from rwnd.model import defaults, loss_event_rate, utils +from ratemon.model import defaults, loss_event_rate, utils class FlowKey(ctypes.Structure): diff --git a/rwnd/runtime/inference.py b/ratemon/runtime/inference.py similarity index 99% rename from rwnd/runtime/inference.py rename to ratemon/runtime/inference.py index d845ce7b..ee5c1dc3 100644 --- a/rwnd/runtime/inference.py +++ b/ratemon/runtime/inference.py @@ -15,9 +15,9 @@ from pyroute2 import IPRoute, protocols from pyroute2.netlink.exceptions import NetlinkError -from rwnd.model import data, defaults, features, gen_features, models, utils -from rwnd.runtime import flow_utils, reaction_strategy -from rwnd.runtime.reaction_strategy import ReactionStrategy +from ratemon.model import data, defaults, features, gen_features, models, utils +from ratemon.runtime import flow_utils, reaction_strategy +from ratemon.runtime.reaction_strategy import ReactionStrategy def predict(net, in_fets, debug=False): @@ -417,7 +417,7 @@ def load_bpf(): # Load BPF text. bpf_flp = path.join( path.abspath(path.dirname(__file__)), - "rwnd_runtime.c", + "ratemon_runtime.c", ) if not path.isfile(bpf_flp): logging.error("Could not find BPF program: %s", bpf_flp) diff --git a/rwnd/runtime/mitigation_strategy.py b/ratemon/runtime/mitigation_strategy.py similarity index 100% rename from rwnd/runtime/mitigation_strategy.py rename to ratemon/runtime/mitigation_strategy.py diff --git a/rwnd/runtime/pacing_notes.py b/ratemon/runtime/pacing_notes.py similarity index 100% rename from rwnd/runtime/pacing_notes.py rename to ratemon/runtime/pacing_notes.py diff --git a/rwnd/runtime/rwnd_runtime.c b/ratemon/runtime/ratemon_runtime.c similarity index 100% rename from rwnd/runtime/rwnd_runtime.c rename to ratemon/runtime/ratemon_runtime.c diff --git a/rwnd/runtime/rwnd_runtime.py b/ratemon/runtime/ratemon_runtime.py similarity index 98% rename from rwnd/runtime/rwnd_runtime.py rename to ratemon/runtime/ratemon_runtime.py index 368cce17..f98eac9b 100644 --- a/rwnd/runtime/rwnd_runtime.py +++ b/ratemon/runtime/ratemon_runtime.py @@ -16,10 +16,10 @@ import netifaces as ni import pcapy -from rwnd.model import features, models, utils -from rwnd.runtime import flow_utils, inference, mitigation_strategy, reaction_strategy -from rwnd.runtime.mitigation_strategy import MitigationStrategy -from rwnd.runtime.reaction_strategy import ReactionStrategy +from ratemon.model import features, models, utils +from ratemon.runtime import flow_utils, inference, mitigation_strategy, reaction_strategy +from ratemon.runtime.mitigation_strategy import MitigationStrategy +from ratemon.runtime.reaction_strategy import ReactionStrategy LOCALHOST = utils.ip_str_to_int("127.0.0.1") diff --git a/rwnd/runtime/reaction_strategy.py b/ratemon/runtime/reaction_strategy.py similarity index 100% rename from rwnd/runtime/reaction_strategy.py rename to ratemon/runtime/reaction_strategy.py diff --git a/rwnd/scripts/__init__.py b/ratemon/scripts/__init__.py similarity index 100% rename from rwnd/scripts/__init__.py rename to ratemon/scripts/__init__.py diff --git a/rwnd/scripts/eval.py b/ratemon/scripts/eval.py similarity index 99% rename from rwnd/scripts/eval.py rename to ratemon/scripts/eval.py index 6f73b666..8f95ed44 100755 --- a/rwnd/scripts/eval.py +++ b/ratemon/scripts/eval.py @@ -16,7 +16,7 @@ import matplotlib.pyplot as plt import numpy as np -from rwnd.model import defaults, features, gen_features, utils +from ratemon.model import defaults, features, gen_features, utils FIGSIZE = (5, 2.2) FIGSIZE_BOX = (5, 3.5) diff --git a/rwnd/scripts/graph_all_ccas.py b/ratemon/scripts/graph_all_ccas.py similarity index 99% rename from rwnd/scripts/graph_all_ccas.py rename to ratemon/scripts/graph_all_ccas.py index 6d25af24..fc129363 100644 --- a/rwnd/scripts/graph_all_ccas.py +++ b/ratemon/scripts/graph_all_ccas.py @@ -9,8 +9,8 @@ import numpy as np -from rwnd.scripts import eval as evl -from rwnd.model import utils +from ratemon.scripts import eval as evl +from ratemon.model import utils def load_results(args): diff --git a/rwnd/scripts/max_leaf_nodes.py b/ratemon/scripts/max_leaf_nodes.py similarity index 100% rename from rwnd/scripts/max_leaf_nodes.py rename to ratemon/scripts/max_leaf_nodes.py diff --git a/rwnd/scripts/prepare_data_all_generalized.sh b/ratemon/scripts/prepare_data_all_generalized.sh similarity index 80% rename from rwnd/scripts/prepare_data_all_generalized.sh rename to ratemon/scripts/prepare_data_all_generalized.sh index 3a6d4e71..db1579ad 100755 --- a/rwnd/scripts/prepare_data_all_generalized.sh +++ b/ratemon/scripts/prepare_data_all_generalized.sh @@ -4,7 +4,7 @@ set -eou pipefail base_dir="$HOME/fawnstore2/out/cloudlab/2021-5-12" -source "$HOME/src/rwnd/.venv/bin/activate" +source "$HOME/src/ratemon/.venv/bin/activate" for dir in "$base_dir"/*; do pair="$(echo "$dir" | cut -d'/' -f 8)" @@ -13,7 +13,7 @@ for dir in "$base_dir"/*; do fi out_dir="$dir/new_splits" echo "Preparing data for: $dir -> $out_dir" - PYTHONPATH="$HOME/src/rwnd" python "$HOME/src/rwnd/rwnd/model/prepare_data.py" \ + PYTHONPATH="$HOME/src/ratemon" python "$HOME/src/ratemon/ratemon/model/prepare_data.py" \ --data-dir="$dir" \ --train-split=70 \ --val-split=0 \ diff --git a/rwnd/scripts/train.sh b/ratemon/scripts/train.sh similarity index 93% rename from rwnd/scripts/train.sh rename to ratemon/scripts/train.sh index 4d1260e6..d902db73 100755 --- a/rwnd/scripts/train.sh +++ b/ratemon/scripts/train.sh @@ -52,12 +52,12 @@ set +u source "$venv_dir/bin/activate" set -u -rwnd_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)/../.." +ratemon_dir="$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &>/dev/null && pwd)/../.." pushd /tmp # Step 4: Select features from initial model echo "Training model with all features. Progress: tail -f /tmp/train.log" -bash -x -c "PYTHONPATH='$rwnd_dir' python '$rwnd_dir/rwnd/model/train.py' \ +bash -x -c "PYTHONPATH='$ratemon_dir' python '$ratemon_dir/ratemon/model/train.py' \ --no-rand \ --tag='$model_tag' \ --data-dir='$train_data_dir' \ @@ -88,7 +88,7 @@ mv -fv "/tmp/train.log" "$full_models_dir/${model_tag}_train.log" # Step 5: Train model with selected features echo "Training model with selected features. Progress: tail -f /tmp/train.log" -bash -x -c "PYTHONPATH='$rwnd_dir' python '$rwnd_dir/rwnd/model/train.py' \ +bash -x -c "PYTHONPATH='$ratemon_dir' python '$ratemon_dir/ratemon/model/train.py' \ --no-rand \ --tag='${model_tag}_selected-features' \ --data-dir='$train_data_dir' \ diff --git a/rwnd/scripts/train_composite.sh b/ratemon/scripts/train_composite.sh similarity index 86% rename from rwnd/scripts/train_composite.sh rename to ratemon/scripts/train_composite.sh index 7851a191..30676d3f 100755 --- a/rwnd/scripts/train_composite.sh +++ b/ratemon/scripts/train_composite.sh @@ -15,11 +15,11 @@ set -o errexit exp_dir="$1" out_dir="$2" tag="$3" -rwnd_dir="$(cd "$(dirname "$0")"/.. && pwd)" -workspace_dir="$(dirname "$rwnd_dir")" +ratemon_dir="$(cd "$(dirname "$0")"/.. && pwd)" +workspace_dir="$(dirname "$ratemon_dir")" export PYTHONPATH="$workspace_dir:$PYTHONPATH" -# python "$rwnd_dir/model/gen_features.py" \ +# python "$ratemon_dir/model/gen_features.py" \ # --exp-dir="$exp_dir" \ # --untar-dir="$exp_dir" \ # --out-dir="$exp_dir" \ @@ -30,7 +30,7 @@ prepare() { cur_exp_dir="$exp_dir/cubic-$1" tmp_dir="/tmp/prepare_data/cubic-$1" mkdir -p "$tmp_dir" - python "$rwnd_dir/model/prepare_data.py" \ + python "$ratemon_dir/model/prepare_data.py" \ --data-dir="$cur_exp_dir" \ --out-dir="$tmp_dir" \ --model=HistGbdtSklearn \ @@ -48,7 +48,7 @@ for cca in "highspeed" "illinois" "vivace"; do prepare "$cca" done -# python "$rwnd_dir/model/train.py" \ +# python "$ratemon_dir/model/train.py" \ # --out-dir="$out_dir" \ # --data-dir="$out_dir"\ # --model=HistGbdtSklearn \ diff --git a/rwnd/scripts/train_max_leaf_nodes.sh b/ratemon/scripts/train_max_leaf_nodes.sh similarity index 85% rename from rwnd/scripts/train_max_leaf_nodes.sh rename to ratemon/scripts/train_max_leaf_nodes.sh index ad18fb0e..1942e3f6 100755 --- a/rwnd/scripts/train_max_leaf_nodes.sh +++ b/ratemon/scripts/train_max_leaf_nodes.sh @@ -15,16 +15,16 @@ set -o errexit exp_dir="$1" out_dir="$2" tag="$3" -rwnd_dir="$(cd "$(dirname "$0")"/.. && pwd)" -workspace_dir="$(dirname "$rwnd_dir")" +ratemon_dir="$(cd "$(dirname "$0")"/.. && pwd)" +workspace_dir="$(dirname "$ratemon_dir")" export PYTHONPATH="$workspace_dir:$PYTHONPATH" -# python "$rwnd_dir/model/gen_features.py" \ +# python "$ratemon_dir/model/gen_features.py" \ # --exp-dir="$exp_dir" \ # --untar-dir="$exp_dir" \ # --out-dir="$exp_dir" \ # --parallel=20 -# python "$rwnd_dir/model/prepare_data.py" \ +# python "$ratemon_dir/model/prepare_data.py" \ # --data-dir="$exp_dir" \ # --out-dir="$out_dir" \ # --model=HistGbdtSklearn \ @@ -36,7 +36,7 @@ export PYTHONPATH="$workspace_dir:$PYTHONPATH" # 100 250 500 1000 250 5000 10000 31 -1 # 25000 50000 100000 200000 for max_leaf_nodes in 250; do - OMP_NUM_THREADS=10 python "$rwnd_dir/model/train.py" \ + OMP_NUM_THREADS=10 python "$ratemon_dir/model/train.py" \ --out-dir="${out_dir}/vary_max_leaf_nodes/${max_leaf_nodes}" \ --data-dir="${out_dir}" \ --model=HistGbdtSklearn \ diff --git a/rwnd/scripts/train_old.sh b/ratemon/scripts/train_old.sh similarity index 86% rename from rwnd/scripts/train_old.sh rename to ratemon/scripts/train_old.sh index 23f5552f..a2f47687 100755 --- a/rwnd/scripts/train_old.sh +++ b/ratemon/scripts/train_old.sh @@ -15,16 +15,16 @@ set -o errexit exp_dir="$1" out_dir="$2" tag="$3" -rwnd_dir="$(cd "$(dirname "$0")"/.. && pwd)" -workspace_dir="$(dirname "$rwnd_dir")" +ratemon_dir="$(cd "$(dirname "$0")"/.. && pwd)" +workspace_dir="$(dirname "$ratemon_dir")" export PYTHONPATH="$workspace_dir:$PYTHONPATH" -# python "$rwnd_dir/model/gen_features.py" \ +# python "$ratemon_dir/model/gen_features.py" \ # --exp-dir="$exp_dir" \ # --untar-dir="$exp_dir" \ # --out-dir="$exp_dir" \ # --parallel=20 -# python "$rwnd_dir/model/prepare_data.py" \ +# python "$ratemon_dir/model/prepare_data.py" \ # --data-dir="$exp_dir" \ # --out-dir="$out_dir" \ # --model=HistGbdtSklearn \ @@ -34,7 +34,7 @@ export PYTHONPATH="$workspace_dir:$PYTHONPATH" # --warmup-percent=5 \ # --sample-percent=20 for max_leaf_nodes in 100 250 500 1000 250 5000 10000 31 -1; do - python "$rwnd_dir/model/train.py" \ + python "$ratemon_dir/model/train.py" \ --out-dir="${out_dir}/vary_max_leaf_nodes/${max_leaf_nodes}" \ --data-dir="${out_dir}" \ --model=HistGbdtSklearn \