Skip to content

Commit

Permalink
benchmark - aligning with branch 'deep', throw away changes pulled fr…
Browse files Browse the repository at this point in the history
…om 'main'
  • Loading branch information
yonatankarni committed Jan 8, 2023
1 parent 406182f commit 20571ca
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
12 changes: 4 additions & 8 deletions benchmark/benchmark.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ def rprint(*args, **kwargs):
if action in ["cleanup", "generate", "all"]:
cleanup()

train_examples = 1_000_000
test_examples = 1_000_000
train_examples = 10000000
test_examples = 10000000
feature_variety = 1000
num_random_features = 10

Expand Down Expand Up @@ -366,9 +366,7 @@ def rprint(*args, **kwargs):

if use_plots and action in ["all", "train", "predict", "train+predict"]:
plot_file_name = "benchmark_results.png"
left_label = "Vowpal Wabbit" if benchmark_vw else None
right_label = "Fwumious Wabbit" if benchmark_vw else None
plot_results(f"work_dir/{plot_file_name}", left_label, right_label, actions, vw_time_values, fw_time_values, vw_mem_values, fw_mem_values, vw_cpu_values, fw_cpu_values)
plot_results(f"work_dir/{plot_file_name}", 'Vowpal Wabbit', "Fwumious Wabbit", actions, vw_time_values, fw_time_values, vw_mem_values, fw_mem_values, vw_cpu_values, fw_cpu_values)
rprint(f"![benchmark results]({plot_file_name})")

if action in ["train", "predict", "train+predict", "all"]:
Expand Down Expand Up @@ -496,9 +494,7 @@ def rprint(*args, **kwargs):
Fwumious Wabbit FFM predictions loss: {fw_ffm_model_loss:.4f}
```
""")
vowpal_wabbit_version = None
if benchmark_vw:
vowpal_wabbit_version = subprocess.check_output(f"{VW} --version", shell=True).decode('utf-8').strip("\n")
vowpal_wabbit_version = subprocess.check_output(f"{VW} --version", shell=True).decode('utf-8').strip("\n")
fwumious_wabbit_version = subprocess.check_output(f"{FW} --version", shell=True).decode('utf-8').strip("\n")
fwumious_wabbit_revision = subprocess.check_output("git log | head -n 1", shell=True).decode('utf-8').split(" ")[1][0:7]

Expand Down
2 changes: 1 addition & 1 deletion benchmark/run_with_plots.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
cargo build --release
python3 benchmark.py fw all True
python3 benchmark.py all all True
2 changes: 1 addition & 1 deletion benchmark/run_with_plots_intel.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
export RUSTFLAGS="-C opt-level=3 -C target-cpu=skylake"
cargo build --release
python3 benchmark.py fw all True
python3 benchmark.py all all True
2 changes: 1 addition & 1 deletion benchmark/run_without_plots.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
#!/bin/bash
cargo build --release
python3 benchmark.py fw all False
python3 benchmark.py all all False

0 comments on commit 20571ca

Please sign in to comment.