Skip to content

Commit

Permalink
fix bug; reformat code; update plot style
Browse files Browse the repository at this point in the history
  • Loading branch information
Cloudac7 committed Apr 26, 2023
1 parent 436e63f commit a277e7f
Show file tree
Hide file tree
Showing 9 changed files with 167 additions and 135 deletions.
4 changes: 2 additions & 2 deletions miko/graph/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ def _default_theme():

def canvas_style(
context='notebook',
style='darkgrid',
style='ticks',
palette='deep',
font='sans-serif',
font_scale=1,
font_scale=1.5,
color_codes=True,
rc=None,
**kwargs
Expand Down
8 changes: 3 additions & 5 deletions miko/tesla/dpgen/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,15 +81,13 @@ class DPAnalyzer(ABC):
"""
def __init__(self, dp_task: DPTask) -> None:
self.dp_task = dp_task
for key in dp_task.__dict__:
setattr(self, key, dp_task.__dict__[key])

def _iteration_control_code(self, control_step, iteration=None):
if iteration is None:
if self.step_code < control_step:
iteration = self.iteration - 1
if self.dp_task.step_code < control_step:
iteration = self.dp_task.iteration - 1
else:
iteration = self.iteration
iteration = self.dp_task.iteration
return iteration

def _iteration_dir(self, **kwargs):
Expand Down

0 comments on commit a277e7f

Please sign in to comment.