You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
System setup
OS: Windows 10, running the provided docker
Python version: 3.8.8
Python environment (if any): [e.g.] conda v4.5.11
Describe the bug
Running the code provided in the non_cartesian_reconstruction.py example results in the error
AttributeError: 'ForwardBackward' object has no attribute '_metrics'
To Reproduce
Ran code in the provided example code
System setup
OS: Windows 10, running the provided docker
Python version: 3.8.8
Python environment (if any): [e.g.] conda v4.5.11
Describe the bug
Running the code provided in the non_cartesian_reconstruction.py example results in the error
AttributeError: 'ForwardBackward' object has no attribute '_metrics'
To Reproduce
Ran code in the provided example code
Expected behavior
I'm assuming this should output something similar to figure 5 in this paper: https://arxiv.org/abs/1910.08465
Module and lines involved
Full error message:
AttributeError Traceback (most recent call last)
in
20 verbose=1,
21 )
---> 22 x_final, costs, metrics = reconstructor.reconstruct(
23 kspace_data=kspace_obs,
24 optimization_alg='fista',
/opt/conda/envs/pysap/lib/python3.8/site-packages/mri/reconstructors/base.py in reconstruct(self, kspace_data, optimization_alg, x_init, num_iterations, cost_op_kwargs, **kwargs)
151 **cost_op_kwargs,
152 )
--> 153 self.x_final, self.costs, *metrics = optimizer(
154 gradient_op=self.gradient_op,
155 linear_op=self.linear_op,
/opt/conda/envs/pysap/lib/python3.8/site-packages/mri/optimizers/forward_backward.py in fista(gradient_op, linear_op, prox_op, cost_op, lambda_init, max_nb_of_iter, x_init, metric_call_period, metrics, verbose, **lambda_update_params)
94
95 # Define the optimizer
---> 96 opt = ForwardBackward(
97 x=alpha_init,
98 grad=gradient_op,
/opt/conda/envs/pysap/lib/python3.8/site-packages/modopt/opt/algorithms.py in init(self, x, grad, prox, cost, beta_param, lambda_param, beta_update, lambda_update, auto_iterate, metric_call_period, metrics, linear, **kwargs)
683
684 # Set default algorithm properties
--> 685 super().init(
686 metric_call_period=metric_call_period,
687 metrics=metrics,
/opt/conda/envs/pysap/lib/python3.8/site-packages/modopt/opt/algorithms.py in init(self, metric_call_period, metrics, verbose, progress, step_size, use_gpu, **dummy_kwargs)
114 super().init(['cv_metrics'])
115
--> 116 for name, dic in self.metrics.items():
117 observer = MetricObserver(
118 name,
/opt/conda/envs/pysap/lib/python3.8/site-packages/modopt/opt/algorithms.py in metrics(self)
142 def metrics(self):
143 """Metrics."""
--> 144 return self._metrics
145
146 @metrics.setter
AttributeError: 'ForwardBackward' object has no attribute '_metrics'
Are you planning to submit a Pull Request?
The text was updated successfully, but these errors were encountered: