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

Time varying ability matrix #895

Merged
merged 25 commits into from
Jan 22, 2024
Merged

Time varying ability matrix #895

merged 25 commits into from
Jan 22, 2024

Conversation

jdebacker
Copy link
Member

This PR allows one to use an ability/labor productivity matrix that varies over time. Changing the shape of the e parameter object from SxJ to TxSxJ.

@codecov-commenter
Copy link

codecov-commenter commented Jan 21, 2024

Codecov Report

Attention: 9 lines in your changes are missing coverage. Please review.

Comparison is base (d8a0fa4) 80.28% compared to head (5fa18cb) 80.26%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #895      +/-   ##
==========================================
- Coverage   80.28%   80.26%   -0.03%     
==========================================
  Files          18       18              
  Lines        4144     4175      +31     
==========================================
+ Hits         3327     3351      +24     
- Misses        817      824       +7     
Flag Coverage Δ
unittests 80.26% <80.43%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
ogcore/SS.py 87.67% <100.00%> (+0.08%) ⬆️
ogcore/TPI.py 93.02% <100.00%> (-0.02%) ⬇️
ogcore/aggregates.py 100.00% <100.00%> (ø)
ogcore/parameters.py 84.14% <100.00%> (+0.29%) ⬆️
ogcore/tax.py 99.45% <100.00%> (ø)
ogcore/utils.py 87.91% <100.00%> (+0.03%) ⬆️
ogcore/parameter_plots.py 80.86% <75.00%> (+0.15%) ⬆️
ogcore/household.py 92.72% <69.56%> (-2.76%) ⬇️

@jdebacker jdebacker marked this pull request as ready for review January 21, 2024 20:11
@rickecon
Copy link
Member

@jdebacker. I deleted my ogcore-dev conda environment and reinstalled it in my clone of your branch. When I ran run_ogcore_example.py and got the following error:

(ogcore-dev) richardevans@Richards-MacBook-Pro-2 run_examples % python run_ogcore_example.py
Number of workers =  7
Traceback (most recent call last):
  File "/Users/richardevans/Docs/Economics/OSE/OG-Core/run_examples/run_ogcore_example.py", line 138, in <module>
    main()
  File "/Users/richardevans/Docs/Economics/OSE/OG-Core/run_examples/run_ogcore_example.py", line 77, in main
    p.e = np.tile(p.e.reshape(1, p.S, p.J), (p.T, 1, 1))
                  ^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: cannot reshape array of size 224000 into shape (1,80,7)

@jdebacker
Copy link
Member Author

@rickecon Noted about the example. That was for some testing and should be taken out. Will update.

@jdebacker
Copy link
Member Author

All test we expect to pass on Python 3.11 pass locally. The three failures are the txfunc.py functions whose results vary with the version on Python/SciPy used:

=========================== short test summary info ============================
FAILED tests/test_txfunc.py::test_txfunc_est[DEP] - assert False
FAILED tests/test_txfunc.py::test_tax_func_loop - assert False
FAILED tests/test_txfunc.py::test_tax_func_estimate - assert False
========= 3 failed, 496 passed, 16819 warnings in 32781.69s (9:06:21) ==========

I was also able to run the run_ogcore_example.py script all the way through without issue.

I believe this PR is ready to merge.

@rickecon
Copy link
Member

LGTM. Thanks, @jdebacker.

@rickecon rickecon merged commit 4b894bd into PSLmodels:master Jan 22, 2024
11 checks passed
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

Successfully merging this pull request may close these issues.

3 participants