Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] MCCD / modopt missing attribute #601

Open
martinkilbinger opened this issue Dec 9, 2022 · 1 comment · May be fixed by #615
Open

[BUG] MCCD / modopt missing attribute #601

martinkilbinger opened this issue Dec 9, 2022 · 1 comment · May be fixed by #615
Assignees
Labels
bug Something isn't working

Comments

@martinkilbinger
Copy link
Contributor

When running MCCD in the pipeline, the following error is produced:

09/12/2022 11:25:38 ERROR: 'SourceLocGrad' object has no attribute '_input_data_writeable'
Traceback (most recent call last):
  File "/home/mkilbing/.conda/envs/shapepipe/lib/python3.9/site-packages/shapepipe/pipeline/worker_handler.py", line 180, in _run_worker
    with_timeout(self.worker_dict['timeout'], self.w_log.name)(
  File "/home/mkilbing/.conda/envs/shapepipe/lib/python3.9/site-packages/shapepipe/pipeline/timeout.py", line 42, in inner
    return decorated(*args, **kwargs)
  File "/home/mkilbing/.conda/envs/shapepipe/lib/python3.9/site-packages/shapepipe/pipeline/worker_handler.py", line 194, in _worker_execution
    self._run_module()
  File "/home/mkilbing/.conda/envs/shapepipe/lib/python3.9/site-packages/shapepipe/pipeline/worker_handler.py", line 215, in _run_module
    self._stdout, self._stderr = self._module_runner(
  File "/home/mkilbing/.conda/envs/shapepipe/lib/python3.9/site-packages/shapepipe/modules/mccd_fit_val_runner.py", line 53, in mccd_fit_val_runner
    aux_mccd.mccd_fit_pipeline(
  File "/home/mkilbing/.conda/envs/shapepipe/lib/python3.9/site-packages/shapepipe/modules/mccd_package/shapepipe_auxiliary_mccd.py", line 265, in mccd_fit_pipeline
    mccd.auxiliary_fun.mccd_fit(
  File "/home/mkilbing/.conda/envs/shapepipe/lib/python3.9/site-packages/mccd/auxiliary_fun.py", line 617, in mccd_fit
    _, _, _, _, _ = mccd_instance.fit(
  File "/home/mkilbing/.conda/envs/shapepipe/lib/python3.9/site-packages/mccd/mccd.py", line 539, in fit
    self._fit()
  File "/home/mkilbing/.conda/envs/shapepipe/lib/python3.9/site-packages/mccd/mccd.py", line 864, in _fit
    source_loc_grad = [grads.SourceLocGrad(
  File "/home/mkilbing/.conda/envs/shapepipe/lib/python3.9/site-packages/mccd/mccd.py", line 864, in <listcomp>
    source_loc_grad = [grads.SourceLocGrad(
  File "/home/mkilbing/.conda/envs/shapepipe/lib/python3.9/site-packages/mccd/grads.py", line 362, in __init__
    self.obs_data = data
  File "/home/mkilbing/.local/lib/python3.9/site-packages/modopt/opt/gradient.py", line 109, in obs_data
    writeable=self._input_data_writeable,
AttributeError: 'SourceLocGrad' object has no attribute '_input_data_writeable'

The module versions are:

09/12/2022 11:18:29 Checking Python Dependencies:
09/12/2022 11:18:29  - galsim 2.2.5 /home/mkilbing/.conda/envs/shapepipe/lib/python3.9/site-packages/galsim
09/12/2022 11:18:29  - numpy 1.20.3 /home/mkilbing/.conda/envs/shapepipe/lib/python3.9/site-packages/numpy
09/12/2022 11:18:29  - modopt 1.6.1 /home/mkilbing/.local/lib/python3.9/site-packages/modopt
09/12/2022 11:18:29  - stile N/A /home/mkilbing/.conda/envs/shapepipe/lib/python3.9/site-packages/stile
09/12/2022 11:18:29  - matplotlib 3.5.1 /home/mkilbing/.conda/envs/shapepipe/lib/python3.9/site-packages/matplotlib
09/12/2022 11:18:29  - mccd 1.2.3 /home/mkilbing/.conda/envs/shapepipe/lib/python3.9/site-packages/mccd
09/12/2022 11:18:29  - astropy 5.0 /home/mkilbing/.conda/envs/shapepipe/lib/python3.9/site-packages/astropy
09/12/2022 11:18:29  - treecorr 4.3.0 /home/mkilbing/.local/lib/python3.9/site-packages/treecorr
09/12/2022 11:18:29  - joblib 1.1.0 /home/mkilbing/.conda/envs/shapepipe/lib/python3.9/site-packages/joblib
09/12/2022 11:18:29  - mpi4py 3.1.3 /home/mkilbing/.conda/envs/shapepipe/lib/python3.9/site-packages/mpi4py
@tobias-liaudat
Copy link
Member

@martinkilbinger sorry for the delay with this. I was able to reproduce the error, I'll try to fix this bug soon.

It seems it was triggered by the new ModOpt version.

tobias-liaudat added a commit that referenced this issue Feb 17, 2023
This minor fix solves the bug generated by the new ModOpt version in MCCD.

Solves #601 
Closes #601
@tobias-liaudat tobias-liaudat linked a pull request Feb 17, 2023 that will close this issue
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants