-
-
Notifications
You must be signed in to change notification settings - Fork 7
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
Error running the example script #31
Comments
The matplotlib lines are warnings, I believe. It maybe that the OG-Core style file needs updating, or it could be an issue with trying to import this file from a URL as is done in both OG-USA and OG-UK (see here). The real issue, and what is breaking execution, is
I've seen this issue with |
@jpycroft I was able to generate this same error. I had thought I ran this example before, but not sure. PR #27 maybe helpful here (though it needs to be updated with the master). Also, it would be good to learn more about OpenFisca-UK. I'm still not totally sure how to do many things with the model and don't fully understand how the data is loaded and hierarchical data structures handled. It might be good for all of us working with OG-UK to learn more about the microsimulation model. |
@jdebacker @nikhilwoodruff @rickecon Continuing to try to understand why I getting the litany of errors with run_oguk.py. I realise now that I'm not even getting past the import commands at the beginning of file. If I run to here:
I already get a load of errors: see attached "run_oguk_stop_after_importCalibrate_11oct2021.txt" Going to the next import command, and commenting out the previous import command, i.e.:
I again get a load of errors: see attached "run_oguk_stop_after_ogcore-outputPlots_CalibrationOff_11oct2021.txt" The same happens for the other "from ogcore" imports. run_oguk_stop_after_importCalibrate_11oct2021.txt |
@jpycroft All those were warnings. Your set of commands did execute (see the But those messages are annoying. I just merged a PR to OG-Core and a PR to OG-UK that should fix this (they completely remove any imports of matplotlib style files from scripts used in the two packages). Install new versions of each and try that above again. That warnings should disappear. |
Thanks @jdebacker! I updated my branch. It hard to tell if there are fewer warnings. There are certainly still many (attached). In any case, if it's only warnings, then perhaps the only important part of the output is the last lines:
I'll have a look at this later on. |
@jpycroft Did you reinstall the |
@jdebacker Thanks again! I hadn't updated my OG-Core. I updated that and tried to install its environment. This only partially worked, ending with the following error message (full output attached):
In any case, I updated OG-UK again and updated the environment (oguk-dev). Trying to run "run_oguk.py" still results in the litany of warnings as before, culminating in the same error as above (full output attached):
|
Great to see it (at least partially) working @jpycroft - this one I can answer: I while ago I wrote this format for |
@jpycroft, Nikhil pointed out the issue with your attempted run of the example script. I think the matplotllib warnings are still there because OG-Core was not updated because your env failed to updated. I'd remove the environment with: Then create it anew with |
@rickecon because he may have seen the same sphinx install error that Pycroft is seeing recently. Suggests perhaps removing those dependencies that just help with documentation. |
Thanks for the ideas @nikhilwoodruff @jdebacker. Running the
Output attached. |
@rickecon, @jdebacker, @nikhilwoodruff, Exciting news: I’m getting different error messages :-) Seriously, that is exciting! Having updated to the latest environment.yml and doing “conda update conda”, the litany of hundreds of error messages is gone. I’ve worked my way through a number of error messages and seem now to be stuck on accessing the synthetic data set for OpenFiscaUK. I’ll follow this up below with two more posts on:
|
Amazing - admittedly it's been a while since I last used the synthetic dataset, happy to debug anything else you get. Or, I don't suppose you can get access directly to the FRS by any means? |
Hi @nikhilwoodruff, |
With reference to the thread above, #31 (comment) Adjustments I’ve already made to get past errors:
As it appears to be non-essential, for now I simply edited it out.
|
With reference to the thread above, #31 (comment) & #31 (comment) Notes on error messages regarding the default / synthetic data set:
This is a result of their being no default data set. Possible solution |
@jpycroft the full FRS would be ideal - good luck - but I wonder if the synthetic dataset works if you do this? openfisca-uk-setup --set-default synth_frs |
Hi @nikhilwoodruff,
|
@jpycroft writes:
and then lists a bunch of changes he's made to source files to get things to work on his branch. But all of these changes are not relevant for the current versions of the sources files in the @jpycroft I would suggest that you sync the branch you are working on with the |
Thanks @jpycroft and @jdebacker - yes that's right. The code there is several months out of date. I think you shouldn't even need the repo cloned, but if you want to keep it, I'd suggest deleting it and reinstalling it. |
Also, when adding packages dependencies (like The option you should avoid at all costs is to copy over all the source files and place them in a directory inside another project and call them as if they are just modules which is what is outlined above in the comment by @jpycroft that says:
This is dangerous because you will not be sure you have all the dependencies of the package, it will be difficult to version control, and you are not guaranteed things run. FYI, current versions of |
Hi @jdebacker, @nikhilwoodruff, Let me first say about the sync-ing. Doing a upstream/main sync was the first thing I did. I assumed that was why I get different results than before. I was doing this:
OK, maybe this is the problem:
My upstream was still linked to the OG-UK-Calibration. Was that it? (If so, I still find that confusing for other reasons.) In any case, I'll do a delete and reinstall as you suggest Nikhil. |
@jpycroft Ah yes - the repo name change. That could be it. You'll want to reconfigure your remote URLs. Do that with a:
and, since your fork has this name also:
|
Thanks also for highlighting the conda-forge solution. I'll remember that if needed in future. (I should have clarified perhaps, the copying across was only ever intended as a stop gap to try and get moving at all.) Perhaps with the right version, it won't be required here. |
Sounds good - though I did think that GitHub redirects name changes, so that actually probably should've worked. But not really a problem anymore |
I removed and re-cloned OG-UK. I also removed and reinstalled the environment again. Now everything seems to be properly up-to-date. The error I'm hitting now is that I'm missing the 'reform' argument:
The reform ought to be taken from reform=get_default_reform(), which is a simple UBI reform. It's not clear to me why this isn't being picked up. |
OK, so that line essentially takes the argument, e.g. I wonder if either of the following works:
|
Hi @nikhilwoodruff, Thanks for the suggestions and clarification. Switching from
With
So, it appears to be recognising the reform. It states that it's going to use the synthetic data set, but fails to find the default data. |
Hi @nikhilwoodruff, Back to trying to get the model running with FRS. Finally got round to trying this out over the weekend. First, OG-UK does begin to run with synthetic data. To run with FRS, you mentioned to I'm not clear which command to use to get openfisca-uk to run. I first tried the command suggested by OG-UK:
Do I need to set up the FRS data somewhere, or be logged in to UKdata? |
Thanks @jpycroft - good to know the synth FRS runs. That gcloud error looks strange - I should be able to have a proper look today before the OG meeting, but looks like it's been found by others too. |
As per that issue could you try running |
Hi @nikhilwoodruff, Thanks for the idea! I get this:
Translation: "gcloud is not recognised as an internal or external command, executable programme or batch file." I pip installed gcloud and then google-cloud (though the pypi docs say that neither is currently maintained). |
Hi @nikhilwoodruff, Thanks for adding this change: https://github.com/PolicyEngine/openfisca-tools/blob/master/setup.py I did a "pip install openfisca-uk" should update my version to try to incorporate it. Unfortunately, I'm still getting the same output. Is there something else I need to run first?
|
Ah thanks @jpycroft - sorry, could you try One of the differences between my local setup and yours is that I have the gcloud CLI installed. But I'm aiming for that to not be required to download the microdata. |
Hi @nikhilwoodruff, I get a different output now, which is surely progress! I entered:
Then
|
Great stuff @jpycroft - the good news is that I know exactly what this is, and I think it should be fixed now if you update OpenFisca-UK (for context, this issue was caused by me naively removing MANIFEST.in from the repo without realising what it did: PolicyEngine/policyengine-uk#574). |
Thanks again @nikhilwoodruff! I redid the
Then the same command as before (I think) still gives the same output. Any other ideas?
|
Sorry for my delay in getting back to this @jpycroft! Maybe we can debug it a bit at the meeting tomorrow? One thought: running the |
Hi @nikhilwoodruff, Thanks again. The command
So yes, it does give the "uninstalling openfisca-uk... installed openfisca-uk" message. |
Hi @nikhilwoodruff, Actually, it's a bit disappointing ... it didn't quite solve the issue. Here's what happened. First, pip installing openfisca-uk within the newly created "openfisca-uk" environment (with Python 3.7.13) did eventually work. Output attached as txt. Then the command to download 2019 frs data gave the following:
PS: I retried the gcloud auth, but same error as before:
|
Ah, well thanks for getting through the installation: I think it's still a step in the right direction. The error makes sense to me: it's because the |
@jpycroft reports:
See Issue #28 for the above referenced txt files.
The text was updated successfully, but these errors were encountered: