Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
機械学習プロジェクトでのPythonアップデートの難しさと得られた知見
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Yudai Hayashi
November 15, 2023
460
3
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
機械学習プロジェクトでのPythonアップデートの難しさと得られた知見
みんなのPython勉強会#99 で発表した資料です
https://startpython.connpass.com/event/300831/
Yudai Hayashi
November 15, 2023
More Decks by Yudai Hayashi
See All by Yudai Hayashi
技術キャッチアップ効率化を実現する記事推薦システムの構築
yudai00
4
390
Off-Policy Evaluation and Learning for Matching Markets
yudai00
0
180
ジョブマッチングプラットフォームにおける推薦アルゴリズムの活用事例
yudai00
0
210
ユーザーのプロフィールデータを活用した推薦精度向上の取り組み
yudai00
0
800
MCP Clientを活用するための設計と実装上の工夫
yudai00
1
1.4k
人とシゴトのマッチングを実現するための機械学習技術
yudai00
1
140
MCPを理解する
yudai00
18
16k
データバリデーションによるFeature Storeデータ品質の担保
yudai00
1
300
「仮説行動」で学んだ、仮説を深め ていくための方法
yudai00
8
2.1k
Featured
See All Featured
Heart Work Chapter 1 - Part 1
lfama
PRO
10
36k
Mobile First: as difficult as doing things right
swwweet
225
10k
Information Architects: The Missing Link in Design Systems
soysaucechin
1
1.2k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
My Coaching Mixtape
mlcsv
0
340
The Invisible Side of Design
smashingmag
301
52k
GitHub's CSS Performance
jonrohan
1033
470k
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
390
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Leveraging Curiosity to Care for An Aging Population
cassininazir
1
530
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
350
Practical Orchestrator
shlominoach
192
12k
Transcript
© 2023 Wantedly, Inc. 機械学習プロジェクトでのPythonアップデー トの難しさと得られた知見 みんなのPython勉強会#99 Nov. 15 2023
- Yudai Hayashi
© 2023 Wantedly, Inc. 自己紹介 林 悠大 • 経歴: ◦ 東京大学工学系研究科でPh.D取得
◦ 2022年にウォンテッドリーにデータサイ エンティストとして新卒入社 • Twitter(X): @python_walker • 趣味: ◦ 読書 ◦ 音楽聴くこと ◦ ウイスキー Twitter
© 2023 Wantedly, Inc. Pythonアップデートをどのような順番で進めていくべきか Poetryで管理しているプロジェクト pyproject.toml Pythonと一緒にライブラリのアップデートも必 要になることが多い •
メインライブラリに破壊的変更が入る • Linterの挙動が変わる • ライブラリがメンテされてない 発生しうる問題 どこから始めたら効率的にPythonをアッ プデートできる? 機械学習周りだと破壊的変更やメンテス トップは頻繁に見られる
© 2023 Wantedly, Inc. Step 1:Warningを消していく • FutureWarning: 将来廃止されたり挙動が変わったりするという警告 •
DeprecationWarning: 将来廃止される予定であるという警告 e.g. Warning系はライブラリをアップデートすることで動かなくなる原因になりやすいのでアップ デート前に潰せるものは潰しておく
© 2023 Wantedly, Inc. Step 2:Dev dependenciesのバージョンを上げる 返り値の型がAとBで違う と怒られる (mypy)
typing.Selfが使えるのは 3.11から... Linterライブラリはバージョンアップデートで挙動が変わることがある
© 2023 Wantedly, Inc. Step 3:main dependenciesのバージョンを上げる メインの依存ライブラリのバージョンを上げていく • PyPIで公開されていてPythonを上げてもサポートが続いているライブラリ
• 自前で管理しているライブラリ • 外部が管理しているがメンテが止まっているライブラリ 自前で管理しているライブラリ メンテが止まっているライブラリ • 頑張ってバージョン制約を上げる • tagをつけて他のリポジトリに影響が出 ないように気をつける • 乗り換えを考える • 頑張って.whlをビルドする ここまでできたらPythonのバージョンを上げる
© 2023 Wantedly, Inc. Pythonのバージョンを上げた後は... BigQuery Looker モデルに意図しない変化が生じていないか、継 続的にモニタリングする体制が重要
© 2023 Wantedly, Inc. まとめ • Pythonのバージョンを上げるときには 落とし穴があちこちにあるので小さく進 めていくのが重要 •
機械学習の場合にはアップデートでモ デルの性能に意図しない変化が生じる 可能性がある。継続的に性能をモニタ リングする体制を作ることが重要 バージョンを上げたときの Issue