ludwig icon indicating copy to clipboard operation
ludwig copied to clipboard

training_progress.json can be an invalid json

Open nqbao opened this issue 1 year ago • 2 comments

Describe the bug

I ran ludwig w/o a dev set and look like it generate a json file with Infinity / -Infinity, which is not json valid

    "best_eval_metric_value": -Infinity,
    "best_eval_test_metrics": {},
    "best_eval_train_metrics": {},
    "best_eval_validation_metrics": {},
    "best_increase_batch_size_eval_metric": Infinity,

To Reproduce Steps to reproduce the behavior:

ludwig train --config train.yml --training_set train.csv --test_set test.csv

try training_progress.json with tools such as jq or something

Expected behavior

Environment (please complete the following information):

  • OS: [e.g. iOS]
  • Version [e.g. 22]
  • Python version:
  • Ludwig version 10.0.23

Additional context n/a

nqbao avatar Jul 15 '24 04:07 nqbao

Hi @nqbao thanks for sharing the issue. I will have a look into it.

Context: https://ecma-international.org/wp-content/uploads/ECMA-404_2nd_edition_december_2017.pdf Page 4 (PDF: 12)

Numeric values that cannot be represented as sequences of digits (such as Infinity and NaN) are not permitted.

mhabedank avatar Oct 16 '24 04:10 mhabedank

Related? #3751

mhabedank avatar Oct 21 '24 18:10 mhabedank