LibTraffic is a unified, flexible and comprehensive traffic prediction library based on PyTorch

Overview

LibTraffic(阡陌)

HomePage |Docs|Datasets|Paper List

LibTraffic is a unified, flexible and comprehensive traffic prediction library, which provides researchers with a credibly experimental tool and a convenient development framework. Our library is implemented based on PyTorch, and includes all the necessary steps or components related to traffic prediction into a systematic pipeline.

LibTraffic currently supports the following tasks:

  • Traffic State Prediction
    • Traffic Flow Prediction
    • Traffic Speed Prediction
    • On-Demand Service Prediction
  • Trajectory Next-Location Prediction

Features

  • Unified: LibTraffic builds a systematic pipeline to implement, use and evaluate traffic prediction models in a unified platform. We design basic spatial-temporal data storage, unified model instantiation interfaces, and standardized evaluation procedure.

  • Comprehensive: 42 models covering four traffic prediction tasks have been reproduced to form a comprehensive model warehouse. Meanwhile, LibTraffic collects 29 commonly used datasets of different sources and implements a series of commonly used evaluation metrics and strategies for performance evaluation.

  • Extensible: LibTraffic enables a modular design of different components, allowing users to flexibly insert customized components into the library. Therefore, new researchers can easily develop new models with the support of LibTraffic.

Overall Framework

  • Configuration Module: Responsible for managing all the parameters involved in the framework.
  • Data Module: Responsible for loading datasets and data preprocessing operations.
  • Model Module: Responsible for initializing the reproduced baseline model or custom model.
  • Evaluation Module: Responsible for evaluating model prediction results through multiple indicators.
  • Execution Module: Responsible for model training and prediction.

Quick Start

Clone the code and run run_model.py to train and evaluate a single model reproduced in the library. More details is represented in Docs.

Contribution

The LibTraffic is mainly developed and maintained by Beihang Interest Group on SmartCity (BIGSCITY). The core developers of this library are @aptx1231 and @WenMellors.

Several co-developers have also participated in the reproduction of the model, the list of contributions of which is presented in the reproduction contribution list.

If you encounter a bug or have any suggestion, please contact us by raising an issue.

License

LibTraffic uses Apache License 2.0.

