Comments (5)
If it's at all relevant, here is the function that Hamlet uses to generate a job.ini dict:
def make_job_ini(
base_dir: str,
lt_file: str = "ssmLT.xml",
gmm_lt_file: str = "gmmLT.xml",
description: Optional[str] = None,
):
ssm_lt_path = os.path.join(base_dir, lt_file)
gmm_lt_path = os.path.join(base_dir, gmm_lt_file)
job_ini_params = {
"general": {
"calculation_mode": "preclassical",
"description": description,
},
"calculation": {
"rupture_mesh_spacing": 2.0,
"area_source_discretization": 15.0,
"width_of_mfd_bin": 0.1, # typically smaller than from cfg; use cfg?
"maximum_distance": 200,
"investigation_time": 1.0,
"source_model_logic_tree": ssm_lt_path,
"gsim_logic_tree": gmm_lt_path,
},
"site_params": {
"reference_vs30_type": "measured",
"reference_vs30_value": 800.0,
"reference_depth_to_1pt0km_per_sec": 30.0,
},
}
job_ini_params_flat = {k: v for k, v in job_ini_params["general"].items()}
job_ini_params_flat.update(job_ini_params["calculation"])
job_ini_params_flat.update(job_ini_params["site_params"])
job_ini_params_flat = {k: str(v) for k, v in job_ini_params_flat.items()}
job_ini_params_flat["inputs"] = {
"source_model_logic_tree": str(ssm_lt_path)
}
return job_ini_params_flat
from oq-engine.
Being able to pass a dictionary instead of a job.ini file is an essential feature that I want to support forever, not only for Hamlet-sake. I am very surprised that it is broken now. Can you point me to the Hamlet CI? Unfortunately I do not get notifications when it breaks, that is the issue.
from oq-engine.
BTW, your function make_job_ini
looks wrong, you are missing the job_ini
key which is mandatory. Just write
job_ini_params_flat["inputs"] = {
"job_ini": "<in-memory>",
"source_model_logic_tree": ssm_lt_path}
from oq-engine.
Thanks Michele, that resolved the issue.
The Hamlet CI is found here: https://github.com/GEMScienceTools/hamlet/blob/master/.github/workflows/test_page.yaml
It doesn't seem to be triggered anymore--I'm not sure why, the file hasn't changed in a couple years and I didn't notice since I test locally before pushing typically and don't get email updates for successful test runs. Perhaps @vot4anto knows, since he made that file apparently?
from oq-engine.
It is a "feature" of the actions on GitHub. If nothing changes, after a period (3 months, I believe) the runner is automatically disabled and we cannot stop that from happening except by remembering to change something in the repository every 3 months :-(
from oq-engine.
Related Issues (20)
- Adding new CAV and AI models HOT 3
- multifaultsource sanity check breaks fault section prefix HOT 2
- Should we replace round with numpy.round? HOT 1
- Check invalid branchIDs
- get_convex_hull failing when getting polygons of some mosaic sources
- AAL Statistics output for classical_risk/case_2 not exportable
- NGAEastUSGSGMPE not working outside of unit tests HOT 3
- Fixing warnings in the documentation
- when a required site parameter is not provided, OQ is running full calculation but giving NAN results HOT 2
- Raise error for missing `residents` at the beginning of the calculation
- Stations still appear to be plotted in Avg GMF
- Implementation of post-loss amplification (PLA) HOT 3
- Document `oq show delta_loss`
- Add check in job.ini for scenario calculations
- Investigations for conditioned scenarios (needed for the Aristotle project)
- individual_rlzs is not honored with --hc HOT 1
- Add an early check for mixed sources
- Think about OQ_APPLICATION_MODE
- Move checks from settings.py to a function called when the webui is started
- Think about disabling numba in same places
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oq-engine.