Skip to content

campaign.recollate() produces an error; is there a more elegant solution for delayed collation (or recollation) than the hack used below? #369

@DavidPCoster

Description

@DavidPCoster

Using campaign.recollate() produces the error

'Campaign' object has no attribute 'collate'

as shown in

Screenshot 2022-05-30 at 18 09 39

Indeed collate now seems to be part of actions/action_statuses.py,

grep -R "def collate" easyvvuq/
easyvvuq//actions/action_statuses.py:    def collate(self, progress_bar=False):

Is there any clean way of recollating (or collating at a later stage)?

I am currently using the hack

decoder = uq.decoders.SimpleCSV(
    target_filename="output.csv",
    output_columns=["dpar", "te", "ti", "ne", "na_d0", "na_d1", "na_n0", "na_n1", "na_n2", "na_n3", "na_n4", "na_n5", "na_n6", "na_n7"]
)

for R in campaign.list_runs():
    RESULT = {'result': decoder.parse_sim_output(R[1]), 'run_info': 0, 'rundir': R[1]['run_dir']}
    campaign.campaign_db.store_result(R[0], RESULT, change_status=True)
campaign.campaign_db.session.commit()

results_df = campaign.get_collation_result()

which works but is, as I said above, a hack.

Is there a more elegant solution?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions