icecube / event-generator

IceCube event generator
GNU General Public License v3.0
1 stars 2 forks source link

Allow evaluation in eager mode #26

Closed mhuen closed 3 months ago

mhuen commented 3 months ago

Newer tensorflow versions (16.1) seems to require that derived classes from tf.optimizers.schedules.LearningRateSchedule are able to run in eager mode. This PR removes the @tf.function decorator and ensures that the __call__ method may be run in eager mode.

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 20.62%. Comparing base (2eaa6f7) to head (d837934). Report is 274 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #26 +/- ## ========================================== - Coverage 25.77% 20.62% -5.15% ========================================== Files 56 87 +31 Lines 5223 9464 +4241 Branches 866 1723 +857 ========================================== + Hits 1346 1952 +606 - Misses 3819 7395 +3576 - Partials 58 117 +59 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

fschlueter commented 3 months ago

Do you foresee that this will decrease efficiency?

mhuen commented 3 months ago

I did not see any difference in the limited check that I ran. There is also an outer wrapper when creating the training loop, which will compile the graph. In the end, this should be running in graph mode regardless during trianing