You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have already installed the necessary requirements and now about to try to run run_model.py (with map matching task, STMatching model and T_DRIVE_SMALL dataset, and the rest remains default) however I am getting a key error. I am not sure how I can resolve the error? Thank you so much.
gcalix@tiger:~/Bigscity-LibCity$ python run_model.py --task map_matching --model STMatching --dataset T_DRIVE_SMALL 2022-07-28 20:24:15,996 - INFO - Log directory: ./libcity/log 2022-07-28 20:24:15,996 - INFO - Begin pipeline, task=map_matching, model_name=STMatching, dataset_name=T_DRIVE_SMALL, exp_id=87895 2022-07-28 20:24:15,996 - INFO - {'task': 'map_matching', 'model': 'STMatching', 'dataset': 'T_DRIVE_SMALL', 'saved_model': True, 'train': False, 'seed': 0, 'dataset_class': 'MapMatchingDataset', 'executor': 'MapMatchingExecutor', 'evaluator': 'MapMatchingEvaluator', 'k': 5, 'r': 200, 'mu': 0, 'sigma': 20, 'window_size': 40, 'delta_time': True, 'metrics': ['RMF', 'AN', 'AL'], 'save_modes': ['csv'], 'geo': {'including_types': ['Polygon'], 'Polygon': {'row_id': 'num', 'column_id': 'num'}}, 'grid': {'including_types': ['state'], 'state': {'row_id': 32, 'column_id': 32, 'inflow': 'num', 'outflow': 'num'}}, 'data_col': ['inflow', 'outflow'], 'data_files': ['T_DRIVE_SMALL'], 'geo_file': 'T_DRIVE_SMALL', 'output_dim': 2, 'init_weight_inf_or_zero': 'inf', 'set_weight_link_or_dist': 'dist', 'calculate_weight_adj': False, 'weight_adj_epsilon': 0.1, 'time_intervals': 3600, 'device': device(type='cuda', index=0), 'exp_id': 87895} Traceback (most recent call last): File "run_model.py", line 38, in <module> train=args.train, other_args=other_args) File "/home/gcalix/Bigscity-LibCity/libcity/pipeline/pipeline.py", line 46, in run_model dataset = get_dataset(config) File "/home/gcalix/Bigscity-LibCity/libcity/data/utils.py", line 22, in get_dataset config['dataset_class'])(config) File "/home/gcalix/Bigscity-LibCity/libcity/data/dataset/map_matching_dataset.py", line 48, in __init__ self.with_rd_speed = ('speed' in config['rel']['geo'].keys()) File "/home/gcalix/Bigscity-LibCity/libcity/config/config_parser.py", line 141, in __getitem__ raise KeyError('{} is not in the config'.format(key)) KeyError: 'rel is not in the config
The text was updated successfully, but these errors were encountered:
STMatching is a road network matching model for mapping GPS trajectories to corresponding road segments. But T-Drive-Small is a gridded traffic flow dataset, not the original Beijing trajectory data, so this is a mismatch, so it will report an error.
The matching relationship between the model and the data can be found in this link.
If you need to match the original T-Drive trajectory data to the road network, you can process T-Drive into a trajectory atomic file, and then you can use the code in LibCity.
I have already installed the necessary requirements and now about to try to run
run_model.py
(with map matching task, STMatching model and T_DRIVE_SMALL dataset, and the rest remains default) however I am getting a key error. I am not sure how I can resolve the error? Thank you so much.gcalix@tiger:~/Bigscity-LibCity$ python run_model.py --task map_matching --model STMatching --dataset T_DRIVE_SMALL 2022-07-28 20:24:15,996 - INFO - Log directory: ./libcity/log 2022-07-28 20:24:15,996 - INFO - Begin pipeline, task=map_matching, model_name=STMatching, dataset_name=T_DRIVE_SMALL, exp_id=87895 2022-07-28 20:24:15,996 - INFO - {'task': 'map_matching', 'model': 'STMatching', 'dataset': 'T_DRIVE_SMALL', 'saved_model': True, 'train': False, 'seed': 0, 'dataset_class': 'MapMatchingDataset', 'executor': 'MapMatchingExecutor', 'evaluator': 'MapMatchingEvaluator', 'k': 5, 'r': 200, 'mu': 0, 'sigma': 20, 'window_size': 40, 'delta_time': True, 'metrics': ['RMF', 'AN', 'AL'], 'save_modes': ['csv'], 'geo': {'including_types': ['Polygon'], 'Polygon': {'row_id': 'num', 'column_id': 'num'}}, 'grid': {'including_types': ['state'], 'state': {'row_id': 32, 'column_id': 32, 'inflow': 'num', 'outflow': 'num'}}, 'data_col': ['inflow', 'outflow'], 'data_files': ['T_DRIVE_SMALL'], 'geo_file': 'T_DRIVE_SMALL', 'output_dim': 2, 'init_weight_inf_or_zero': 'inf', 'set_weight_link_or_dist': 'dist', 'calculate_weight_adj': False, 'weight_adj_epsilon': 0.1, 'time_intervals': 3600, 'device': device(type='cuda', index=0), 'exp_id': 87895} Traceback (most recent call last): File "run_model.py", line 38, in <module> train=args.train, other_args=other_args) File "/home/gcalix/Bigscity-LibCity/libcity/pipeline/pipeline.py", line 46, in run_model dataset = get_dataset(config) File "/home/gcalix/Bigscity-LibCity/libcity/data/utils.py", line 22, in get_dataset config['dataset_class'])(config) File "/home/gcalix/Bigscity-LibCity/libcity/data/dataset/map_matching_dataset.py", line 48, in __init__ self.with_rd_speed = ('speed' in config['rel']['geo'].keys()) File "/home/gcalix/Bigscity-LibCity/libcity/config/config_parser.py", line 141, in __getitem__ raise KeyError('{} is not in the config'.format(key)) KeyError: 'rel is not in the config
The text was updated successfully, but these errors were encountered: