-
-
Notifications
You must be signed in to change notification settings - Fork 199
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
ConsumptionSavingModel will not load from outside sources #58
Comments
Let me know if there's anything else I can do to help with reproducibility. Here's some platform information.
|
For reproducibility, let's try this:
That should run a really small estimation ("beta-point infinite horizon") and tell you that beta=0.9893 or so. You can also try doing this for .../HARK/ConsumptionSavingModel/TractableBufferStockModel.py ... That will take ~1 second and solve the same simple model two different ways. If the method you used to run the modules and get that error is substantially different than the procedure I described, please tell me what you were doing. If there are other ways to run files that should work but don't work, we want to know. |
ganong123, |
John: Without making that change, do you get the same error? The lines sys.path.insert(0,'../') are meant to work on every machine, no matter where you put HARK, because it's a relative filepath. The intention is that it adds the directory directly above the current one (which should be the root directory of HARK), and the ConsumptionSavingModel directory off of that one. |
My understanding on python is not quite good to be honest. But, |
I have a guess of the problem. Do: import os That should tell you the current working directory. Before you run a file, the current working directory should be the one that the module is in. You can change the CWD with os.chdir. If you use Spyder and click the green arrow "run" button, it does a version of this by using the runfile command with the wdir keyword. We strongly recommend using Spyder, an iPython IDE that comes with Anaconda. Just type spyder at a command prompt after installing Anaconda. |
(1) I was (and continue to be) working in Spyder
But this was not sufficient to load the relevant functions. In any case, switching to comments-and-cleanup branch in my fork resolved the issue. Thanks everyone for your help and I'll continue to report out issues as I find them. |
Here are two places where it fails.
However, when I run ConsumptionSavingModel.py directly, it runs with no trouble at all.
The text was updated successfully, but these errors were encountered: