<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Project-Management | Democratizing Data</title><link>https://b94feae1.chezo-uno.pages.dev/tags/project-management/</link><atom:link href="https://b94feae1.chezo-uno.pages.dev/tags/project-management/index.xml" rel="self" type="application/rss+xml"/><description>Project-Management</description><generator>Hugo Blox Builder (https://hugoblox.com)</generator><language>en-us</language><copyright>© Aki Ariga 2017-2025</copyright><lastBuildDate>Fri, 02 May 2025 15:49:17 -0700</lastBuildDate><image><url>https://b94feae1.chezo-uno.pages.dev/media/icon_hu_9ca82a90e0d162db.png</url><title>Project-Management</title><link>https://b94feae1.chezo-uno.pages.dev/tags/project-management/</link></image><item><title>Machine Learning Project and Scrum</title><link>https://b94feae1.chezo-uno.pages.dev/blog/2025-05-02-ml-project-and-scrum/</link><pubDate>Fri, 02 May 2025 15:49:17 -0700</pubDate><guid>https://b94feae1.chezo-uno.pages.dev/blog/2025-05-02-ml-project-and-scrum/</guid><description>&lt;p>I&amp;rsquo;ve worked on several machine learning projects, and intuitively, I&amp;rsquo;ve felt that Scrum doesn&amp;rsquo;t seem well-suited for machine learning. However, during an internal discussion, a colleague said, &amp;ldquo;If we use Technical Stories, we should be able to break down tasks to fit within two weeks for any tasks. And if we do that, we should be able to deliver value in two weeks for ML products.&amp;rdquo; I couldn&amp;rsquo;t properly counter this, so I&amp;rsquo;m writing this article to articulate my thoughts, including how others in the world are approaching this.&lt;/p>
&lt;h2 id="disclaimer">Disclaimer&lt;/h2>
&lt;p>I have extensive experience in ML but is not particularly knowledgeable about Scrum, having only participated in a few projects as a development member.&lt;/p>
&lt;h2 id="research-method">Research Method&lt;/h2>
&lt;ul>
&lt;li>Brainstorming with Gemini 2.5 Pro (experimental)
&lt;ul>
&lt;li>&lt;a href="https://gemini.google.com/share/e761866427d0" target="_blank" rel="noopener">Chat Log (Japanese)&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Investigating experiences mainly on Reddit&lt;/li>
&lt;/ul>
&lt;h2 id="anticipated-challenges">Anticipated Challenges&lt;/h2>
&lt;p>Iterative development invariably occurs in ML projects. This is especially true because exploratory phases (EDA and model development) are always involved, and these phases generally involve rework.&lt;/p>
&lt;p>I&amp;rsquo;ve always felt a strong incompatibility between these high-probability rework for ML tasks and the &amp;ldquo;deliver customer value in two weeks&amp;rdquo; sprint.&lt;/p>
&lt;h2 id="using-technical-stories">Using Technical Stories&lt;/h2>
&lt;p>What exactly are Technical Stories? I looked into it, and the example at the beginning of the following article resonated with me.&lt;/p>
&lt;p>&lt;a href="https://lizkeogh.com/2008/09/10/feature-injection-and-handling-technical-stories/" target="_blank" rel="noopener">Feature Injection and handling technical stories&lt;/a>&lt;/p>
&lt;blockquote>
&lt;p>As a developer,
I want an automated build
So that I can be sure my code works.&lt;/p>&lt;/blockquote>
&lt;p>I&amp;rsquo;ve actually seen stories like this here and there.&lt;/p>
&lt;p>However, the article above, when considering where the business benefit (which I understand to be synonymous with customer value) lies, argues for the following template to ensure business value and incorporate features:&lt;/p>
&lt;blockquote>
&lt;p>In order to &lt;deliver some business benefit>
&lt;these people>
will need &lt;these features>.&lt;/p>&lt;/blockquote>
&lt;p>Further refining this leads to:&lt;/p>
&lt;blockquote>
&lt;p>In order to &lt;deliver some business benefit>
As a &lt;role> I want &lt;some other role>
to &amp;lt;do something, or use or be restricted by some feature&amp;gt;.&lt;/p>&lt;/blockquote>
&lt;blockquote>
&lt;p>In order to stop bots from spamming the site
As a member of the commercial team, I want users
to fill in a captcha box.&lt;/p>&lt;/blockquote>
&lt;p>Happy ending? Really?&lt;/p>
&lt;h2 id="business-value-in-ml-projects">Business Value in ML Projects&lt;/h2>
&lt;p>The business value in ML projects and ML products remains providing something that positively impacts customers.&lt;/p>
&lt;p>Achieving a model with good accuracy doesn&amp;rsquo;t immediately deliver customer value; it&amp;rsquo;s only when the prediction results can be served in the actual production environment that value is delivered to the customer. Alternatively, it might involve summarizing analysis results based on predictions and presenting actionable proposals in a report.&lt;/p>
&lt;p>Conversely, I find it quite difficult to deliver such customer value with tickets spanning a few days to two weeks. Often, when a model is being developed, the deployment environment might not even exist yet.&lt;/p>
&lt;p>One direction, as Gemini suggests, is to consider &amp;ldquo;risk reduction and uncertainty reduction as sprint goals.&amp;rdquo; While not direct customer value, there is certainly business value. Gaining insights like &amp;ldquo;this feature seems effective for prediction&amp;rdquo; or &amp;ldquo;this algorithm was unsuitable for this problem&amp;rdquo; is valuable in itself. That sounds reasonable.&lt;/p>
&lt;p>However, by reading &lt;a href="https://edwinth.github.io/ADSwR/index.html" target="_blank" rel="noopener">Agile Data Science with R&lt;/a>, I got a hint for the question of &amp;ldquo;Why it&amp;rsquo;s difficult to fit ML tasks into two weeks?&amp;rdquo;.&lt;/p>
&lt;h2 id="differences-in-task-level-development-flow">Differences in Task-Level Development Flow&lt;/h2>
&lt;p>&lt;a href="https://edwinth.github.io/ADSwR/a-methodology-for-agile-data-science.html#linear-and-circular-tasks" target="_blank" rel="noopener">5.1 Linear and Circular Tasks&lt;/a> compares the task progression in typical software development versus ML development based on the following diagrams.&lt;/p>
&lt;p>It states that while task progression is linear at the task level in traditional software development, tasks in ML projects are often cyclical. (The following diagrams are both quoted from &lt;a href="https://edwinth.github.io/ADSwR/index.html" target="_blank" rel="noopener">Agile Data Science with R&lt;/a>)&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img src="./software_flow.png" alt="Linear flow in software development" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>Linear tasks in traditional software development are also said to be &amp;ldquo;completion-oriented&amp;rdquo; tasks, where the goal is simply to complete the project.&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img src="./ml_flow.png" alt="Circular flow in machine learning" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>Of course, ML projects also have linear tasks similar to traditional software development, such as data ingestion pipelines, basic preprocessing, developing demo applications with &lt;a href="https://streamlit.io/" target="_blank" rel="noopener">streamlit&lt;/a>, and developing prediction APIs.&lt;/p>
&lt;p>On the other hand, exploratory and experimental tasks are cyclical processes that involve repeating data understanding, hypothesis formulation, and verification. What&amp;rsquo;s difficult is that within a two-week sprint, there&amp;rsquo;s no guarantee of improved prediction accuracy, so nothing can be committed.&lt;/p>
&lt;h2 id="how-to-implement-scrum-in-ml-projects">How to Implement Scrum in ML Projects&lt;/h2>
&lt;p>So, what should we do? Even so, some might be thinking, &amp;ldquo;Top-down, we&amp;rsquo;ve been told to do two-week sprints, so how do we implement it?&amp;rdquo;&lt;/p>
&lt;p>Looking at several discussions on Reddit, I found the following two approaches:&lt;/p>
&lt;h3 id="1-stop-using-scrum-and-use-kanban">1. Stop Using Scrum and Use Kanban&lt;/h3>
&lt;p>This might sound blunt, but adopting Scrum as the workflow isn&amp;rsquo;t mandatory for agile development.&lt;/p>
&lt;p>&amp;ldquo;Agile Data Science with R&amp;rdquo; points this out in &lt;a href="https://edwinth.github.io/ADSwR/agile-methods.html#scrum-vs-kanban" target="_blank" rel="noopener">3.3 Scrum vs Kanban&lt;/a>:&lt;/p>
&lt;blockquote>
&lt;p>Both methodologies are applied with great success and it’s important to keep in mind that they are a means to an end, not religions. The Agile values and principles should be the primary guideline and when selecting one of the workflows you do so because it is the best way to work in an Agile way because its the best fit for the given situation.&lt;/p>&lt;/blockquote>
&lt;p>The point is that Scrum or Kanban isn&amp;rsquo;t a matter of religions; what&amp;rsquo;s important is for the team to choose the best option to achieve their goals and to monitor whether it remains the best fit.&lt;/p>
&lt;p>The author&amp;rsquo;s company initially adopted Scrum due to the many experienced Scrum practitioners, but it didn&amp;rsquo;t work well for model development, and they eventually moved to Kanban (&lt;a href="https://edwinth.github.io/ADSwR/case-study-building-the-valuecheck.html#moving-to-kanban" target="_blank" rel="noopener">12.3 Moving to Kanban&lt;/a>).&lt;/p>
&lt;p>The reasons cited include that Scrum is too rigid and lacks flexibility for exploratory and experimental phases. Also, as mentioned earlier, it&amp;rsquo;s impossible to commit to model prediction performance improvements without seeing the data. Therefore, there&amp;rsquo;s a suggestion that time boxing is better than using story points.&lt;/p>
&lt;blockquote>
&lt;p>Scoping for data science is then not just estimating how long a task will take to complete, it is also time boxing. If used in this way, the scoping should be done in time units, not in a subjective measure such as story points. The data scientist should not take longer for the task than the team agreed upfront, wrapping up even when he does not feel completely finished.&lt;/p>&lt;/blockquote>
&lt;p>Since Data Scientists tend to continue experimenting until they are satisfied, setting time limits rather than strict completion criteria is more rational in the research phase.&lt;/p>
&lt;p>In practice, they seem to have adopted a Kanban board with the following six lanes. However, for some tasks, they ended up stopping after confirming that the model accuracy didn&amp;rsquo;t improve during the hypothesis testing phase.&lt;/p>
&lt;ul>
&lt;li>to do&lt;/li>
&lt;li>test hypothesis&lt;/li>
&lt;li>code review hypothesis&lt;/li>
&lt;li>update model&lt;/li>
&lt;li>code review update model&lt;/li>
&lt;li>done&lt;/li>
&lt;/ul>
&lt;p>A very similar point (use Kanban, do time boxing) can be found on &lt;a href="https://www.reddit.com/r/MachineLearning/comments/eqzdup/comment/ff07qkm/" target="_blank" rel="noopener">Reddit&lt;/a>.&lt;/p>
&lt;blockquote>
&lt;p>Don’t confuse agility with solely scrum and its sprints, which are the root of the problem and work poorly in research mode.&lt;/p>&lt;/blockquote>
&lt;p>This specific example is easy to understand:&lt;/p>
&lt;blockquote>
&lt;p>Example: build a PoC in a week. If AUC exceeds X then it’s promising and let’s spend another 3 months on further extensions (data, features, architecture, hyperopt) and putting all into production. If there was no AUC gain on the last week, we do not extend any further. Inside this 3 month time box - execute pure Kanban, task by task, which allows you to take different paths as needed (agility), not waiting till your sprint finishes in 3 days. You already know your new feature is poorly designed and you need to start on tweaking it right now.&lt;/p>&lt;/blockquote>
&lt;p>In other words, time-box, test hypotheses within that time, and if successful, decide to continue further extensions.&lt;/p>
&lt;p>Another key point the author of &amp;ldquo;Agile Data Science with R&amp;rdquo; proposes is to quickly create an MVM (Minimum Viable Model) instead of an MVP. For example, initially deploy a simple model like linear regression to a limited set of users as an MVM, then add features, and finally deploy a more complex model (Random Forest is mentioned in the text, but now a NN-based approach might also be considered).&lt;/p>
&lt;p>This connects with the idea of time-boxing mentioned earlier. Using an MVM as a hook is a good idea as part of an effort to prune the numerous options and find a high-probability path.&lt;/p>
&lt;h3 id="2-use-hypothesis-based-stories-modifying-scrum">2. Use Hypothesis Based Stories (Modifying Scrum)&lt;/h3>
&lt;p>Another &lt;a href="https://www.reddit.com/r/datascience/comments/wwi7cs/comment/illoety/" target="_blank" rel="noopener">Reddit thread&lt;/a> discussed an approach that mixes Scrum and Kanban. They use Scrum for long-term projects and time boxing for research tasks.&lt;/p>
&lt;p>Specifically, they seem to have made the following changes to Scrum:&lt;/p>
&lt;ul>
&lt;li>hypothesis based stories (instead of user based)&lt;/li>
&lt;li>foregoe stand ups, people keep their tickets as research logs and @ people when they need help. - Product owner can read the tickets if they want to know where we are&lt;/li>
&lt;li>monthly retro rather than per scrum, wider focus&lt;/li>
&lt;li>tickets largely written by the data scientists then priorities by product owner&lt;/li>
&lt;/ul>
&lt;p>Skip stand-ups and have people keep research logs in their tickets, mentioning others in the tickets when they need help. The Product Owner can proactively check the tickets for updates. Data scientists largely write the tickets, and the Product Owner prioritizes them. The goal is to allow DS/MLE to focus on their work.&lt;/p>
&lt;p>Hypothesis Based Stories are particularly unique. If we recall the discussion about business value in Technical Stories, the business value in the hypothesis testing phase of ML can only be described as &amp;ldquo;reducing risk and uncertainty.&amp;rdquo; Also, by making &amp;ldquo;formulating and testing a hypothesis&amp;rdquo; the goal of a ticket, it creates an awareness of the need to formulate proper hypotheses, and the outcome can be closed as &amp;ldquo;hypothesis was correct/incorrect.&amp;rdquo;&lt;/p>
&lt;blockquote>
&lt;p>The point is that the exit criteria is provable and the delivery is typically the proof. Likewise, disapproving the hypothesis is still a success, we learned something.&lt;/p>&lt;/blockquote>
&lt;p>Here are some examples of such stories:&lt;/p>
&lt;blockquote>
&lt;p>“We believe a fine tuned distilbert architectures will allow us to identify cases with a precision of greater than .95 and a recall of greater than .7.”&lt;/p>&lt;/blockquote>
&lt;blockquote>
&lt;p>“We believe it should be possible to transform a given article within our dataset to our standardised form without additional datasets or augmentation”&lt;/p>&lt;/blockquote>
&lt;blockquote>
&lt;p>“We believe x metric can best be explained to stakeholders using a combination of shap values and distribution charts”&lt;/p>&lt;/blockquote>
&lt;h2 id="aside-what-does-a-product-owner-do-in-ml-projects">Aside: What Does a Product Owner Do in ML Projects?&lt;/h2>
&lt;p>As an aside, there&amp;rsquo;s a detailed chapter on what a Product Owner does if they don&amp;rsquo;t create tickets (&lt;a href="https://edwinth.github.io/ADSwR/a-methodology-for-agile-data-science.html#the-product-owner-role" target="_blank" rel="noopener">5.6 The Product Owner Role&lt;/a>).&lt;/p>
&lt;p>In summary:&lt;/p>
&lt;ul>
&lt;li>Takes on all communication with stakeholders, allowing DS/MLE to focus on tasks.&lt;/li>
&lt;li>Helps discuss and organize the tasks created by DS/MLE through scoping.&lt;/li>
&lt;li>Prioritizes the tasks created by DS/MLE.&lt;/li>
&lt;li>Points out business concerns that DS/MLE might not be aware of.&lt;/li>
&lt;/ul>
&lt;p>Reading this, I feel like the time of DS/MLE is considered more valuable than that of SWE.&lt;/p>
&lt;h2 id="conclusion">Conclusion&lt;/h2>
&lt;p>After a quick investigation, I&amp;rsquo;ve reached the following conclusions:&lt;/p>
&lt;ul>
&lt;li>Strict Scrum is not suitable for ML projects.&lt;/li>
&lt;li>If possible, separate workflows for research/exploration phases and development phases.&lt;/li>
&lt;li>In the research/exploration phase, use time limits instead of story points.&lt;/li>
&lt;li>In the research/exploration phase, proceed based on hypothesis testing (write Hypothesis Based Stories, use Kanban).&lt;/li>
&lt;/ul>
&lt;p>The idea of time boxing and progressing research tasks centered around hypothesis testing, while common sense in ML projects, is a very powerful support.&lt;/p>
&lt;p>So, in response to the initial statement, &amp;ldquo;If we use Technical Stories, we should be able to break down tasks to fit within two weeks. And if we do that, we should be able to deliver value in two weeks,&amp;rdquo; my reply would be:&lt;/p>
&lt;ul>
&lt;li>Understand business value as &amp;ldquo;reducing uncertainty.&amp;rdquo;&lt;/li>
&lt;li>Use Hypothesis Based Stories instead of Technical Stories, or Kanban.&lt;/li>
&lt;li>Instead of setting concrete goals within a two-week timeframe, quickly iterate through possibilities by setting time limits.&lt;/li>
&lt;/ul></description></item><item><title>機械学習プロジェクトとスクラム</title><link>https://b94feae1.chezo-uno.pages.dev/post/2025-05-02-ml-project-and-scrum/</link><pubDate>Fri, 02 May 2025 13:43:50 -0700</pubDate><guid>https://b94feae1.chezo-uno.pages.dev/post/2025-05-02-ml-project-and-scrum/</guid><description>&lt;p>機械学習プロジェクトをいくつかこなしてきたが、直感的にはスクラムが機械学習に向いていなさそうというのを思っていた。が、社内で議論をしたときに「Technical Storyを使えばタスクを2週間に収まるように分割できるはず。そして、それをすれば2週間で価値がでるはず」と言われて、ちゃんと反論ができなかったので世の中ではどういう取り組みがあるのかも含めて、言語化するためにこの記事を書いている。&lt;/p>
&lt;h2 id="disclaimer">disclaimer&lt;/h2>
&lt;p>著者はMLの経験は長いが、別にスクラムに詳しいわけではなく、開発メンバーとしていくつかのプロジェクトに参加したことがある程度である。&lt;/p>
&lt;h2 id="調査方法">調査方法&lt;/h2>
&lt;ul>
&lt;li>Gemini 2.5 Pro (experimental)とブレスト
&lt;ul>
&lt;li>&lt;a href="https://gemini.google.com/share/e761866427d0" target="_blank" rel="noopener">チャットログ&lt;/a>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>Redditを中心に体験談を調査&lt;/li>
&lt;/ul>
&lt;h2 id="想定していた課題">想定していた課題&lt;/h2>
&lt;p>MLプロジェクトでは、iterativeな開発が必ず発生する。これは特に途中で探索的なフェーズ（EDAやモデル開発）が必ず挟まり、総じてそれらのフェーズは手戻りが発生する。&lt;/p>
&lt;p>こうした手戻りが高確率で発生するのに対して、「2週間で顧客価値を出す」sprintとの相性はすこぶる悪いと思っていた。&lt;/p>
&lt;h2 id="technical-storyを使う">Technical Storyを使う&lt;/h2>
&lt;p>Technical Storyとはなんぞや。色々と調べてみたけれど、この記事の冒頭の例がしっくりくる。&lt;/p>
&lt;p>&lt;a href="https://lizkeogh.com/2008/09/10/feature-injection-and-handling-technical-stories/" target="_blank" rel="noopener">Feature Injection and handling technical stories&lt;/a>&lt;/p>
&lt;blockquote>
&lt;p>As a developer,
I want an automated build
So that I can be sure my code works.&lt;/p>&lt;/blockquote>
&lt;p>実際にこういうstoryをちらほら見かける。&lt;/p>
&lt;p>なのだけど、上記の記事ではビジネス価値（business benefit, 顧客価値と同義だと認識している）はどこにあるのか？ということを考えたときに、以下のようなテンプレートに落とし込んでビジネス価値を確保し、またfeatureを埋め込めばよい、という主張である。&lt;/p>
&lt;blockquote>
&lt;p>In order to &lt;deliver some business benefit>
&lt;these people>
will need &lt;these features>.&lt;/p>&lt;/blockquote>
&lt;p>これを経由して、さらにブラッシュアップするとこうなる。&lt;/p>
&lt;blockquote>
&lt;p>In order to &lt;deliver some business benefit>
As a &lt;role> I want &lt;some other role>
to &amp;lt;do something, or use or be restricted by some feature&amp;gt;.&lt;/p>&lt;/blockquote>
&lt;blockquote>
&lt;p>In order to stop bots from spamming the site
As a member of the commercial team, I want users
to fill in a captcha box.&lt;/p>&lt;/blockquote>
&lt;p>めでたしめでたし。本当に？&lt;/p>
&lt;h2 id="mlプロジェクトにおけるビジネス価値">MLプロジェクトにおけるビジネス価値&lt;/h2>
&lt;p>MLプロジェクト、およびMLプロダクトにおけるビジネス価値は、顧客に何かしらの良い影響を与える何かを提供することであることには変わりない。&lt;/p>
&lt;p>何か良い精度のモデルが学習できたら、即時顧客価値が提供されるわけではなく、実際の本番環境に予測結果をサービングできるようにして、初めて顧客に価値を届けることができる。あるいは、予測結果をもとにした分析結果をまとめて、アクショナブルな提案をレポートにまとめてプレゼンすることかもしれない。&lt;/p>
&lt;p>翻って、こうした顧客価値を数日～2週間のチケットで提供できるか？というと結構難しいと思っている。往々にして、モデルを開発しているタイミングでは、デプロイ先がなかったりすることもある。&lt;/p>
&lt;p>一つの方向性としては、Geminiが言うように「リスク削減や不確実性の低減をsprintゴールとする」という発想である。直接的な顧客価値ではないが、ビジネス価値はたしかにある。「この特徴量が予測に効きそうだ」とか「このアルゴリズムはこの問題には不適当だった」などの知見を得られただけでも価値はある。そう考えるのである。&lt;/p>
&lt;p>しかし、なぜ2週間にフィットさせるのが難しいのか？こうした疑問にヒントを与えてくれたのが、&lt;a href="https://edwinth.github.io/ADSwR/index.html" target="_blank" rel="noopener">Agile Data Science with R&lt;/a>だった。&lt;/p>
&lt;h2 id="タスクレベルの開発フローの違い">タスクレベルの開発フローの違い&lt;/h2>
&lt;p>&lt;a href="https://edwinth.github.io/ADSwR/a-methodology-for-agile-data-science.html#linear-and-circular-tasks" target="_blank" rel="noopener">5.1 Linear and Circular Tasks&lt;/a>では、以下のような図をもとに、典型的なソフトウェア開発と、MLでの開発のタスクの進み方を比較している。&lt;/p>
&lt;p>曰く、従来型のソフトウェア開発では、タスクレベルで見れば、タスクの進行が直線的であるのに対し、MLプロジェクトではタスクが循環的であることが多い。（以下の図はともに&lt;a href="https://edwinth.github.io/ADSwR/index.html" target="_blank" rel="noopener">Agile Data Science with R&lt;/a>から引用）&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img src="./software_flow.png" alt="Linear flow in software development" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>従来型のソフトウェア開発での直線的なタスクは、言い換えるとプロジェクトを完了させればよい「完了型」のタスクだとも言われている。&lt;/p>
&lt;p>
&lt;figure >
&lt;div class="flex justify-center ">
&lt;div class="w-100" >&lt;img src="./ml_flow.png" alt="Circular flow in machine learning" loading="lazy" data-zoomable />&lt;/div>
&lt;/div>&lt;/figure>
&lt;/p>
&lt;p>もちろん、MLプロジェクトでも従来型のソフトウェア開発のような直線的なタスクもある。例えば、データインジェスチョンパイプラインや基本的な前処理、デモ用の&lt;a href="https://streamlit.io/" target="_blank" rel="noopener">streamlit&lt;/a>でのアプリ開発、予測用のAPI開発などである。&lt;/p>
&lt;p>一方で、探索的・実験的なタスクは、データ理解・仮説立案・検証という作業を繰り返す循環型のプロセスである。何が難しいのか。2週間のsprintの中で、予測精度が向上する保証はないので何もコミットができないのである。&lt;/p>
&lt;h2 id="mlプロジェクトでのスクラムを実践する方法">MLプロジェクトでのスクラムを実践する方法&lt;/h2>
&lt;p>ではどうするのか？そうは言ってもトップダウンで2 week sprintが降りてきたから、どのように実践していくかを考える必要がある、という方もいるかもしれない。&lt;/p>
&lt;p>Redditでの議論をいくつか眺めていると、以下の2つのアプローチがあった。&lt;/p>
&lt;h3 id="1-スクラムをやめてkanbanを使う">1. スクラムをやめてKanbanを使う&lt;/h3>
&lt;p>いきなり身もふたもない話であるが、agileな開発をするのに何もスクラムをworkflowとして採用するのが必須ではない。&lt;/p>
&lt;p>Agile Data Science with Rでも&lt;a href="https://edwinth.github.io/ADSwR/agile-methods.html#scrum-vs-kanban" target="_blank" rel="noopener">3.3 Scrum vs Kanban&lt;/a>でこういった指摘がされている。&lt;/p>
&lt;blockquote>
&lt;p>Both methodologies are applied with great success and it’s important to keep in mind that they are a means to an end, not religions. The Agile values and principles should be the primary guideline and when selecting one of the workflows you do so because it is the best way to work in an Agile way because its the best fit for the given situation.&lt;/p>&lt;/blockquote>
&lt;p>ScrumかKanbanかは信仰ではなく、目的を達成するためにチームが最適なもの選び、それが最適かをモニターするのが大事、という指摘である。&lt;/p>
&lt;p>著者の会社では、スクラム経験豊富な人も多かったため当初スクラム採用したが、モデル開発でうまくいかなくなり、結局Kanbanに移行したという話がある(&lt;a href="https://edwinth.github.io/ADSwR/case-study-building-the-valuecheck.html#moving-to-kanban" target="_blank" rel="noopener">12.3 Moving to Kanban&lt;/a>)。&lt;/p>
&lt;p>理由としては、スクラムは厳格すぎて探索的・実験的フェーズでは柔軟性が低いことがあげられている。またデータも見ないで性能向上にコミットもできないのは先述した通り。そのため、story pointをつけるよりtime boxingの方ががいいという指摘がある。&lt;/p>
&lt;blockquote>
&lt;p>Scoping for data science is then not just estimating how long a task will take to complete, it is also time boxing. If used in this way, the scoping should be done in time units, not in a subjective measure such as story points. The data scientist should not take longer for the task than the team agreed upfront, wrapping up even when he does not feel completely finished.&lt;/p>&lt;/blockquote>
&lt;p>DSは納得いくまで実験をし続ける傾向にあるので、終了条件を厳密に決めるより、時間で区切った方が良いというのは研究フェーズでは合理的である。&lt;/p>
&lt;p>実際には、以下のような6つのレーンを持つKanbanを採用したようである。ただし、いくつかのタスクでは仮説検証段階でモデルの精度が上がらないことを確認して終了することもあったそうだ。&lt;/p>
&lt;ul>
&lt;li>to do&lt;/li>
&lt;li>test hypothesis&lt;/li>
&lt;li>code review hypothesis&lt;/li>
&lt;li>update model&lt;/li>
&lt;li>code review update model&lt;/li>
&lt;li>done&lt;/li>
&lt;/ul>
&lt;p>まったく同様の指摘（Kanbanを使え、time boxingをしろ）は&lt;a href="https://www.reddit.com/r/MachineLearning/comments/eqzdup/comment/ff07qkm/" target="_blank" rel="noopener">Redditでも見られる&lt;/a>。&lt;/p>
&lt;blockquote>
&lt;p>Don’t confuse agility with solely scrum and its sprints, which are the root of the problem and work poorly in research mode.&lt;/p>&lt;/blockquote>
&lt;p>この具体例なんかはわかりやすい。&lt;/p>
&lt;blockquote>
&lt;p>Example: build a PoC in a week. If AUC exceeds X then it’s promising and let’s spend another 3 months on further extensions (data, features, architecture, hyperopt) and putting all into production. If there was no AUC gain on the last week, we do not extend any further. Inside this 3 month time box - execute pure Kanban, task by task, which allows you to take different paths as needed (agility), not waiting till your sprint finishes in 3 days. You already know your new feature is poorly designed and you need to start on tweaking it right now.&lt;/p>&lt;/blockquote>
&lt;p>つまり、time-boxingをして、その中で仮説検証をしてうまくいったら続きをやる、という意思決定をしていくのである。&lt;/p>
&lt;p>また、もう一つのポイントとして、MVPの代わりにMVM (Minimum Viable Model)をさっさと作ること、というのを Agile Data Science with Rの著者は提案している。例えば、最初は線形回帰などのシンプルなモデルを限定したユーザーにMVMとしてデプロイ、次いで特徴量を追加し、最後により複雑なモデル(本文中ではRandom Forestが挙げられていたが今ならNNベースのアプローチもあるだろう)をデプロイする、というような流れである。&lt;/p>
&lt;p>これは先のtime-boxingとの話ともつながるが、無数の選択肢の中から確度の高い道を探して枝刈りする取り組みの一つとして、MVMをフックにするのはいいアイデアだと思う。&lt;/p>
&lt;h3 id="2-hypothesis-based-storyを使うスクラムに手を入れる">2. Hypothesis Based Storyを使う（スクラムに手を入れる）&lt;/h3>
&lt;p>別の&lt;a href="https://www.reddit.com/r/datascience/comments/wwi7cs/comment/illoety/" target="_blank" rel="noopener">Redditのスレッド&lt;/a>では、スクラムとKanbanを組み合わせるというアプローチがあった。長期的なプロジェクトではスクラムを採用し、リサーチタスクではtime boxingを使用しているというものである。&lt;/p>
&lt;p>特に、スクラムに対して以下のような変更をしたようだ。&lt;/p>
&lt;ul>
&lt;li>hypothesis based stories (instead of user based)&lt;/li>
&lt;li>foregoe stand ups, people keep their tickets as research logs and @ people when they need help. - Product owner can read the tickets if they want to know where we are&lt;/li>
&lt;li>monthly retro rather than per scrum, wider focus&lt;/li>
&lt;li>tickets largely written by the data scientists then priorities by product owner&lt;/li>
&lt;/ul>
&lt;p>仮説ベースのstoryを書く。スタンドアップをやらないで、チケットにリサーチログを書く。手助けがいるときはチケットでメンションする。Product Ownerは自分から情報を取りに行く。チケットはデータサイエンティストが書いて、優先順位はProduct Ownerがつける。つまり、DS/MLEに自分の仕事に集中してもらう、ということである。&lt;/p>
&lt;p>特に、Hypothesis Based Storyはユニークである。なぜなら、先ほどのTechnical Storyにビジネス価値の話を思い返すと、MLにおける仮説検証フェーズでのビジネス価値は「リスクを低減する、不確実性を下げる」としか書きようがないからである。また、「仮説を立てて検証をする」こと自体をチケットのゴールにすることで、「ちゃんとした仮説を立てないといけない」という意識が生まれ、結果は「仮説が正しかった/間違っていた」ということでcloseできる。&lt;/p>
&lt;blockquote>
&lt;p>The point is that the exit criteria is provable and the delivery is typically the proof. Likewise, disapproving the hypothesis is still a success, we learned something.&lt;/p>&lt;/blockquote>
&lt;p>storyの例も併せて紹介しておこう。&lt;/p>
&lt;blockquote>
&lt;p>“We believe a fine tuned distilbert architectures will allow us to identify cases with a precision of greater than .95 and a recall of greater than .7.”&lt;/p>&lt;/blockquote>
&lt;blockquote>
&lt;p>“We believe it should be possible to transform a given article within our dataset to our standardised form without additional datasets or augmentation”&lt;/p>&lt;/blockquote>
&lt;blockquote>
&lt;p>“We believe x metric can best be explained to stakeholders using a combination of shap values and distribution charts”&lt;/p>&lt;/blockquote>
&lt;h2 id="余談-mlプロジェクトでproduct-ownerは何をするのか">余談: MLプロジェクトでProduct Ownerは何をするのか&lt;/h2>
&lt;p>余談ではあるが、Product Ownerがチケットを作らないのであれば何をするのか、ということについて詳しく書かれた章がある。(5.6 The Product Owner Role)[https://edwinth.github.io/ADSwR/a-methodology-for-agile-data-science.html#the-product-owner-role]&lt;/p>
&lt;p>まとめると&lt;/p>
&lt;ul>
&lt;li>Stake holderとのコミュニケーションを一手に引き受ける。DS/MLEにはタスクにfocusしてもらう&lt;/li>
&lt;li>DS/MLEの作ったタスクについて議論をしてscopingを通じて整理をするのを手伝う&lt;/li>
&lt;li>DS/MLEの作ったタスクを優先順位付けする&lt;/li>
&lt;li>DS/MLEの気づかないビジネス側の懸念点を指摘する&lt;/li>
&lt;/ul>
&lt;p>といったところである。&lt;/p>
&lt;p>読んでいると、DS/MLEの時間はSWEよりも価値が高いように書かれているように感じる。&lt;/p>
&lt;h2 id="まとめ">まとめ&lt;/h2>
&lt;p>ざっと調査してみたが、以下のような結論に至った。&lt;/p>
&lt;ul>
&lt;li>厳格なスクラムはMLプロジェクトには向いていない&lt;/li>
&lt;li>研究・探索フェーズと開発フェーズでworkflowを分ける&lt;/li>
&lt;li>研究・探索フェーズでは、story pointではなく時間で区切る&lt;/li>
&lt;li>研究・探索フェーズでは仮説検証を軸に進める（Hypothesis Based Storyを書く、Kanbanを使う）&lt;/li>
&lt;/ul>
&lt;p>time boxingの考え方と仮説検証を中心に調査タスクを進めていくというのは、MLプロジェクトにおいては当たり前であるが非常に強力なサポートとなるだろう。&lt;/p>
&lt;p>では、冒頭の「Technical Storyを使えばタスクを2週間に収まるように分割できるはず。そして、それをすれば2週間で価値がでるはず」という言葉に対する返答としては、&lt;/p>
&lt;ul>
&lt;li>ビジネス価値は「不確実性の低減」という理解をする&lt;/li>
&lt;li>Technical StoryよりもHypothesis Based Storyを使うか、Kanbanに移行する&lt;/li>
&lt;li>2週間という枠で具体的なゴールを決めるよりも、時間で区切って可能性の枝刈りを素早く回していく&lt;/li>
&lt;/ul>
&lt;p>ということになるだろう。&lt;/p></description></item></channel></rss>