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

KeyError when run evaluate #5

Open
yingjun-zhang opened this issue Jul 2, 2024 · 2 comments
Open

KeyError when run evaluate #5

yingjun-zhang opened this issue Jul 2, 2024 · 2 comments

Comments

@yingjun-zhang
Copy link

Hello, amazing job, I trained on my own data and want to run an evaluate, but an error occurs when loading geocells:

lla_coords = torch.tensor(geo_df[['lng', 'lat']].values)
KeyError: "None of [Index(['lng', 'lat' ], dtype='object')] are in the [columns]"

I guess it is because the geocell generated by my run has only 6 columns: name, admin_1, country, size, num_polygons, geometry, I made my geocells.csv using dataset_creation/geocell/geocell_creation.py
So what might have gone wrong?

@Chris1nexus
Copy link

you can see why in the cell_collection.py file:
it only selects the GEOCELL_COLUMNS = ['name', 'admin_1', 'country', 'size', 'num_polygons', 'geometry']
hence you're missing the lat lon coordinates. Still, you can get them from the geometry object

@uloma07
Copy link

uloma07 commented Sep 2, 2024

Hi @Chris1nexus,
I have the same problem with my geocells only having the same 6 columns. Can you please explain how I can get the lat lon? I'm not very familiar with this field.

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