Comments
  • 自动化调参报错,程序密码不对,redis设置为无密码。程序的密码设置?

    自动化调参报错,程序密码不对,redis设置为无密码。程序的密码设置?

    Traceback (most recent call last): File "E:\conda\envs\pytorch\lib\site-packages\ray_private\services.py", line 655, in wait_for_redis_to_start redis_client.client_list() File "E:\conda\envs\pytorch\lib\site-packages\redis\client.py", line 1194, in client_list return self.execute_command('CLIENT LIST') File "E:\conda\envs\pytorch\lib\site-packages\redis\client.py", line 898, in execute_command conn = self.connection or pool.get_connection(command_name, **options) File "E:\conda\envs\pytorch\lib\site-packages\redis\connection.py", line 1192, in get_connection connection.connect() File "E:\conda\envs\pytorch\lib\site-packages\redis\connection.py", line 567, in connect self.on_connect() File "E:\conda\envs\pytorch\lib\site-packages\redis\connection.py", line 643, in on_connect auth_response = self.read_response() File "E:\conda\envs\pytorch\lib\site-packages\redis\connection.py", line 739, in read_response response = self._parser.read_response() File "E:\conda\envs\pytorch\lib\site-packages\redis\connection.py", line 484, in read_response raise response redis.exceptions.AuthenticationError: Client sent AUTH, but no password is set

    The above exception was the direct cause of the following exception:

    Traceback (most recent call last): File "hyper_tune.py", line 52, in other_args=other_args) File "H:\Bigscity-LibCity\libcity\pipeline\pipeline.py", line 211, in hyper_parameter local_dir='./libcity/cache/hyper_tune', num_samples=num_samples) File "E:\conda\envs\pytorch\lib\site-packages\ray\tune\tune.py", line 298, in run _ray_auto_init() File "E:\conda\envs\pytorch\lib\site-packages\ray\tune\tune.py", line 681, in _ray_auto_init ray.init() File "E:\conda\envs\pytorch\lib\site-packages\ray_private\client_mode_hook.py", line 82, in wrapper return func(*args, **kwargs) File "E:\conda\envs\pytorch\lib\site-packages\ray\worker.py", line 896, in init ray_params=ray_params) File "E:\conda\envs\pytorch\lib\site-packages\ray\node.py", line 248, in init self.start_head_processes() File "E:\conda\envs\pytorch\lib\site-packages\ray\node.py", line 894, in start_head_processes self.start_redis() File "E:\conda\envs\pytorch\lib\site-packages\ray\node.py", line 714, in start_redis port_denylist=self._ray_params.reserved_ports) File "E:\conda\envs\pytorch\lib\site-packages\ray_private\services.py", line 881, in start_redis port_denylist=port_denylist) File "E:\conda\envs\pytorch\lib\site-packages\ray_private\services.py", line 1029, in _start_redis_instance wait_for_redis_to_start("127.0.0.1", port, password=password) File "E:\conda\envs\pytorch\lib\site-packages\ray_private\services.py", line 666, in wait_for_redis_to_start redis_ip_address, redis_port)) from authEx RuntimeError: Unable to connect to Redis at 127.0.0.1:6379.

    opened by ZPFPHD 14
  • MTGNN only captures the first two steps and then fails

    MTGNN only captures the first two steps and then fails

    Thanks for building this excellent library!

    I read the ranking of the models here: https://libcity.ai/#/ranking/METR-LA, and try to reproduce the results using METR-LA data.

    I used the default setting (input_window 12 and output_window 12) but found the metrics of MTGNN is strange:

    MAE | MAPE | MSE | RMSE | masked_MAE | masked_MAPE | masked_MSE | masked_RMSE | R2 | EVAR -- | -- | -- | -- | -- | -- | -- | -- | -- | -- 9.465062141 | inf | 481.758728 | 21.94900322 | 2.327759743 | 0.05680662 | 17.26930046 | 4.15563488 | 0.076125567 | 0.191385031 9.732895851 | inf | 484.2471008 | 22.00561523 | 2.659701586 | 0.068691827 | 26.14606094 | 5.113321781 | 0.071359592 | 0.189329565 16.70842361 | inf | 533.5368042 | 23.09841537 | 11.39525414 | 0.301383018 | 191.5453339 | 13.83999062 | -0.023237876 | 0 16.71042061 | inf | 533.5725098 | 23.09918785 | 11.3973341 | 0.301409751 | 191.5722046 | 13.8409605 | -0.023193555 | -3.58E-07 16.70780754 | inf | 533.5404053 | 23.09849358 | 11.39412403 | 0.301374763 | 191.5185547 | 13.83902264 | -0.023288411 | -2.07E-05 16.70010757 | inf | 533.4511108 | 23.09656143 | 11.38522053 | 0.301252007 | 191.4121399 | 13.83517742 | -0.023419132 | -1.19E-07 16.70577621 | inf | 533.5248413 | 23.09815788 | 11.39150429 | 0.301328242 | 191.4844055 | 13.83778954 | -0.02328399 | -2.38E-07 16.70551872 | inf | 533.5244751 | 23.09814835 | 11.3910265 | 0.301333904 | 191.47229 | 13.8373518 | -0.023330131 | -1.19E-07 16.70627594 | inf | 533.5570679 | 23.09885406 | 11.39166451 | 0.301335871 | 191.4946899 | 13.83816051 | -0.02331653 | 1.19E-07 16.70834541 | inf | 533.6000366 | 23.09978485 | 11.39379406 | 0.301371098 | 191.5291443 | 13.83940601 | -0.023293527 | 0 16.70842552 | inf | 533.6105347 | 23.10001183 | 11.39365578 | 0.301361412 | 191.5263062 | 13.83930302 | -0.023285843 | -1.19E-07 16.70877266 | inf | 533.6110229 | 23.10002327 | 11.39382648 | 0.301376134 | 191.5121155 | 13.83879089 | -0.023291072 | 0

    You can find that MTGNN only learns the first two steps well, then the performance almost remains unchanged.

    opened by SonghuaHu-UMD 8
  • performance leaderboard of Trajectory Next-Location task

    performance leaderboard of Trajectory Next-Location task

    Hi, thanks for the fantastic work.

    We can access the performances and rankings of models via the menu item Ranking from the home page of LibCity, however, it seems that only information on the Traffic State Prediction task is available. Could the performance leaderboard of the Trajectory Next-Location task be provided?

    It would be helpful to have some information about this in the docs somewhere. 🥂

    opened by nehSgnaiL 6
  • GEML,数据格式错误

    GEML,数据格式错误

    您好,我用你们提供的处理好的数据“NYCTAXI202004-202006_OD”运行GEML模型发生错误。 命令行为:python run_model.py --task traffic_state_pred --model GEML --dataset NYCTAXI202004-202006_OD。 一开始提示错误为 No such file or directory: './raw_data/NYCTAXI202004-202006_OD/NYCTAXI202004-202006_OD.rel'。 然后我将文件中NYCTAXI202004-202006.rel 文件改为 NYCTAXI202004-202006_OD.rel 运行。 “- INFO - Loading file NYCTAXI202004-202006.od”时又发生错误:KeyError: "['inflow', 'outflow'] not in index" 请问这个模型使用哪个数据集运行?是数据集的问题还是代码的问题?

    opened by gonglucky 6
  • 关于PeMSD4数据集跑模型遇到的相关问题

    关于PeMSD4数据集跑模型遇到的相关问题

    1.用STMGAT模型进行实验时,提示“dgl._ffi.base.DGLError: There are 0-in-degree nodes in the graph, output for those nodes will be invalid. This is harmful for some applications, causing silent performance regression. Adding self-loop on the input graph by calling g = dgl.add_self_loop(g) will resolve the issue. Setting allow_zero_in_degree to be True when constructing this module will suppress the check and let the code run.” 2.用HGCN模型进行实验时,提示“IndexError: index 8 is out of bounds for dimension 0 with size 7” 3.用ATDM模型进行实验时,提示“RuntimeError: shape '[64, 3, 12, 307]' is invalid for input of size 235776” 4.用DKFN模型进行实验时,提示“ValueError: Input contains NaN, infinity or a value too large for dtype('float32').” 希望能得到您的帮助

    opened by sly111 6
  • GEML训练问题

    GEML训练问题

    您好,我用你们提供的处理好的数据“NYCTAXI202004-202006_OD”运行GEML模型进行模型训练,训练后结果进行相应预测。目前存在以下问题:1.训练后模型预测结果接近为0,加载cache中npz结果,使用np.max函数提取预测值的最大值,结果接近0;2.而在训练过程中,通过log发现,模型loss基本上没有大规模下降。 在迁移到我自己的数据中时,也出现该现象。

    opened by YichenWHU 5
  • 自动调参工具的问题

    自动调参工具的问题

    python hyper_tune.py --task traffic_state_pred --model GRU --dataset METR_LA --space_file sample_space_file 使用后提示

    AttributeError: module 'idna' has no attribute 'IDNAError' 和 (raylet) ModuleNotFoundError: No module named 'aiohttp.signals'

    Traceback (most recent call last):
      File "hyper_tune.py", line 65, in <module>
        other_args=other_args)
      File "/home/jy/Bigscity-LibCity/libcity/pipeline/pipeline.py", line 196, in hyper_parameter
        local_dir='./libcity/cache/hyper_tune', num_samples=num_samples)
      File "/home/jy/.local/lib/python3.7/site-packages/ray/tune/tune.py", line 364, in run
        callbacks, sync_config, metric=metric, loggers=loggers)
      File "/home/jy/.local/lib/python3.7/site-packages/ray/tune/utils/callback.py", line 120, in create_default_callbacks
        _sync_to_driver = detect_sync_to_driver(sync_config.sync_to_driver)
      File "/home/jy/.local/lib/python3.7/site-packages/ray/tune/syncer.py", line 461, in detect_sync_to_driver
        from ray.tune.integration.docker import DockerSyncer
      File "/home/jy/.local/lib/python3.7/site-packages/ray/tune/integration/docker.py", line 5, in <module>
        from ray.autoscaler.sdk import rsync, configure_logging
      File "/home/jy/.local/lib/python3.7/site-packages/ray/autoscaler/sdk.py", line 9, in <module>
        from ray.autoscaler._private import commands
      File "/home/jy/.local/lib/python3.7/site-packages/ray/autoscaler/_private/commands.py", line 28, in <module>
        from ray.autoscaler._private.util import validate_config, hash_runtime_conf, \
      File "/home/jy/.local/lib/python3.7/site-packages/ray/autoscaler/_private/util.py", line 6, in <module>
        import jsonschema
      File "/home/jy/anaconda3/envs/Pytorch171/lib/python3.7/site-packages/jsonschema/__init__.py", line 14, in <module>
        from jsonschema._format import (
      File "/home/jy/anaconda3/envs/Pytorch171/lib/python3.7/site-packages/jsonschema/_format.py", line 240, in <module>
        @_checks_drafts(draft7="idn-hostname", raises=idna.IDNAError)
    AttributeError: module 'idna' has no attribute 'IDNAError'
    (raylet) Traceback (most recent call last):
    (raylet)   File "/home/jy/.local/lib/python3.7/site-packages/ray/new_dashboard/agent.py", line 22, in <module>
    (raylet)     import ray.new_dashboard.utils as dashboard_utils
    (raylet)   File "/home/jy/.local/lib/python3.7/site-packages/ray/new_dashboard/utils.py", line 20, in <module>
    (raylet)     import aiohttp.signals
    (raylet) ModuleNotFoundError: No module named 'aiohttp.signals'
    
    
    
    opened by TronYY 5
  • HRNR

    HRNR

    初版。目前没有做成固定下游任务、可改上游的形式,预训练两个转移矩阵的训练过程非常神秘,梯度不怎么变化。

    目前实现和论文里的不同之处:

    1. 计算 TRZ M2 用的 GCN 而不是 GAT。(GAT 做不太出来,矩阵只有十几个位置 > 0.5)
    2. 计算 TRZ loss 中,C 矩阵直接用了可达矩阵模拟,没有使用真实路段数据。

    TODO 的东西比较多:

    1. 预训练的训练次数、学习率做成参数;
    2. 使用 osm extract 路网制作出原子数据,然后进行比较;
    3. 可达矩阵改成论文中所写,真实下一跳数据计算出来的 C;
    4. 论文实现的后半部分照着原文实现一下;
    5. 增加数据缓存机制;
    6. evaluator 还没写,目前仅看训练的效果也不是很好。

    固定上下游任务有点困难,整个模型从设计来说就是一体的,除非违背论文设计 NS 的构造:让 NS 表示地更广一些,不仅仅是那四个 feature。这个也待讨论。

    opened by PotassiumWings 5
  • 第一次使用发现的问题

    第一次使用发现的问题

    感谢开源这么好的框架,第一次上手发现如下问题:

    1. quick start 不详细,我按照quick start的教程开始做,python run_model.py 是运行不了的,因为没有指定参数。 而且你们没有说清楚需要下载哪些数据集之类的,让人找不到北。对新手不太友好。 之后运行python run_model.py --task traffic_state_pred --model DCRNN --dataset METR_LA的时候发现了很多安装包的问题,即使安装了requirements里面的包还是有很多包没覆盖到。 再次运行还是报错:代码import 库的时候是这样:import torch.tensor as tensor. 报错表示找不到tensor,修改为 from torch import tensor 解决了。

    2. 到现在还是有问题没解决,torch-sparse 安装不上,我猜测是库和库之间依赖的问题!版本要对应起来! 网上的解决办法是: pip install torch==1.2.0 pip install torch_geometric==1.4.1 pip install torch_sparse==0.4.4 pip install torch_scatter==1.4.0 pip install torch_cluster==1.4.5 但你们的torch版本很高,我怕重装torch会出现其他的版本兼容问题。 这个问题不知道该如何解决。 总之,你们的框架写的很全面,早上起来刷到你们,我被震惊了,很佩服!这么大的工作量,代码,数据,文档,还有网站等等一些工作,对技术要求也很高,你们做到了,敬佩难以言表,但是使用体验很差,望改进! 最后还是向你们致敬。

    opened by pengzhangzhi 5
  • why was the padding size set to the actual size + 1 in the Trajectory Next-Location task

    why was the padding size set to the actual size + 1 in the Trajectory Next-Location task

    Hi, thanks for your incredible job.

    Recently I learned the code of the location prediction task in the LibCity, and the padding size was set to the actual size + 1 on both the location feature and time feature. Why were these parameters set to the actual size + 1 rather than the actual size?

    https://github.com/LibCity/Bigscity-LibCity/blob/f97062d3cdcb78f983f74a2993b6bda67f442293/libcity/data/dataset/trajectory_encoder/standard_trajectory_encoder.py#L112

    I'm not quite familiar with this field, looking forward to any replies that could help me. 😄

    opened by nehSgnaiL 4
  • How to visualize the output?

    How to visualize the output?

    I have used run_model and then test_model. Now i want to visualize the output or want to know want can be the prediction. How to do that.

    !python test_model.py --task="traffic_state_pred" --model="AutoEncoder" --dataset="METR_LA"

    2022-09-02 04:47:19,613 - INFO - Log directory: ./libcity/log 2022-09-02 04:47:19,613 - INFO - {'task': 'traffic_state_pred', 'model': 'RNN', 'dataset': 'METR_LA', 'saved_model': True, 'train': True, 'batch_size': 2, 'dataset_class': 'TrafficStatePointDataset', 'executor': 'TrafficStateExecutor', 'evaluator': 'TrafficStateEvaluator', 'rnn_type': 'RNN', 'hidden_size': 64, 'num_layers': 1, 'dropout': 0, 'bidirectional': False, 'teacher_forcing_ratio': 0, 'scaler': 'standard', 'load_external': True, 'normal_external': False, 'ext_scaler': 'none', 'add_time_in_day': True, 'add_day_in_week': False, 'max_epoch': 100, 'learner': 'adam', 'learning_rate': 0.01, 'lr_decay': True, 'lr_scheduler': 'multisteplr', 'lr_decay_ratio': 0.1, 'steps': [5, 20, 40, 70], 'clip_grad_norm': True, 'max_grad_norm': 5, 'use_early_stop': True, 'patience': 50, 'cache_dataset': True, 'num_workers': 0, 'pad_with_last_sample': True, 'train_rate': 0.7, 'eval_rate': 0.1, 'input_window': 12, 'output_window': 12, 'gpu': True, 'gpu_id': 0, 'train_loss': 'none', 'epoch': 0, 'weight_decay': 0, 'lr_epsilon': 1e-08, 'lr_beta1': 0.9, 'lr_beta2': 0.999, 'lr_alpha': 0.99, 'lr_momentum': 0, 'step_size': 10, 'lr_T_max': 30, 'lr_eta_min': 0, 'lr_patience': 10, 'lr_threshold': 0.0001, 'log_level': 'INFO', 'log_every': 1, 'load_best_epoch': True, 'hyper_tune': False, 'metrics': ['MAE', 'MAPE', 'MSE', 'RMSE', 'masked_MAE', 'masked_MAPE', 'masked_MSE', 'masked_RMSE', 'R2', 'EVAR'], 'evaluator_mode': 'single', 'save_mode': ['csv'], 'geo': {'including_types': ['Point'], 'Point': {}}, 'rel': {'including_types': ['geo'], 'geo': {'cost': 'num'}}, 'dyna': {'including_types': ['state'], 'state': {'entity_id': 'geo_id', 'traffic_speed': 'num'}}, 'data_col': ['traffic_speed'], 'weight_col': 'cost', 'data_files': ['METR_LA'], 'geo_file': 'METR_LA', 'rel_file': 'METR_LA', 'output_dim': 1, 'time_intervals': 300, 'init_weight_inf_or_zero': 'inf', 'set_weight_link_or_dist': 'dist', 'calculate_weight_adj': True, 'weight_adj_epsilon': 0.1, 'device': device(type='cuda', index=0), 'exp_id': 41266} 2022-09-02 04:47:20,120 - INFO - Loaded file METR_LA.geo, num_nodes=207 2022-09-02 04:47:20,130 - INFO - set_weight_link_or_dist: dist 2022-09-02 04:47:20,131 - INFO - init_weight_inf_or_zero: inf 2022-09-02 04:47:20,160 - INFO - Loaded file METR_LA.rel, shape=(207, 207) 2022-09-02 04:47:20,160 - INFO - Start Calculate the weight by Gauss kernel! 2022-09-02 04:47:20,161 - INFO - Loading file METR_LA.dyna 2022-09-02 04:47:25,775 - INFO - Loaded file METR_LA.dyna, shape=(34272, 207, 1) tcmalloc: large alloc 1361199104 bytes == 0xb406c000 @ 0x7f1d833a21e7 0x7f1d2f40c46e 0x7f1d2f45cc2b 0x7f1d2f45ccc8 0x7f1d2f503e70 0x7f1d2f50459c 0x7f1d2f5046bd 0x4bc4ab 0x7f1d2f449ef7 0x59371f 0x515244 0x549576 0x593fce 0x548ae9 0x5127f1 0x549e0e 0x4bca8a 0x7f1d2f449ef7 0x59371f 0x515244 0x549576 0x593fce 0x548ae9 0x5127f1 0x593dd7 0x511e2c 0x593dd7 0x511e2c 0x593dd7 0x511e2c 0x593dd7 tcmalloc: large alloc 1361199104 bytes == 0x105b20000 @ 0x7f1d833a21e7 0x7f1d2f40c46e 0x7f1d2f45cc2b 0x7f1d2f45ccc8 0x7f1d2f503e70 0x7f1d2f50459c 0x7f1d2f5046bd 0x4bc4ab 0x7f1d2f449ef7 0x59371f 0x515244 0x549576 0x593fce 0x548ae9 0x5127f1 0x549e0e 0x4bca8a 0x7f1d2f449ef7 0x59371f 0x515244 0x549576 0x593fce 0x548ae9 0x5127f1 0x593dd7 0x511e2c 0x593dd7 0x511e2c 0x593dd7 0x511e2c 0x593dd7 tcmalloc: large alloc 1361199104 bytes == 0x156d44000 @ 0x7f1d833a21e7 0x7f1d2f40c46e 0x7f1d2f45cc2b 0x7f1d2f45ccc8 0x7f1d2f503e70 0x7f1d2f50459c 0x7f1d2f5046bd 0x4bc4ab 0x7f1d2f449ef7 0x59371f 0x515244 0x549576 0x593fce 0x548ae9 0x51566f 0x593dd7 0x511e2c 0x593dd7 0x511e2c 0x593dd7 0x511e2c 0x549576 0x604173 0x5f5506 0x5f8c6c 0x5f9206 0x64faf2 0x64fc4e 0x7f1d82f9fc87 0x5b621a 2022-09-02 04:47:32,297 - INFO - Dataset created 2022-09-02 04:47:32,297 - INFO - x shape: (34249, 12, 207, 2), y shape: (34249, 12, 207, 2) 2022-09-02 04:47:32,303 - INFO - train x: (23974, 12, 207, 2), y: (23974, 12, 207, 2) 2022-09-02 04:47:32,303 - INFO - eval x: (3425, 12, 207, 2), y: (3425, 12, 207, 2) 2022-09-02 04:47:32,303 - INFO - test x: (6850, 12, 207, 2), y: (6850, 12, 207, 2) 2022-09-02 04:48:57,401 - INFO - Saved at ./libcity/cache/dataset_cache/point_based_METR_LA_12_12_0.7_0.1_standard_2_True_True_False_True.npz 2022-09-02 04:48:57,800 - INFO - StandardScaler mean: 54.40592829587626, std: 19.493739270573098 2022-09-02 04:48:57,800 - INFO - NoneScaler tcmalloc: large alloc 1905647616 bytes == 0x7f1c824e8000 @ 0x7f1d833a21e7 0x7f1d2f40c46e 0x7f1d2f45cc2b 0x7f1d2f45ff73 0x7f1d2f5044f4 0x7f1d2f5046bd 0x4bc4ab 0x7f1d2f449ef7 0x59371f 0x515244 0x549576 0x593fce 0x548ae9 0x5127f1 0x549e0e 0x593fce 0x548ae9 0x5127f1 0x593dd7 0x511e2c 0x549576 0x604173 0x5f5506 0x5f8c6c 0x5f9206 0x64faf2 0x64fc4e 0x7f1d82f9fc87 0x5b621a tcmalloc: large alloc 1905647616 bytes == 0x7f1c10b8a000 @ 0x7f1d833a21e7 0x7f1d2f40c46e 0x7f1d2f45cc2b 0x7f1d2f45ccc8 0x7f1d2f503e70 0x7f1d2f50459c 0x7f1d2f5046bd 0x4bc4ab 0x7f1d2f449ef7 0x59371f 0x515244 0x549576 0x593fce 0x548ae9 0x5127f1 0x549e0e 0x593fce 0x548ae9 0x5127f1 0x593dd7 0x511e2c 0x549576 0x604173 0x5f5506 0x5f8c6c 0x5f9206 0x64faf2 0x64fc4e 0x7f1d82f9fc87 0x5b621a Using backend: pytorch 2022-09-02 04:49:03,891 - INFO - You select rnn_type RNN in RNN! 2022-09-02 04:49:07,711 - INFO - Generating grammar tables from /usr/lib/python3.7/lib2to3/Grammar.txt 2022-09-02 04:49:07,730 - INFO - Generating grammar tables from /usr/lib/python3.7/lib2to3/PatternGrammar.txt 2022-09-02 04:49:09,810 - INFO - RNN( (rnn): RNN(414, 64) (fc): Linear(in_features=64, out_features=207, bias=True) ) 2022-09-02 04:49:09,810 - INFO - rnn.weight_ih_l0 torch.Size([64, 414]) cuda:0 True 2022-09-02 04:49:09,811 - INFO - rnn.weight_hh_l0 torch.Size([64, 64]) cuda:0 True 2022-09-02 04:49:09,811 - INFO - rnn.bias_ih_l0 torch.Size([64]) cuda:0 True 2022-09-02 04:49:09,811 - INFO - rnn.bias_hh_l0 torch.Size([64]) cuda:0 True 2022-09-02 04:49:09,811 - INFO - fc.weight torch.Size([207, 64]) cuda:0 True 2022-09-02 04:49:09,811 - INFO - fc.bias torch.Size([207]) cuda:0 True 2022-09-02 04:49:09,811 - INFO - Total parameter numbers: 44175 2022-09-02 04:49:09,811 - INFO - You select adam optimizer. 2022-09-02 04:49:09,811 - INFO - You select multisteplr lr_scheduler. 2022-09-02 04:49:09,812 - WARNING - Received none train loss func and will use the loss func defined in the model. 2022-09-02 04:49:09,831 - INFO - Result shape is torch.Size([2, 12, 207, 1]) 2022-09-02 04:49:09,831 - INFO - Success test the model!

    opened by marunava21 4
  • How to predict a new sample (1 sample) on existing model?

    How to predict a new sample (1 sample) on existing model?

    Hi, thank for your contribution you have made. I wonder if i could use trained model to predict on a new sample ? Can you give me instructions or code demo? ( Now I'm using ACFM model for traffic flow prediction task. )

    opened by TienNguyenKha 15
  • Map Matching error for T-Drive data

    Map Matching error for T-Drive data

    Based from this comment (https://github.com/LibCity/Bigscity-LibCity/issues/292), I used the original T-drive data and converted it to atomic file (but I guess the one in the Google Drive with filename T_DRIVE20150206.zip https://drive.google.com/drive/folders/1g5v2Gq1tkOq8XO0HDCZ9nOTtRpB6-gPe is already in atomic file? so I just downloaded this one for my use for map matching). But I guess when I try doing a map matching task on it using the STMatching, it gives me a value error that the .geo file should include a LineString type? Does the .geo file not include LineStrings? Any kind of resolution I could do so I could be able to map match T-Drive dataset? Thank you.

    Traceback (most recent call last):
      File "/home/gcalix/Bigscity-LibCity/run_model.py", line 36, in <module>
        run_model(task=args.task, model_name=args.model, dataset_name=args.dataset,
      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 21, in get_dataset
        return getattr(importlib.import_module('libcity.data.dataset'),
      File "/home/gcalix/Bigscity-LibCity/libcity/data/dataset/map_matching_dataset.py", line 82, in __init__
        self._load_geo_and_rel()
      File "/home/gcalix/Bigscity-LibCity/libcity/data/dataset/map_matching_dataset.py", line 121, in _load_geo_and_rel
        raise ValueError('.geo file should include LineString type in Map Matching task!')
    ValueError: .geo file should include LineString type in Map Matching task!
    
    opened by techGIAN 8
  • Road Representation [WIP]

    Road Representation [WIP]

    将路网表征任务与最近的 LibCity 进行适应和合并。

    命令行参数加了一个 downstream,表示下游任务。目前支持的下游任务共有两个:自回归(self_regression),标签预测(label_prediction),后续会考虑如何加入对指定模型作为下游任务。

    • [ ] 命令行参数文档更新

    WIP:目前可以跑 ChebConv 的自回归全流程,包括 evaluate。HRNR 的以及标签预测暂时没有写测试。

    • [x] 测试和修改标签预测
    • [ ] 设计能跑指定下游任务的框架
    • [ ] 测试 ChebConv 在不同下游任务的表现
    • [ ] 将其他已有模型(DeepWalk、LINE、Node2vec)等也进行适应
    • [ ] 将 HRNR 以及一些较新的依赖下游任务的路网表征算法进行适应
    opened by PotassiumWings 0
Releases(v0.3)
Responsible Machine Learning with Python

Examples of techniques for training interpretable ML models, explaining ML models, and debugging ML models for accuracy, discrimination, and security.

ph_ 624 Jan 06, 2023
Bayesian optimization based on Gaussian processes (BO-GP) for CFD simulations.

BO-GP Bayesian optimization based on Gaussian processes (BO-GP) for CFD simulations. The BO-GP codes are developed using GPy and GPyOpt. The optimizer

KTH Mechanics 8 Mar 31, 2022
Automated Time Series Forecasting

AutoTS AutoTS is a time series package for Python designed for rapidly deploying high-accuracy forecasts at scale. There are dozens of forecasting mod

Colin Catlin 652 Jan 03, 2023
Predicting job salaries from ads - a Kaggle competition

Predicting job salaries from ads - a Kaggle competition

Zygmunt Zając 57 Oct 23, 2020
Implementations of Machine Learning models, Regularizers, Optimizers and different Cost functions.

Linear Models Implementations of LinearRegression, LassoRegression and RidgeRegression with appropriate Regularizers and Optimizers. Linear Regression

Keivan Ipchi Hagh 1 Nov 22, 2021
Machine-care - A simple python script to take care of simple maintenance tasks

Machine care An simple python script to take care of simple maintenance tasks fo

2 Jul 10, 2022
Nixtla is an open-source time series forecasting library.

Nixtla Nixtla is an open-source time series forecasting library. We are helping data scientists and developers to have access to open source state-of-

Nixtla 401 Jan 08, 2023
AI and Machine Learning with Kubeflow, Amazon EKS, and SageMaker

Data Science on AWS - O'Reilly Book Get the book on Amazon.com Book Outline Quick Start Workshop (4-hours) In this quick start hands-on workshop, you

Data Science on AWS 2.8k Jan 03, 2023
WAGMA-SGD is a decentralized asynchronous SGD for distributed deep learning training based on model averaging.

WAGMA-SGD is a decentralized asynchronous SGD based on wait-avoiding group model averaging. The synchronization is relaxed by making the collectives externally-triggerable, namely, a collective can b

Shigang Li 6 Jun 18, 2022
A repository to work on Machine Learning course. Select an algorithm to classify writer's gender, of Hebrew texts.

MachineLearning A repository to work on Machine Learning course. Select an algorithm to classify writer's gender, of Hebrew texts. Tested algorithms:

Haim Adrian 1 Feb 01, 2022
Vowpal Wabbit is a machine learning system which pushes the frontier of machine learning with techniques

Vowpal Wabbit is a machine learning system which pushes the frontier of machine learning with techniques such as online, hashing, allreduce, reductions, learning2search, active, and interactive learn

Vowpal Wabbit 8.1k Dec 30, 2022
The MLOps is the process of continuous integration and continuous delivery of Machine Learning artifacts as a software product, keeping it inside a loop of Design, Model Development and Operations.

MLOps The MLOps is the process of continuous integration and continuous delivery of Machine Learning artifacts as a software product, keeping it insid

Maykon Schots 25 Nov 27, 2022
Simple and flexible ML workflow engine.

This is a simple and flexible ML workflow engine. It helps to orchestrate events across a set of microservices and create executable flow to handle requests. Engine is designed to be configurable wit

Katana ML 295 Jan 06, 2023
Tutorials, examples, collections, and everything else that falls into the categories: pattern classification, machine learning, and data mining

**Tutorials, examples, collections, and everything else that falls into the categories: pattern classification, machine learning, and data mining.** S

Sebastian Raschka 4k Dec 30, 2022
Penguins species predictor app is used to classify penguins species created using python's scikit-learn, fastapi, numpy and joblib packages.

Penguins Classification App Penguins species predictor app is used to classify penguins species using their island, sex, bill length (mm), bill depth

Siva Prakash 3 Apr 05, 2022
This handbook accompanies the course: Machine Learning with Hung-Yi Lee

This handbook accompanies the course: Machine Learning with Hung-Yi Lee

RenChu Wang 472 Dec 31, 2022
使用数学和计算机知识投机倒把

偷鸡不成项目集锦 坦率地讲,涉及金融市场的好策略如果公开,必然导致使用的人多,最后策略变差。所以这个仓库只收集我目前失败了的案例。 加密货币组合套利 中国体育彩票预测 我赚不上钱的项目,也许可以帮助更有能力的人去赚钱。

Roy 28 Dec 29, 2022
Pragmatic AI Labs 421 Dec 31, 2022
PySurvival is an open source python package for Survival Analysis modeling

PySurvival What is Pysurvival ? PySurvival is an open source python package for Survival Analysis modeling - the modeling concept used to analyze or p

Square 265 Dec 27, 2022
MBTR is a python package for multivariate boosted tree regressors trained in parameter space.

MBTR is a python package for multivariate boosted tree regressors trained in parameter space.

SUPSI-DACD-ISAAC 61 Dec 19, 2022