IN-CORE / pyincore

pyIncore is a component of IN-CORE. It is a python package consisting of two primary components: 1) a set of service classes to interact with the IN-CORE web services, and 2) IN-CORE analyses . The pyIncore allows users to apply various hazards to infrastructure in selected areas, propagating the effect of physical infrastructure damage and loss of functionality to social and economic impacts.
Mozilla Public License 2.0
25 stars 7 forks source link

build core-cge-ml module #473

Closed Rashmil-1999 closed 7 months ago

Rashmil-1999 commented 10 months ago

In this PR I have added a new module called the Core CGE ML where the idea is to implement all repetitive actions related to CGE ML here. Since loads of models will come in, we will create a wrapper class for that testbed and keep model coefficients, base values, and the related files in that analysis folder. The core CGE ML will be imported, fed the data it needs, and spit out the outputs. That will be the goal of all future analysis implementations about CGE ML.

Possible modification I can see -

Note: Since we will be implementing the analyses so I don't know if this improvement is really needed or not. We could easily structure inputs as required by the Core CGE class.

let me know what your thoughts are and what changes can be made.

Rashmil-1999 commented 10 months ago

I have added the implementation of mmsa cge with a test_mmsacge.py file. all you need to do is to run this to test it. Main thing to look for is improvements in implementation or some modification.

longshuicy commented 10 months ago
  • left the parsing part for analysis to implement.

Maybe for now you can put the parsing part in a util (instead of on the mmsa class) so in the future other testbed can still reuse them? Just a thought.

Rashmil-1999 commented 10 months ago
  • left the parsing part for analysis to implement.

Maybe for now you can put the parsing part in a util (instead of on the mmsa class) so in the future other testbed can still reuse them? Just a thought.

yeah, if we can standardize the input files from the econ teams, we can shift it to the core class itself...

navarroc commented 7 months ago

To fix the unit tests, I uploaded new files. Can you replace the following?

660d9435ce705a7e547a664e replaces 642f66e5f27db6680103c4ad 660d95bece705a7e547a6654 replaces 642f6230f27db66801038964 660d97bfce705a7e547a6659 replaces 642f6495f27db66801039434

navarroc commented 7 months ago

I tested slc cge with this PR and results look good and match results I saved from the SLC CGE branch before it got merged into this branch. Just a few minor things with the copyright. I have not looked through the code exhaustively.