Priority List: Ranking All Executable Files - npalmer-professional/HARK-1 GitHub Wiki

A simple list of priorities of HARK Py2 & Py3 compatability.

Below I have a list of all executable code in HARK.

Please assign a value from 0 (highest priority) to 9 (lowest priority) in the parentheses for each bit of code, or "na" if it is not applicable (eg. if the file has already been converted or not one that needs converting).

Note that many of the "core" (tool and model) modules will naturally be updated quite early as a consequence of working on the "applications" modules.

Here's the list of all executable files, with a few filled in, semi-organized by major directory. (Note: there is probably a nicer way to organize this but this way is fast and 'get the job done;' time better spent on code.)

NOTES:

  • Chinese_Growth produces no output?
  • need to find and remove the following from all:
    • "from HARKutilities import warnings # Because of "patch" to warnings modules"
  • Basic types of error:
    1. TypeError: '>=' not supported between instances of 'float' and 'NoneType'
      • Check off when fixed:
      • ./ConsumptionSaving/ConsMarkovModel.py
        • Solved TypeError; now error is:
          • AttributeError: 'MarkovSmallOpenEconomy' object has no attribute 'PermShkAggDstn'
          • need to solve this after get everything else Py2 & Py3 compliant
      • ./ConsumptionSaving/ConsIndShockModel.py
      • ./ConsumptionSaving/TractableBufferStockModel.py
        • solved...
      • ./ConsumptionSaving/ConsPrefShockModel.py
    2. TypeError: _warning() takes from 1 to 4 positional arguments but 6 were given
      • ./ConsumptionSaving/ConsGenIncProcessModel.py
      • ./ConsumptionSaving/ConsAggShockModel.py
      • Fixed by just removing the old "patch"
    3. raise NotImplementedError(), 'Bicubic interpolation not yet implemented'
      • ./ConsumptionSaving/ConsMedModel.py
  • NOTE: CONFIRMATION: "does 'TypeError: '>=' not supported' occur in the py2 versions?" - [x] ./ConsumptionSaving/ConsIndShockModel.py - [x] ./ConsumptionSaving/TractableBufferStockModel.py - [x] ./ConsumptionSaving/ConsPrefShockModel.py - [ ] ./ConsumptionSaving/ConsMarkovModel.py - No, breaks halfway through still. Missing attribute. - AttributeError: 'MarkovSmallOpenEconomy' object has no attribute 'PermShkAggDstn' - So, for the most part, yes these work

OK, so need to prioritize hitting each of the ones above.

Notes, II:

  • Need to carefully track down the error raised in "ConsIndShockModel"
    • also, confirm
  • Need to play around adn figure out why this one is breaking -- it's missing a distribution, but need to think about this in greater depth, not "quick-patch" it here:
    • ./ConsumptionSaving/ConsMarkovModel.py
  • Need to explore what futurize suggests and then re-run all Py2, py3 code.
  • Need to note "funny" futurize suggestions
  • Need to note that fixed parallel-reliance issue in Market (...???)
    • and revealed new error in Py3 for FashionVictim! BOOOOOOO.
  • Visually confirmed that all outputs appear the same. ("Rough and ready" verification.)

Matt's List, copy-pasted:

Here is the order of priorities, from DO IT FIRST to DO IT LAST

  1. all of the HARKblah.py modules except HARKparallel.py
  2. ConsIndShockModel.py and ConsumerParameters.py
  3. ConsAggShockModel.py
  4. all other /ConsumptionSaving model files
  5. HARKparallel.py
  6. files in /ConsumptionSaving/Demos/
  7. FashionVictim ...
  8. cstwMPC
  9. cAndCwithStickyE
  10. /Testing files

Jackie already made our cAndCwithStickyE repo work in Python 3, which means those files have already been converted (in that repo) and she got the main HARK files working. I might be wildly wrong, but it shouldn't be too hard to make the whole thing Py3 compatible.

I put the research applications at the bottom of the priority list because it's not really your job to convert them. And they will be removed from the HARK repo (hopefully) soon.

