Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid decoding some objects that now should come as strings from the OQ-Engine #743

Open
7 tasks done
ptormene opened this issue Sep 23, 2020 · 0 comments
Open
7 tasks done
Assignees

Comments

@ptormene
Copy link
Member

ptormene commented Sep 23, 2020

In most cases the engine is already producing strings and we have to fix the plugin. We need to identify the cases in which the engine is still producing bytes instead.

Some examples to check:

  • while loading gsims: self.gsims = [branch_path.decode('utf8').strip(""") for branch_path in self.rlzs_npz['array']['branch_path']]. When extracting realizations from the oq-engine, branches are still returned as bytes
  • in the loader for avg_damages-rlzs taxonomies are still decoded. When downloading asset_tags from the OQ-Engine, all items (taxonomies and tags like NAME_X) are returned as arrays of bytes
  • in avg_losses_rlzs_aggr['tags'] are still decoded
  • in load ruptures we are decoding boundaries (to be fixed engine-side)
  • in some exporters to csv (probably untested) some tags are decoded
  • also exporting data from a plot, the measurement unit is decoded (the engine is still giving them as bytes, when extracting agg_curves for 'Stochastic Event-Based Demo (Nepal)'
  • extracting losses_by_asset, taxonomies are still provided as bytes from the OQ-Engine
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant