Upgrade to Pro — share decks privately, control downloads, hide ads and more …

mlflowをwindowsで起動するのはめんどくさい

F0e950c6bf20815f3d169f063d3c5d4f?s=47 Aipa
March 15, 2019

 mlflowをwindowsで起動するのはめんどくさい

データ分析チャンプルー val.1@琉球大学で発表してきた

https://nobdata.connpass.com/event/122314/

F0e950c6bf20815f3d169f063d3c5d4f?s=128

Aipa

March 15, 2019
Tweet

More Decks by Aipa

Other Decks in Technology

Transcript

  1. σʔλ෼ੳͪΌΜ΀Δʔ vol.1 ΞΠύʔୂ௕@ླྀٿେֶ

  2. ࣗݾ঺հ

  3. ࣗݾ঺հ • ΞΠύʔୂ௕(ࠓ೥ 29) • ೋ೔ਲ͍Ͱ͢ • ͪΎΒσʔλגࣜձࣾ • PyData.OkinawaڞಉΦʔΨφΠβʔ

    • ࡢ೔͔ΒϏʔϧ͕ݏ͍ʹͳΓ·ͨ͠
  4. ࠂ஌

  5. PyData.Okinawa #38 LTେձ https://pydataokinawa.connpass.com/event/121724/ ໌೔ 15:00 ~ 18:00 ৔ॴ͸ླྀٿେֶʢ஍Ҭ૑ੜ૯߹ݚڀ౩ʣ

  6. ঎඼͕͋Γ·͢ʂʂʢશһ౤ථʣ

  7. ݱ࣌఺શһೖ৆֬ఆ ʢΑ͔ͬͨΒཔΉདྷͯ͘ΕཔΉʣ

  8. ΅͘΋͜Ε͔Β࡞Γ·͢ʂʂ ʢ͔ͩΒ҆৺ͯ͠དྷͯ͘Εʣ

  9. ࿩͢લʹ

  10. ຊεϥΠυͰ͸ಡΈͮΒ͍Լهϫʔυ͕Ͱ͖ͯ·͢ • fcntl • WSGI • Gunicorn

  11. ຊεϥΠυͰ͸͜͏ݺͼ·͢ • fcntl → ͑;͜ΜͱΖʔΔ • WSGI → ͏͌ͣ͗ʔ •

    Gunicorn → ͙ʹ͜ʔΜ
  12. ຊεϥΠυͰ͸͜͏ݺͼ·͢ • fcntl → ͑;͜ΜͱΖʔΔ • WSGI → ͏͑͗͢ •

    Gunicorn → ͙ʹ͜ʔΜ https://twitter.com/moon_in_nagano/status/1001315017273167872
  13. ຊεϥΠυͰ͸͜͏ݺͼ·͢ • fcntl → ͑;͜ΜͱΖʔΔ • WSGI → ͏͑͗͢ •

    Gunicorn → ͙ʹ͜ʔΜ https://twitter.com/moon_in_nagano/status/1001315017273167872
  14. ຊ೔͓࿩͢Δ͜ͱ

  15. ຊ೔͓࿩͢Δ͜ͱ

  16. mlflowྑͦ͞͏ https://qiita.com/ike_dai/items/3121a8cc8398c6ec6a33

  17. ͔͠͠ࠓճͷཁ݅ • Windows OS • HogeHogeFlow • FugaFuga-learn

  18. ͔͠͠ࠓճͷཁ݅ • Windows OS • HogeHogeFlow • FugaFuga-learn

  19. do not support (´ʀωʀʆ)

  20. ֬ೝͯ͠ͳ͍͚ͩͰಈ͘Ͱ͠ΐʢ͸ͳ΄͡ʔ

  21. (´ʀωʀʆ) GDOUM͕ͳ͍

  22. WindowsͰ͸fcntl͸ಈ͔ͳ͍ https://stackoverflow.com/questions/1422368/fcntl-substitute-on-windows

  23. WindowsͰ͸fcntl͸ಈ͔ͳ͍ https://stackoverflow.com/questions/1422368/fcntl-substitute-on-windows

  24. Կނಈ͔ͳ͍͔ௐ΂Δ

  25. Τϥʔ͔Βௐ΂Δ

  26. Τϥʔ͔Βௐ΂Δ https://github.com/benoitc/gunicorn/blob/master/gunicorn/util.py#L8

  27. gunicornͰΤϥʔ͕ग़͍ͯΔΑ͏ͩ • gunicorn is Կʁ • Python༻ͷWSGI HTTP Server

  28. gunicornΛwindowsͰ ಈ࡞͢ΔΑ͏ʹ मਖ਼͢Ε͹͍͍ͷͰ͸??!

  29. Dead end. ×2

  30. ͓ʁʢ^ω^ = ^ω^ʣ

  31. Dead end. ×3

  32. Dead end. ×3

  33. mlflow͸ windowsͰ͸࢖͑·ͤΜ

  34. ɹ΋͏গ͠ؤுͬͯΈΔ

  35. mlflowͷίʔυΛಡΉ HVOJDPSOΛ ىಈ͢Δͱ͜Ζ NMqPXTFSWFS Λ࣮ߦ͢Δͱݺ͹ΕΔؔ਺ https://github.com/mlflow/mlflow/blob/master/mlflow/server/__init__.py

  36. mlflowͷίʔυΛಡΉ https://github.com/mlflow/mlflow/blob/master/mlflow/server/__init__.py 'MBTL࢖ͬͯΔ

  37. ݟ͖͑ͯͨΞʔΩςΫνϟʢΠϯϑϥʣ

  38. ݟ͖͑ͯͨΞʔΩςΫνϟʢαʔόʣ

  39. WSGI͍Βͳ͍આ ᶃHVOJDPSOͷྶѹΛফ͢ ᶄ'MBTLΛىಈ͢Δ͚ͩ

  40. վम͢Δ

  41. mlflow/server/__init__.pyΛ Flask͕ىಈ͢ΔΑ͏मਖ਼ ͓·͡ͳ͍ ˞ىಈޙʹ؀ڥม਺͕ ͳ͍ͱΤϥʔʹͳΔ 'MBTLͷىಈίʔυ

  42. ىಈͨ͠

  43. ىಈͨ͠

  44. ·͊Ͱ΋Flask͚ͩ͡Ό ෺଍Γͳ͍৔߹͕͋Δ

  45. FlaskͷσϑΥϧτͰ͸ಉ࣌ΞΫηεΛॲཧͰ͖ͳ͍ https://qiita.com/5zm/items/251be97d2800bf67b1c6

  46. ͳͥgunicornͳͲͷWSGIαʔόʔΛ࢖͏ͷ͔ https://blog.hirokiky.org/entry/2018/10/06/151830

  47. ΋͠ຊ൪Քಇ͍ͤͨ͞ͳΒ Apache, Nginx౳Λ࢖͍͍ͨ

  48. WindowsͰಈ࡞͢Δ WSGIΛ୳͢

  49. ͋ͬͨ https://docs.pylonsproject.org/projects/waitress/en/stable/

  50. ΊͬͪΌ؆୯ͦ͏ https://docs.pylonsproject.org/projects/waitress/en/stable/usage.html

  51. WSGIΛࠩ͠ସ͑Δઆ ᶃHVOJDPSOΛ XBJUSFTT΁มߋ͢Δ waitress

  52. मਖ਼͢Δ

  53. mlflow/server/__init__.py 'MBTLͷΦϒδΣΫτΛ XBJUSFTTʹ৯ΘͤΔ͚ͩ

  54. ىಈͨ͠

  55. ࡶײ

  56. ࡶײ • mlflow͸windowsͰ΋ಈ͔ͤΔ • શػೳςετͨ͠Θ͚Ͱ͸ͳ͍ͷͰϋϚΓͲ͜Ζ͸ ·ͩ͋Γͦ͏ • Ͱ΋ɺ΍ͬͺΓΊΜͲ͍͔͘͞Β
 Docker࢖ͬͨ΄͏͕͍͍Α

  57. None