unexpected nan numbers in loss curves

Bug #1157072 reported by Miriam Colombi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OpenQuake (deprecated)
Fix Released
Critical
Lars Butler

Bug Description

Once I run seismic risk assessment I got some nan numbers as PoEs in some of the loss curves. In the zip folder "MiriamColombi" attached there are my input files.

Revision history for this message
Miriam Colombi (miriam-colombi) wrote :
Changed in openquake:
assignee: nobody → Lars Butler (lars-butler)
Revision history for this message
Lars Butler (lars-butler) wrote :

I can reproduce this issue.

Something else I've noticed: when I try to export `loss_curve` artifacts from the DB, I get the following error.

Traceback (most recent call last):
  File "bin/openquake", line 588, in <module>
    main()
  File "bin/openquake", line 572, in main
    export_risk(output_id, expanduser(target_dir))
  File "bin/openquake", line 386, in export_risk
    export(risk_export.export, risk_output_id, target_dir)
  File "bin/openquake", line 399, in export
    files = fn(output_id, target_dir)
  File "/Users/larsbutler/proj/oq-engine/openquake/engine/export/risk.py", line 52, in export
    return [fn(output, os.path.expanduser(target_dir))]
  File "/Users/larsbutler/proj/oq-engine/openquake/engine/export/core.py", line 56, in wrapped
    return fn(output, target_dir)
  File "/Users/larsbutler/proj/oq-engine/openquake/engine/export/risk.py", line 109, in export_loss_curve_xml
    writers.LossCurveXMLWriter(**args).serialize(data)
  File "/Users/larsbutler/proj/oq-nrmllib/openquake/nrmllib/risk/writers.py", line 64, in __init__
    statistics, quantile_value)
  File "/Users/larsbutler/proj/oq-nrmllib/openquake/nrmllib/risk/writers.py", line 898, in validate_hazard_metadata
    _check_logic_tree_metadata(source_model_tree_path, gsim_tree_path)
  File "/Users/larsbutler/proj/oq-nrmllib/openquake/nrmllib/risk/writers.py", line 926, in _check_logic_tree_metadata
    raise ValueError("When specifying a logic tree branch, "
ValueError: When specifying a logic tree branch, both `source_model_tree_path` and `gsim_tree_path` must be specified.

Changed in openquake:
status: New → Confirmed
Changed in openquake:
importance: Undecided → Critical
status: Confirmed → In Progress
Revision history for this message
Lars Butler (lars-butler) wrote :

The pull request which introduced `hazard_metadata`, upon which the serialization relies to get `*_tree_path` information is here: https://github.com/gem/oq-engine/pull/1048/files#L4R1482

It's seems that it does not account for all cases, and thus a bunch of the metadata is missing when we try to serialize.

Changed in openquake:
milestone: none → 1.0.0
Revision history for this message
Lars Butler (lars-butler) wrote :

First pull request: https://github.com/gem/oq-engine/pull/1104

This stabilizes things so the type of calculation which produced the NaN issue can run without crashing. The NaN issue is still there.

Revision history for this message
Lars Butler (lars-butler) wrote :

Some vulnerability model validation: https://github.com/gem/oq-engine/pull/1108

Changed in openquake:
status: In Progress → Fix Committed
Changed in openquake:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.