Error when trying to run the code
Hi there!, I´m tryng to run the code for the NYC data and getting this error:
--epochs 1 --device cpu --mode train Train Epoch: 1 [2530/2531 Loss: 671.671570 Total training time: 23.70315432548523 seconds Saving model to ./results/model_DG_new_york.pt ... Computing the CPC on test set, loc2cpc_numerator ... Traceback (most recent call last): File "main.py", line 261, in
evaluate() File "main.py", line 173, in evaluate cpc_df = cpc_from_num(edf, oa2tile, o2d2flow) File "main.py", line 166, in cpc_from_num edf['tile'] = edf['locID'].apply(lambda x: oa2tile[x]) File "/home/fatima/.conda/envs/deepgravity/lib/python3.7/site-packages/pandas/core/series.py", line 4357, in apply return SeriesApply(self, func, convert_dtype, args, kwargs).apply() File "/home/fatima/.conda/envs/deepgravity/lib/python3.7/site-packages/pandas/core/apply.py", line 1043, in apply return self.apply_standard() File "/home/fatima/.conda/envs/deepgravity/lib/python3.7/site-packages/pandas/core/apply.py", line 1101, in apply_standard convert=self.convert_dtype, File "pandas/_libs/lib.pyx", line 2859, in pandas._libs.lib.map_infer File "main.py", line 166, in edf['tile'] = edf['locID'].apply(lambda x: oa2tile[x]) KeyError: 1
It seems the network is trained and saved properly, but something arise after it. Thanks in advance, Fatima.
Dear fatimavrojas, we have just pushed a new version of the code and we solved this problem. Please let us know if the problem persists