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

【Hackathon No.87】PaddleSpatial添加路网表征学习模块 #31

Merged
merged 6 commits into from Apr 29, 2022

Conversation

aptx1231
Copy link
Contributor

【Hackathon No.87】PaddleSpatial添加路网表征学习模块

@aptx1231
Copy link
Contributor Author

路网表征任务文档

路网表征

路网表征学习是时空大数据分析中的关键任务之一,主要是学习路网中每个路段的表征向量,是图表征任务之一。

环境配置

主要依赖于paddlepaddle和pgl库开发,主要依赖版本如下:

gensim 4.1.2

numpy 1.19.3

networkx 2.6.3

paddlepaddle-gpu 2.2.2.post112

pandas 1.3.5

pgl 2.2.3.post0

scipy 1.7.3

tqdm 4.64.0

运行方法

进入目录paddlespatial/modelzoo/road_representation

通过运行main.py来运行不同的模型,main.py支持如下的参数(python main.py --help):

usage: main.py [-h] [--task TASK] [--model MODEL] [--dataset DATASET]
               [--gpu GPU] [--config_file CONFIG_FILE]
optional arguments:
  -h, --help            show this help message and exit
  --task TASK           the name of task
  --model MODEL         the name of model in [ChebConv GeomGCN DeepWalk LINE]
  --dataset DATASET     the name of dataset
  --gpu GPU             the name of dataset
  --config_file CONFIG_FILE
                        the file name of config file

模型

  • ChebConv
    • python main.py --model ChebConv
  • GeomGCN
    • python main.py --model GeomGCN
  • DeepWalk
    • python main.py --model DeepWalk
  • LINE
    • python main.py --model LINE

数据

数据是北京市的路网数据集,数据文件位于paddlespatial/modelzoo/road_representation/data/bj_roadmap_edge目录下,共包含3个文件:

  • bj_roadmap_edge.geo
    • 路段及经纬度、路段各种属性等
  • bj_roadmap_edge.rel
    • 路口信息,表达路段之间的邻接关系
  • config.json
    • 配置文件

@mingzhang1998
Copy link
Collaborator

同学的代码质量非常高,文档的环境配置上如果能够更准确一些会更好。
目前同学没有在文档中标注所使用的 Python 版本。我这边在使用 Python 3.7 的时候无法在 numpy==1.19.3 的环境下正常运行代码;需将 numpy 升级至最新版本 1.21.6。并且 pandas 在 Python 3.7 下也没有 1.3.5 这个版本。如果能标注一下具体使用的 Python 版本,会更好的帮助用户配置环境。
另外一个特别小的瑕疵就是你在标注 optional argument 的时候 gpu 的 help message 写错了,可以稍微修改一下:
image

@aptx1231
Copy link
Contributor Author

我更新了文档,补充了更多环境配置、代码结构方面的细节,并加入了requirements.txt文件。

Python是3.7版本的,numpy=1.19.3是安装paddlepaddle-gpu==2.2.2.post112之后自动安装的版本。

环境配置如果还有问题的话,请联系我。

@mingzhang1998 mingzhang1998 merged commit 7583b22 into PaddlePaddle:main Apr 29, 2022
@aptx1231 aptx1231 mentioned this pull request Jul 1, 2022
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

Successfully merging this pull request may close these issues.

None yet

2 participants