GitHub Actions: データサイエンティストに新たな超能力を提供
GitHub Actionsがデータサイエンティストのワークフローを自動化し、生産性を向上させる新機能を提供しています。
キーポイント
GitHub Actionsが機械学習・データサイエンスワークフローに新たな自動化機能を提供
fastpagesプロジェクトによるJupyterノートブックからの自動ブログ生成が実現
プルリクエスト内での機械学習モデルテストと結果レポート作成が可能に
Hugging Face CTOによるGPU上でのCI/CD実装事例が紹介
GitHubイベントに応じた任意コード実行によるワークフロー自動化の仕組み
影響分析・編集コメントを表示
影響分析
GitHub Actionsのデータサイエンス応用は、MLワークフローの自動化と再現性向上に大きく貢献する。特にJupyterノートブックの自動公開やGPU環境でのモデルテスト自動化は、研究開発の効率化とコラボレーション促進に重要な進展をもたらす。
編集コメント
GitHub Actionsが単なるCIツールを超えて、データサイエンティストの日常業務を変革するプラットフォームとして進化している点が注目。
GitHub Actions:データサイエンティストに新たな超能力を提供する
GitHubの機械学習エンジニアであるHamel Husainは、GitHubがリリースした新製品「GitHub Actions」が、機械学習およびデータサイエンスコミュニティでは単なる継続的インテグレーションツールとして見過ごされがちであると指摘する。しかし、このツールはデータサイエンティストに新たな「超能力」をもたらす可能性を秘めている。彼は、Actionsを用いて構築した二つのプロジェクトを通じてその可能性を示している。
第一のプロジェクトは「fastpages」である。これは自動化されたオープンソースのブログプラットフォームで、Jupyterノートブックの強化されたサポートが特徴だ。ユーザーはノートブック、マークダウン、Word文書をGitHubのディレクトリに保存するだけで、それらが自動的にブログ投稿へと変換される。セットアップは自動化されており、追加のインストールも不要で、無料かつ広告なしでブログを運営できる。
第二は、機械学習モデルのテストを革新するワークフローである。GitHub上でネイティブにチャットボットを起動し、選択したインフラ(GPUなど)でモデルをテストし、全ての結果を記録し、プルリクエスト内に詳細なレポートを提供することが可能になる。これにより、結果がチーム全体で可視化され、協働が促進される。
GitHub Actionsの本質は、イベントに応じて任意のコードを実行できる点にある。イベントとは、プルリクエストの作成、イシューのオープン、プッシュなど、GitHub上で発生するあらゆる活動を指す。各イベントが発生すると、そのメタデータを含むペイロードがActionsコンテキストに渡され、これに基づいた自動応答をプログラムできる。例えば、新規イシュー作成時のペイロードには、タイトル、ラベル、本文などの情報が含まれており、これを利用して自動化されたタスクをトリガーできる。
この技術の有用性は業界でも認識され始めている。Hugging FaceのCTO、Julien Chaumondは、自社インフラのGPU上でCIを実行できる点を高く評価している。さらに、Actionsの大きな利点は、構築したワークフローの一部を「アクション」としてパッケージ化し、他のユーザーが再利用できるように共有できることである。これにより、優れた機械学習プラクティスのコミュニティ全体への普及が加速する。
要するに、GitHub Actionsは、単なるCIツールを超え、データサイエンティストのワークフローを自動化し、協働を強化し、複雑な計算リソースへのアクセスを簡素化する強力なプラットフォームである。ブログ投稿の自動生成から大規模なモデル検証まで、その応用範囲は広く、データサイエンスの実践に新たな可能性をもたらす「超能力」としての役割が期待される。
原文を表示
A Gentle Introduction To GitHub Actions What Are GitHub Actions?
Example: A fastpages Action Workflow Part 1: Define Workflow Triggers
Conclusion Related Materials Getting In Touch Footnotes
Hi, I’m Hamel Husain. I’m a machine learning engineer at GitHub. Recently, GitHub released a new product called GitHub Actions, which has mostly flown under the radar in the machine learning and data science community as just another continuous integration tool.
Recently, I’ve been able to use GitHub Actions to build some very unique tools for Data Scientists, which I want to share with you today. Most importantly, I hope to get you excited about GitHub Actions, and the promise it has for giving you new superpowers as a Data Scientist. Here are two projects I recently built with Actions that show off its potential:
fastpages is an automated, open-source blogging platform with enhanced support for Jupyter notebooks. You save your notebooks, markdown, or Word docs into a directory on GitHub, and they automatically become blog posts. Read the announcement below:
We're launching fastpages, a platform which allows you to host a blog for free, with no ads. You can blog with @ProjectJupyter notebooks, @office Word, directly from @github's markdown editor, etc.Nothing to install, & setup is automated!https://t.co/dNSA0oQUrN
Wouldn’t it be cool if you could invoke a chatbot natively on GitHub to test your machine learning models on the infrastructure of your choice (GPUs), log all the results, and give you a rich report back in a pull request so that everyone could see the results? You can with GitHub Actions!
Consider the below annotated screenshot of this Pull Request:
A more in-depth explanation about the above project can be viewed in this video:
Using GitHub Actions for machine learning workflows is starting to catch on. Julien Chaumond, CTO of Hugging Face, says:
GitHub Actions are great because they let us do CI on GPUs (as most of our users use the library on GPUs not on CPUs), on our own infra! 1
Additionally, you can host a GitHub Action for other people so others can use parts of your workflow without having to re-create your steps. I provide examples of this below.
A Gentle Introduction To GitHub Actions
GitHub Actions allow you to run arbitrary code in response to events. Events are activities that happen on GitHub such as:
When an event is created, the GitHub Actions context is hydrated with a payload containing metadata for that event. Below is an example of a payload that is received when an issue is created:
{ "action": "created", "issue": { "id": 444500041, "number": 1, "title": "Spelling error in the README file", "user": { "login": "Codertocat", "type": "User", }, "labels": [ { "id": 1362934389, "node_id": "MDU6TGFiZWwxMzYyOTM0Mzg5", "name": "bug", } ], "body": "It looks like you accidently spelled 'commit' with two 't's." } This functionality allows you to respond to various events on GitHub in an automated way. In addition to this payload, GitHub Actions also provide a plethora of variables and environment variables that afford easy to access metadata such as the username and the owner of the repo. Additionally, other people can package useful functionality into an Action that other people can inherit. For example, consider the below Action that helps you publish python packages to PyPi:
The Usage section describes how this Action can be used:
- name: Publish a Python distribution to PyPI uses: pypa/gh-action-pypi-publish@master with: user: __token__ password: ${{ secrets.pypi_password }} This Action expects two inputs: user and a password. You will notice that the password is referencing a variable called secrets, which is a variable that contains an encrypted secret that you can upload to your GitHub repository. There are thousands of Actions (that are free) for a wide variety of tasks that can be discovered on the GitHub Marketplace. The ability to inherit ready-made Actions in your workflow allows you to accomplish complex tasks without implementing all of the logic yourself. Some useful Actions for those getting started are:
actions/checkout: Allows you to quickly clone the contents of your repository into your environment, which you often want to do. This does a number of other things such as automatically mount your repository’s files into downstream Docker containers.
mxschmitt/action-tmate: Proivdes a way to debug Actions interactively. This uses port forwarding to give you a terminal in the browser that is connected to your Actions runner. Be careful not to expose sensitive information if you use this.
actions/github-script: Gives you a pre-authenticated ocotokit.js client that allows you to interact with the GitHub API to accomplish almost any task on GitHub automatically. Only these endpoints are supported (for example, the secrets endpoint is not in that list).
In addition to the aforementioned Actions, it is helpful to go peruse the official GitHub Actions docs before d
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み