Skip to content

Commit

Permalink
Renamed max_gmvs_per_task
Browse files Browse the repository at this point in the history
  • Loading branch information
micheles committed Sep 15, 2023
1 parent 40fbe70 commit 535f619
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion openquake/calculators/event_based_risk.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ def ebr_from_gmfs(sbe, oqparam, dstore, monitor):
df = pandas.DataFrame(dic)
del dic
slices = performance.split_slices(
df.eid.to_numpy(), oqparam.max_gmvs_per_task)
df.eid.to_numpy(), oqparam.max_gmvs_per_chunk)
for s0, s1 in slices:
yield event_based_risk(df[s0:s1], oqparam, monitor)

Expand Down
8 changes: 4 additions & 4 deletions openquake/commonlib/oqvalidation.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,10 +450,10 @@
max_data_transfer:
INTERNAL. Restrict the maximum data transfer in disaggregation calculations.
max_gmvs_per_task:
max_gmvs_per_chunk:
Maximum number of rows of the gmf_data table per task.
Example: *max_gmvs_per_task = 200_000*
Default: 100_0000
Example: *max_gmvs_per_chunk = 200_000*
Default: 50_0000
max_potential_gmfs:
Restrict the product *num_sites * num_events*.
Expand Down Expand Up @@ -979,7 +979,7 @@ class OqParam(valid.ParamSet):
max = valid.Param(valid.boolean, False)
max_aggregations = valid.Param(valid.positivefloat, 100_000)
max_data_transfer = valid.Param(valid.positivefloat, 2E11)
max_gmvs_per_task = valid.Param(valid.positiveint, 100_000)
max_gmvs_per_chunk = valid.Param(valid.positiveint, 50_000) # for 2GB limit
max_potential_gmfs = valid.Param(valid.positiveint, 1E12)
max_potential_paths = valid.Param(valid.positiveint, 15_000)
max_sites_disagg = valid.Param(valid.positiveint, 10)
Expand Down
2 changes: 1 addition & 1 deletion openquake/qa_tests_data/event_based_risk/case_5/job.ini
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ exposure_file = exposure_model.xml
[risk_calculation]
asset_hazard_distance = 20
minimum_asset_loss = {'structural': 1000, 'contents': 1000}
max_gmvs_per_task = 500
max_gmvs_per_chunk = 500

[outputs]
quantiles = 0.15 0.85
Expand Down

0 comments on commit 535f619

Please sign in to comment.