Skip to content

Commit

Permalink
minor update
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmedcs committed Oct 3, 2022
1 parent 845ba28 commit 8c5c85b
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
3 changes: 2 additions & 1 deletion plots/plot_cmds.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Selection Adaptation (APT) - Fig 11: python plots/plot_exp.py 'exp_type' google_
```
### Commands to plot figures of the future proof
```
EAFL-vs-Oort-Future: python plots/plot_exp.py 'exp_type' google_speech_resnet34 'plot_scalesyspercent' 'Test' 1 10 1 oort
Oort-Future: python plots/plot_exp.py 'exp_type' google_speech_resnet34 'plot_scalesyspercent' 'Test' 1 10 1 oort
REFL-Future: python plots/plot_exp.py 'exp_type' google_speech_resnet34 'plot_scalesyspercent' 'Test' 1 10 1 relay
Safa-large: python plots/plot_exp.py 'safa_large' google_speech_resnet34 'fig3' 'Test' 0 3000
```

Expand Down
5 changes: 2 additions & 3 deletions plots/plot_exp.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
'legend.handlelength': 2,
'lines.linewidth': 4,
'figure.figsize': fig_size,
# 'pdf.fonttype': 42,
'pdf.fonttype': 42,
}
plt.rcParams.update(params)

Expand Down Expand Up @@ -133,15 +133,14 @@ def autolabel(ax, rects):
def smooth(y, box_pts=1):
if method.startswith('safa'):
return y

cumsum_vec = np.cumsum(np.insert(y, 0, 0))
y_smooth = (cumsum_vec[box_pts:] - cumsum_vec[:-box_pts]) / float(box_pts)
# print(len(y), len(y_smooth))
if len(y) > len(y_smooth):
avg = np.average(y[len(y_smooth):])
for i in range(len(y_smooth), len(y)):
y_smooth = np.insert(y_smooth, i, avg)
return y_smooth
return y_smooth


def get_dfs(project, exp_type, total_worker):
Expand Down
3 changes: 3 additions & 0 deletions run_E1.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export WANDB_API_KEY=""
# The entity or team used for WANDB logging, should be set correctly, typically should be set your WANDB userID
export WANDB_ENTITY=""

#RESET LD Library path
export LD_LIBRARY_PATH=""

#set the path to the config file, use the files with _exp suffix
cd core/evals
config_dir=`ls -1 configs/$dataset/*exp.*`
Expand Down
4 changes: 2 additions & 2 deletions run_E2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ export WANDB_API_KEY=""
# The entity or team used for WANDB logging, should be set correctly, typically should be set your WANDB userID
export WANDB_ENTITY=""

#first cmd line parameter is the dataset name
dataset=$1
#RESET LD Library path
export LD_LIBRARY_PATH=""

#set the path to the config file, use the files with _exp suffix
cd core/evals
Expand Down
3 changes: 3 additions & 0 deletions run_exps.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ export WANDB_API_KEY=""
# The entity or team used for WANDB logging, should be set correctly, typically should be set your WANDB userID
export WANDB_ENTITY=""

#RESET LD Library path
export LD_LIBRARY_PATH=""

#set the path to the config file, use the files with _exp suffix
cd core/evals
config_dir=`ls -1 configs/$dataset/*exp.*`
Expand Down

0 comments on commit 8c5c85b

Please sign in to comment.