3

Run reporting measure even if datapoint fails

I am writing a reporting measure to scrape files from a datapoint and place them in a amazon s3 bucket. Since this measure will be the last measure to run for the datapoint I would like this reporting measure to run even if the datapoint fails.

What is the best way to go about this? I've discovered that currently if a measure fails in the workflow, the datapoint breaks and the report measure will not run.

antonszilasi's avatar
1.5k
antonszilasi
asked 2020-03-02 21:22:10 -0500
Aaron Boranian's avatar
14.1k
Aaron Boranian
updated 2020-07-31 10:36:01 -0500
edit flag offensive 0 remove flag close merge delete

Comments

@antonszilasi if the datapoint fails you won't have the EnergyPlus SQL file, so are you just reporting information about the model? If that is the case there then maybe you make this a model measure, and not a reporting measure. There is nothing saying that a model measure (a) has to change the model and (b) can't write an HTML (or send to s3). This is how the "ViewModel" measure works.

David Goldwasser's avatar David Goldwasser (2020-03-03 11:02:33 -0500) edit

@David Goldwasser correct I am trying to report out.osw and any other logs which exist even if the E+ run fails, im thinking the easiest way maybe to just have a "push to s3" function which is called in every measure if the measure fails and the reporting measure cant run. What do you think?

antonszilasi's avatar antonszilasi (2020-03-03 11:22:29 -0500) edit
add a comment see more comments

2 Answers

2

If you are running in Algorithmic mode, one option is to write a "Server Finalization Script". This would be a bash script that loops through all the datapoints on the OpenStudio-Server filesystem and uploads them to s3. This script should still run even if there are datapoint failures.

(You might be able to use the "Worker Finalization Script" instead, but it runs once per datapoint and I'm guessing it doesn't run if the datapoint has a failure? I'm not positive.)

shorowit's avatar
11.8k
shorowit
answered 2020-03-03 11:51:51 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments
1

There's no built-in way to do that, you'll have to patch OpenStudio-workflow-gem and manage to call your own version.

If the failed measure is a reporting measure it's another story. I recently added capability for reporting measures to fail, so we collect any HTML files that actually worked (this isn't released yet in any OpenStudio installer though).

In any case, the PR in question would be a good starting point for your own patch, cf NREL/OpenStudio-workflow-gem#92 (don't get scared by the 20k lines added, the PR has only a few changes to lib/openstudio/workflow/run.rb which I link directly to, the rest is mostly testing)

Julien Marrec's avatar
29.7k
Julien Marrec
answered 2020-03-03 04:07:00 -0500, updated 2020-03-03 04:09:01 -0500
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments