autokeras icon indicating copy to clipboard operation
autokeras copied to clipboard

Bug in elapsed time display when ower 24H

Open holinov opened this issue 3 years ago • 1 comments

Bug Description

If your search lasts longer than 24 hours dicplay just cuts-odd by 24h:

Trial 47 Complete [00h 30m 59s]
val_classification_head_1_accuracy: 0.900739848613739

Best val_classification_head_1_accuracy So Far: 0.9010480642318726
Total elapsed time: 23h 50m 49s

......
Trial 50 Complete [00h 34m 49s]
val_classification_head_1_accuracy: 0.89488285779953

Best val_classification_head_1_accuracy So Far: 0.9010480642318726
Total elapsed time: 01h 15m 04s

Setup Details

Include the details about the versions of:

  • OS type and version:
  • Python: 3.8
  • autokeras: 1.0.16
  • keras-tuner:
  • scikit-learn:
  • numpy:
  • pandas:
  • tensorflow: 2.5.0

holinov avatar Aug 19 '21 16:08 holinov

That problem may be caused by keras-tuner instead of autokeras. in keras_tuner/engine/tuner_utils.py:

From original code block =>

def format_time(self, t):
    return time.strftime("%Hh %Mm %Ss", time.gmtime(t))

alternative dirty fix => (only insert days information without further month and year information though.)

def format_time(self, t):
    days = divmod(t, 86400)
    return str(int(days[0])) + "d " + time.strftime("%Hh %Mm %Ss", time.gmtime(t))

autokeras had shown correct number of days after this fix in keras-tuner, just for reference.

jwliou avatar Mar 29 '22 03:03 jwliou