如何自动启动AI平台作业?

编程入门 行业动态 更新时间:2024-10-15 02:31:04
本文介绍了如何自动启动AI平台作业?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我创建了一个培训工作,从大查询中获取数据,执行培训并部署模型.我想在这两种情况下自动开始训练:

I created a training job where I fetch my data from big query, perform training and deploy model. I would like to start training automatically in this two cases:

  • 已向数据集中添加了1000多个新行
  • 附有时间表(例如,每周一次)
  • 我检查了GCP Cloud Scheduler,但似乎不适合我的情况.

    I checked GCP Cloud Scheduler, but it seems its not suitable for my case.

    推荐答案

    Cloud Scheduler是触发计划的正确工具.我不知道你的阻拦剂是什么!

    Cloud Scheduler is the right tool to trigger your training on a schedule. I don't know what your blocker is!!

    第一点,你不能.您不能在X个新行之后放置触发器(在BigQuery或其他数据库上)以发送事件.为此,我建议您这样做:

    For your first point, you can't. You can't put a trigger (on BigQuery or on other database) to send an event after X new rows. For this, I recommend you to do this:

    • 使用Cloud Scheduler安排作业(例如,每10分钟安排一次)
    • 该工作在BigQuery中执行请求,并检查自上次培训工作以来的行数(上次培训工作的日期必须在某个地方,我建议在另一个BigQuery表中使用)
      • 如果行数是>1000,触发您的运行作业
      • 否则,退出功能

      如您所见,这并不是那么容易,并且有一些警告:

      As you see, it's not so easy and there is several caveats:

      • 部署模型时,还必须写出最新训练的日期
      • 您必须将请求多次执行到BigQuery中.正确分区您的表以限制成本

      这对您有意义吗?

      编辑

      gcloud命令是一个简单"命令.API调用的包装器.尝试将参数-http-log 添加到您的gcloud命令中,以查看调用了哪个API以及使用了哪些参数.

      gcloud command is a "simple" wrapper of API calls. Try to add the param --http-log to your gcloud command to see which API is called and with which params.

      无论如何,您可以通过致电 API ,如果您想作为示例,请使用gcloud SDK的-http-log 参数!

      Anyway, you can start a job by calling this API, and if you want and example, use the --http-log param of gcloud SDK!

    更多推荐

    如何自动启动AI平台作业?

    本文发布于:2023-11-28 18:19:14,感谢您对本站的认可!
    本文链接:https://www.elefans.com/category/jswz/34/1643455.html
    版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
    本文标签:作业   自动启动   平台   AI

    发布评论

    评论列表 (有 0 条评论)
    草根站长

    >www.elefans.com

    编程频道|电子爱好者 - 技术资讯及电子产品介绍!