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

Cleaning up BAUS - Feb 2020 #120

Open
3 of 5 tasks
smmaurer opened this issue Feb 3, 2020 · 6 comments
Open
3 of 5 tasks

Cleaning up BAUS - Feb 2020 #120

smmaurer opened this issue Feb 3, 2020 · 6 comments

Comments

@smmaurer
Copy link

smmaurer commented Feb 3, 2020

This issue contains running documentation of work to clean up Bay Area UrbanSim and merge outstanding pull requests. cc @mkreilly

General goals:

Confirm that current codebase runs

The first thing I've done is check that the current codebase runs.

Codebase: BayAreaMetro/bayarea_urbansim master, at commit 423bb5b
Data files: "Current Large General Input Data", last updated 2019-07-11
Operating system: MacOS 10.15 Catalina

python baus.py -c -y 2015 -s 4 --random-seed >> runs/log10.txt 2>&1

This environment is working:

  • python 2.7
  • numpy 1.16.x (latest that supports py27)
  • pandas 0.24.x (latest that supports py27)
  • statsmodels 0.10.x (had to downgrade manually; seems like a py27 issue)
  • orca latest (1.5.x)
  • urbansim latest (3.1.x)
  • urbansim_defaults latest (0.2.x)
  • pandana 0.3.x

That Pandana version is key. Bay Area UrbanSim does NOT run for me with the latest version of Pandana (0.4.4). Here's the error. Looks like probably a difference in how missing values are handled.

And I get the same error with the PR #117 branch running in Python 3, so it seems like not something that's been fixed elsewhere yet.

  • diagnose and resolve the missing values error with Pandana v0.4.4
@mkreilly
Copy link

mkreilly commented Feb 4, 2020

@fscottfoti Sam is doing some cleanup here. Please tell us if there is anything we should know about pandana (above) if you have the time. Thanks!

@fscottfoti
Copy link
Collaborator

Honestly it looks like something in kdtree itself (from sklearn) is breaking. Probably that version of Pandana has a new version of kdtree with some change that broke things? Just a guess. Also worth checking to make sure the x's and y's on the parcels are still all valid (and probably should be UTM).

@fscottfoti
Copy link
Collaborator

Just from looking at the error and some of the kdtree code, I would suspect that one of the x's or y's is nan. If the older versions of pandana let this pass, maybe kdtree changed the behavior to do this validation to raise an error on nan but didn't before. Not at all sure, but it's a theory.

@smmaurer
Copy link
Author

smmaurer commented Feb 5, 2020

Excellent. Thanks @fscottfoti, I'll check these things out!

@smmaurer
Copy link
Author

The outstanding PR's are merged now, and I'm working through various minor errors. Here are some items to come back to:

Pandana

The Pandana problem indeed stemmed from parcel records without x-y coordinates. These used to be filtered out automatically when parcels were matched to network nodes, but no longer are after some changes in scikit-learn.

  • open a separate issue about fixing our base data
  • open an issue in udst/pandana to discuss restoring the previous default behavior

Python 3

One problem I'm seeing in Python 3 is that urbansim has some incompatibilities with Pandas v1.0, which was released about a month ago. For now, we should just pin BAUS at Pandas v0.25. An upcoming release of urbansim should fix things: UDST/urbansim#222

  • Revisit Pandas version restriction after urbansim is updated

Miscellaneous

  • Update dependency lists and installation instructions

Also tagging @yuqiww, who i think will be interested in this thread.

@fscottfoti
Copy link
Collaborator

fscottfoti commented Mar 20, 2020 via email

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

No branches or pull requests

3 participants