Scenario Risk QA test

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

Bug Description

[et=12h]
[at=12.5h]

The Scenario Risk calculation does not have a QA test; it needs one.

The biggest difficulty identified so far is the following:

Part of the scenario calculation includes randomly sampling a normal distribution. We're currently using scipy.stats.norm.rvs to generate random variates. Unfortunately, this means that getting consistent test results every time is impossible unless we seed the random number generator. I read the scipy documentation and some related source code and there is no obvious way to specify a seed. However, we should instead be able to use the Python standard 'random' module as a replacement. See: http://docs.python.org/dev/library/random.html#random.normalvariate. This implementation can be seeded and should enable us to get predictable test results.

Tasks:

- Create a small demo file set that can run quickly
- Gather 'expected result' test data
- Add an EPSILON_RANDOM_SEED parameter to the job profile for Scenario Risk calculations
  - This seed should be used in the random normal distribution sample (see description above).

Open Issues:

- Need to talk with Vitor to if test data/expected results are need on the Hazard side. If so, that adds significant amount of scope to this work package.

Tags: risk
Changed in openquake:
milestone: none → 0.6.0
John Tarter (toh2)
Changed in openquake:
importance: Undecided → High
status: New → In Progress
tags: added: risk
Changed in openquake:
status: In Progress → Confirmed
John Tarter (toh2)
Changed in openquake:
assignee: nobody → Andrea Cerisara (andreacerisara-b)
John Tarter (toh2)
Changed in openquake:
milestone: 0.6.0 → 0.6.1
Changed in openquake:
assignee: Andrea Cerisara (andreacerisara-b) → Lars Butler (lars-butler)
description: updated
Changed in openquake:
status: Confirmed → Incomplete
description: updated
description: updated
Revision history for this message
Lars Butler (lars-butler) wrote :

Currently waiting on some feedback and test data from Damiano and Vitor. Blocked.

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

Here is the latest version of the test data/documentation.

Revision history for this message
Lars Butler (lars-butler) wrote :
description: updated
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.