Skip to content

Commit

Permalink
Format code with Black
Browse files Browse the repository at this point in the history
  • Loading branch information
nadamoukaddem committed Feb 22, 2024
1 parent 0e179a3 commit 62dd98c
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions src/wf_psf/data/training_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
:Authors: Jennifer Pollack <[email protected]> and Tobias Liaudat <[email protected]>
"""

import numpy as np
import wf_psf.utils.utils as utils
import tensorflow as tf
Expand Down
1 change: 1 addition & 0 deletions src/wf_psf/psf_models/zernikes.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
:Author: Tobias Liaudat <[email protected]> and Jennifer Pollack <[email protected]>
"""

import numpy as np
import zernike as zk
import tensorflow as tf
Expand Down
1 change: 1 addition & 0 deletions src/wf_psf/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
:Author: Jennifer Pollack <[email protected]>
"""

import argparse
from wf_psf.utils.read_config import read_stream
from wf_psf.utils.io import FileIOHandler
Expand Down
1 change: 1 addition & 0 deletions src/wf_psf/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"""

import pytest
from wf_psf.utils.read_config import RecursiveNamespace
from wf_psf.training.train import TrainingParamsHandler
Expand Down
1 change: 1 addition & 0 deletions src/wf_psf/tests/metrics_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
:Author: Jennifer Pollack <[email protected]>
"""

import pytest
from wf_psf.utils.read_config import RecursiveNamespace
from wf_psf.training import train
Expand Down
1 change: 1 addition & 0 deletions src/wf_psf/tests/test_utils/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
"""

import pytest
import os

Expand Down
12 changes: 6 additions & 6 deletions src/wf_psf/training/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,13 +397,13 @@ def train(

# Save optimisation history in the saving dict
if psf_model.save_optim_history_param:
saving_optim_hist[
"param_cycle{}".format(current_cycle)
] = hist_param.history
saving_optim_hist["param_cycle{}".format(current_cycle)] = (
hist_param.history
)
if psf_model.save_optim_history_nonparam:
saving_optim_hist[
"nonparam_cycle{}".format(current_cycle)
] = hist_non_param.history
saving_optim_hist["nonparam_cycle{}".format(current_cycle)] = (
hist_non_param.history
)

# Save last cycle if no cycles were saved
if not training_handler.multi_cycle_params.save_all_cycles:
Expand Down
7 changes: 4 additions & 3 deletions src/wf_psf/utils/configs_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
:Authors: Jennifer Pollack <[email protected]>
"""

import numpy as np
from wf_psf.utils.read_config import read_conf
from wf_psf.data.training_preprocessing import TrainingDataHandler, TestDataHandler
Expand Down Expand Up @@ -412,9 +413,9 @@ def call_plot_config_handler_run(self, model_metrics):
)

# Update metrics_confs dict with latest result
plots_config_handler.metrics_confs[
self._file_handler.workdir
] = self.metrics_conf
plots_config_handler.metrics_confs[self._file_handler.workdir] = (
self.metrics_conf
)

# Update metric results dict with latest result
plots_config_handler.list_of_metrics_dict[self._file_handler.workdir] = [
Expand Down

0 comments on commit 62dd98c

Please sign in to comment.