Original List

  • (0) ./ConsumptionSaving/

    • (0) ./ConsumptionSaving/ConsIndShockModel-Demos/Try-Alternative-Parameter-Values.py
    • (0) ./ConsumptionSaving/Demos/Fagereng_demo.py
    • (0) ./ConsumptionSaving/Demos/Chinese_Growth.py
    • (0) ./ConsumptionSaving/Demos/MPC_credit_vs_MPC_income.py
    • (0) ./ConsumptionSaving/Demos/NonDurables_During_Great_Recession.py
    • (0) ./ConsumptionSaving/ConsMarkovModel.py
      • TypeError: '>=' not supported between instances of 'float' and 'NoneType'
      • Note: this runs, solves, and produces plots initially; track down error.
    • (0) ./ConsumptionSaving/ConsIndShockModel.py
    • (1) ./ConsumptionSaving/ConsumerParameters.py
    • (0) ./ConsumptionSaving/TractableBufferStockModel.py
    • (0) ./ConsumptionSaving/ConsRepAgentModel.py
    • (0) ./ConsumptionSaving/ConsGenIncProcessModel.py
    • (0) ./ConsumptionSaving/ConsAggShockModel.py
      • Note: this will take a while -- approximately 2.5 hr -- run last!
    • (1) ./ConsumptionSaving/ConsMedModel.py
      • raise NotImplementedError(), 'Bicubic interpolation not yet implemented'
    • (0) ./ConsumptionSaving/RepAgentModel.py
    • (0) ./ConsumptionSaving/ConsPrefShockModel.py
      • TypeError: '>=' not supported between instances of 'float' and 'NoneType'
      • Note: once again, solved some things in between, so this looks like one of the "easier" errors
  • (1) ./FashionVictim/

    • (1) ./FashionVictim/FashionVictimParams.py
    • (1) ./FashionVictim/FashionVictimModel.py
  • (na) ./SolvingMicroDSOPs/

    • (na) ./SolvingMicroDSOPs/SetupSCFdata.py
    • (na) ./SolvingMicroDSOPs/EstimationParameters.py
    • (na) ./SolvingMicroDSOPs/StructEstimation.py
  • ( ) ./

    • ( ) ./HARKsimulation.py
    • ( ) ./HARKinterpolation.py
    • ( ) ./HARKcore.py
    • ( ) ./HARKparallel.py
    • ( ) ./HARKutilities.py
    • ( ) ./HARKestimation.py
  • ( ) ./cstwMPC/

    • ( ) ./cstwMPC/cstwMPCold.py
    • ( ) ./cstwMPC/cstwMPC.py
    • ( ) ./cstwMPC/SetupParamsCSTWold.py
    • ( ) ./cstwMPC/MakeCSTWfigs.py
    • ( ) ./cstwMPC/SetupParamsCSTW.py
    • ( ) ./cstwMPC/MakeCSTWfigsForSlides.py
  • ( ) ./Testing/

    • ( ) ./Testing/MultithreadDemo.py
    • ( ) ./Testing/ModelTesting.py
    • ( ) ./Testing/HARKutilities_UnitTests.py
    • ( ) ./Testing/Comparison_UnitTests.py
    • ( ) ./Testing/TractableBufferStockModel_UnitTests.py
  • ( ) ./Demos/

    • ( ) ./Demos/ConsIndShockModel_Try-Alternative-Parameter-Values.py
  • (9) ./cAndCwithStickyE/

    • ( ) ./cAndCwithStickyE/StickyEmodel.py
    • ( ) ./cAndCwithStickyE/StickyE_NO_MARKOV.py
    • ( ) ./cAndCwithStickyE/StickyE_MAIN.py
    • ( ) ./cAndCwithStickyE/StickyEtools.py
    • ( ) ./cAndCwithStickyE/StickyEparams.py
    • NOTE: assume that these have already been py3-ifyed under the most recent active fork (link)
⚠️ **GitHub.com Fallback** ⚠️