UCL-CCS / EasyVVUQ

Python 3 framework to facilitate verification, validation and uncertainty quantification (VVUQ) for a wide variety of simulations.
https://easyvvuq.readthedocs.io/
GNU Lesser General Public License v3.0
85 stars 27 forks source link

Older version for basic_tutorial #380

Open mbergmann1324 opened 1 year ago

mbergmann1324 commented 1 year ago

Could it be that the version for the basic_tutorial is outdated. When running "campaign = uq.Campaign(name='beam', params=params, encoder=encoder, decoder=decoder)" I get an error when running on my cluster. I needed to use Actions provided to me by Wouter. Also using the Triangle function leads to an error.

The code that works for me/us:


execute = ExecuteLocal("{}/beam input.json".format(os.getcwd()))
 actions = Actions(CreateRunDirectory(root="/toks/work/mberg/astra7_IDA/python_scripts/", flatten=True), Encode(encoder), execute, Decode(decoder))
campaign = uq.Campaign(name="beam", params=params, actions=actions)
vary = {"F": cp.Normal(1, 0.1), "L": cp.Normal(1.5, 0.01), "a": cp.Uniform(0.7, 1.2)}  # , "D": cp.Triangle(0.75, 0.8, 0.85)}
campaign.set_sampler(uq.sampling.SCSampler(vary=vary, polynomial_order=3))
campaign.execute().collate(progress_bar=True)```
djgroen commented 1 year ago

Edited original comment to show code in fixed font format.

djgroen commented 1 year ago

I just ran the basic tutorial on my local machine after updating EasyVVUQ to the latest version, and it seems to work properly for me. @wedeling could you perhaps see if you can reproduce this error?

If not, should we still update the tutorial to use this action coe?