CosmoStat / wf-psf

Data-driven wavefront-based PSF modelling framework.
MIT License
19 stars 9 forks source link

Bug: legacy Keras optimizer #88

Closed CentofantiEze closed 10 months ago

CentofantiEze commented 10 months ago

I got the following error message when trying to train the WaveDiff model in JeanZay:

wf-outputs/.../logfiles/wf-psf_202311301746.log

2023-11-29 15:18:52,521 - wf_psf.metrics.metrics_interface - INFO - Computing Shape metrics.
2023-11-29 15:18:52,678 - wf_psf.metrics.metrics_interface - INFO - Error: You are trying to restore a checkpoint from a legacy Keras optimizer into a v2.11+ Optimizer, which can cause errors. Please update the optimizer referenced in your code to be an instance of `tf.keras.optimizers.legacy.Optimizer`, e.g.: `tf.keras.optimizers.legacy.Adam`.

The content of the config file is the following:

---
  training_conf: training_config.yaml

On the training_config.yaml I have set a 2 cycles optimisation with 2 epochs per cycle both for the parametric and non-parametric models.

The Tensorflow module used on JeanZay is: tensorflow-gpu/py3/2.9.1. I am running the latest version of WaveDiff (WF-PSF v2.0.0).

jeipollack commented 10 months ago

Issue has been assigned to Nada, who has already implemented the fix. Next is to run a validation test and then open a PR.

jeipollack commented 10 months ago

@CentofantiEze this bug is fixed in the develop branch. You can use this branch to continue your testing of WaveDiff.

jeipollack commented 10 months ago

This fix will be included in the upcoming Patch Release.