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

graph-learn教程上有说小时级别上做模型的增量训练,在graph-learn上是怎么实现的 #221

Open
lvf0052 opened this issue Aug 31, 2022 · 4 comments
Assignees

Comments

@lvf0052
Copy link

lvf0052 commented Aug 31, 2022

1661949873153

如图上第四点所说,GraphLearn-Training hourly loads window of graph data, incremental trains models, and updates model on tensorflow Model service.
graphlearn会在小时级别上进行【增量】的模型训练,然后部署到tensorflow。

  1. dgs通过dataloader进行增量的采样,这个我是有看到的。
  2. 但是我在代码中并未看到graph-learn主动去调用代码,然后【增量】模型训练的流程。
    ====
    是否是我对官网的解读有误,这块【增量】的【训练模型】是需要我们自己去实现。
@Seventeen17
Copy link
Collaborator

GraphLearn-Training部分训练增量训练模型当前是通过离线加载上游的时间窗口中的数据构图,训练新增数据,save/restore ckpt实现的。这要求上游的数据可以按照时间窗口进行分割,如local fs的文件按照天级别划分为小文件。

@Seventeen17 Seventeen17 self-assigned this Aug 31, 2022
@lvf0052
Copy link
Author

lvf0052 commented Aug 31, 2022

@Seventeen17 这么晚还在,辛苦了。
我说一下我的理解。
理解一:

  1. 在动态接入数据,生成最新的采样数据,基于一定的时间窗口会更新一个ckpt,也就是会生成/更新一个检查点
  2. 在训练好一个模型之后,将检查点信息以【某个形式】记录到模型中,比如说model.data-00000-of-00001这样?
  3. 下一次进行加载数据中时间窗口中的数据,例如教程中的这份数据,比如说加载998的数据和999的数据?
    1661951986527
    理解二:
  4. 这个切分数据的事情,需要我们【手动】去做,比如说按天切分。
  5. 然后在训练模型的时候,【指定】这部分切割好的数据,进行训练。
  6. 在训练过程当中,训练的代码会去DGS(动态图)中【采样】自己所需的数据,达到【快速迭代】模型的效果?
    ====
    以上理解不知道哪种是正确的。

@Seventeen17
Copy link
Collaborator

训练部分是用GraphLearn-Training进行离线训练,增量更新模型实现的,加载数据如你【理解二:4.5.】;训练过程采样也是基于GraphLearn-Training中构建的离线图进行。
在我们所了解到的大部分工业场景中,由于在线更新模型的工程难度、模型的准确度保证都比较苦难,一般采用近线更新的模式,比如小时/天级别的迭代更新。
在线推理使用小时/天级别更新的模型,结合DGS在线采样,得到实时的图结构和特征,进行推理。

@alibaba alibaba deleted a comment from Seventeen17 Sep 21, 2022
@lvf0052
Copy link
Author

lvf0052 commented Sep 29, 2022

@Seventeen17 谢谢你的回答。
也就是说推理是有一定的容忍度的。
在新的模型没有完全训练好的情况下,这个时候DGS采样的数据,进行推理不一定是完全准确的。

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

2 participants