Skip to content
Merged

Dev #35

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions RLA/easy_plot/plot_func_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def default_key_to_legend(parse_dict, split_keys, y_name, use_y_name=True):

def plot_func(data_root:str, task_table_name:str, regs:list, split_keys:list, metrics:list,
use_buf=False, verbose=True,
xlim: Optional[tuple] = None,
x_bound: Optional[int]=None,
xlabel: Optional[str] = DEFAULT_X_NAME, ylabel: Optional[str] = None,
scale_dict: Optional[dict] = None, regs2legends: Optional[list] = None,
key_to_legend_fn: Optional[Callable] = default_key_to_legend,
Expand Down Expand Up @@ -57,8 +57,7 @@ def plot_func(data_root:str, task_table_name:str, regs:list, split_keys:list, me
:type metrics:
:param use_buf: use the preloaded csv data instead of loading from scratch
:type use_buf: bool
:param xlim: set the x limits of the x axes.
:type xlim: Optional[tuple]
:param x_bound: drop the collected with time-step larger than x_bound.
:param xlabel: set the label of the y axes.
:type xlabel: Optional[str]
:param ylabel: set the label of the y axes.
Expand Down Expand Up @@ -90,7 +89,7 @@ def plot_func(data_root:str, task_table_name:str, regs:list, split_keys:list, me
counter = 0
for k, v in log_dict.items():
result = plot_util.load_results(v.dirname, names=metrics + [DEFAULT_X_NAME],
x_bound=[DEFAULT_X_NAME, xlim], use_buf=use_buf)
x_bound=[DEFAULT_X_NAME, x_bound], use_buf=use_buf)
if len(result) == 0:
continue
assert len(result) == 1
Expand Down
2 changes: 1 addition & 1 deletion rla_scripts/migrate_expt.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
import argparse

def argsparser():
parser = argparse.ArgumentParser("Archive Log")
parser = argparse.ArgumentParser("Migrate Log")
# reduce setting
parser.add_argument('--task_table', type=str)
parser.add_argument('--target_task_table', type=str)
Expand Down