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

Ruby のデータサイエンス対応の現状確認

7cca11c5257fda526eeb4b1ada28f904?s=47 Kenta Murata
November 30, 2017

Ruby のデータサイエンス対応の現状確認

Meguro.rb 2017.11.30

7cca11c5257fda526eeb4b1ada28f904?s=128

Kenta Murata

November 30, 2017
Tweet

Transcript

  1. Ruby ךر٦ة؟؎ؒٝأ㼎䘔ך 植朐然钠 Kenta Murata, Speee Inc. Ꟛ涪鿇 R&D ؚٕ٦ف

    Thu, Nov 30, 2017 Meguro.rb 1 / 16
  2. self.introduce Kenta Murata (@mrkn) Full-time CRuby committer at Speee Inc.

    CRuby The maintainer of bigdecimal Other OSS pycall.rb, mxnet.rb, enumerable-statistics, vim-cruby Hobby Play with my daughter, Mathematics, Physics, Computer Science, Reading SF, etc. 2 / 16
  3. 植㖈ծRuby ךر٦ة؟؎ؒٝأ㼎䘔כ麓床劍דׅկ 劤傈כծו׿זفٗآؙؑزָ㶷㖈׃ծ׉׸׊׸ו׿ז暴䗙ָ ֮׷ַ׾稱➜׃תׅկ ׫זׁ׿כծ׈מוַֿךفٗآؙؑزח⿫⸇׃גְ׋׌ֹծ Ruby ךر٦ة؟؎ؒٝأ㼎䘔׾⸇鸞ׅ׷䔲✲罏חז׏גְ׋׌ ֹ׋ְדׅկ 3 /

    16
  4. Contents SciRuby Ruby Numo pycall.rb mxnet.rb Red Data Tools project

    GPGPU ΁ͷରԠঢ়گ RubyData organization 4 / 16
  5. SciRuby NMatrix Λத৺ͱ͢ΔՊֶٕज़ܭࢉ༻ gem ܈ ւ֎Ͱ࠷΋༗໊ͳ Ruby ͷՊֶٕज़ܭࢉϥΠϒϥϦ܈ ൃىਓͨͪ͸࠷ۙ͸શ͘։ൃ͓ͯ͠ΒͣɺGSOC ͷϓϩδΣΫτͰֶੜ͕

    ৭ʑ࡞͍ͬͯΔ΋ͷͷدͤूΊঢ়ଶʹͳ͍ͬͯΔ Ұ෦ͷجຊԋࢉ͕஗͍όά͕͋Δ 5 / 16
  6. Ruby Numo Numo::NArray Λத৺ͱ͢ΔՊֶٕज़ܭࢉ༻ gem ܈ ݩ૆ NArray ͷ࡞ऀͰ͋Δాதণ޺͞Μ͕ൃىਓͰ͋Γ։ൃͷத৺ʹ͍Δ RubyKaigi

    Ͱ΋ൃද͞Ε͍ͯͯɺ೔ຊͰ͸ͦͦ͜͜஌ΒΕ͍ͯΔͱࢥ͏ ւ֎Ͱ͸͋·Γ஌ΒΕ͍ͯͳ͍ (?) 6 / 16
  7. SciRuby ה Ruby Numo דדֹ׷ֿה σʔλϑϨʔϜϥΠϒϥϦ Daru ͕ NMatrix ʹରԠ͍ͯ͠Δ

    [HELP] ୭͔ Numo::NArray ʹ΋ରԠ͍ͤͯͩ͘͞͞ Պֶٕज़ܭࢉ༻ͷجૅؔ਺܈ GSL ͷόΠϯσΟϯά͕ SciRuby ͱ Ruby Numo ͷͦΕͧΕʹରͯ͠ ଘࡏ͢Δ ՄࢹԽ Gnuplot Λ࢖͏ϥΠϒϥϦ͕ SciRuby ͱ Ruby Numo ͷͦΕͧΕʹର ͯ͠ଘࡏ͢Δ rbplotly ͕྆ํʹରԠ͍ͯ͠Δ (͸ͣ) 7 / 16
  8. pycall.rb Ruby ͔Β Python Λݺͼग़ͤΔ Ruby ͱಉ͡ϓϩηε಺Ͱ Python ΠϯλʔϓϦλΛॳظԽ͠ݺͼग़͢ ࣍ͷϦϦʔε͔Β

    Python Λݺͼग़͢ࡍʹ GVL Λղ์͢ΔΑ͏ʹͳΔͷ Ͱɺpuma Ͱಈ͘ Rails ΞϓϦέʔγϣϯͰ΋࢖͑Δʂ ͔͠͠ɺPython ଆͷ GIL ͷ੍ޚΛ·ͩ΍ͬͯͳ͍ͷͰɺRuby ଆͷෳ਺ͷ εϨου͔Β Python ͷػೳΛݺͼग़ͯ͠͸ͳΒͳ͍ ཉ͍͠ػೳͷఏҊΛϓϧϦΫΤετͷܗͰืू͍ͯ͠·͢ Ұॹʹ։ൃͯ͘͠ΕΔɺRuby ͱ Python ͷ྆ํʹৄ͍͠ਓ΋ืूͯ͠·͢ 8 / 16
  9. mxnet.rb MXNet ͷ Ruby όΠϯσΟϯά 10݄ࠒ͔Βຊؾग़ͯ͠ RubyConf ·Ͱʹ׬੒ͤ͞Α͏ͱ͚ͨ͠ͲແཧͰ͠ ͨʂʂ 3݄ͷԭೄ

    RubyKaigi 02 ·ͰʹͳΜͱ͔͢Δ Ruby ͱ MXNet ͷ྆ํʹৄ͍͠ਓͷڠྗΛืू͍ͯ͠·͢ 9 / 16
  10. Red Data Tools project Apache Arrow Λத৺ͱͨ͠σʔλπʔϧΤίγεςϜͷ Ruby ൛ ਢ౻͞Μ্ཱ͕ͪ͛ͨ

    ਢ౻͞Μ͸ Apache Arrow ͷ PMC ʹ΋ͳͬͨ Red Chainer ͳͲɺApache Arrow ͱ͸௚઀ؔ܎ͳ͍೿ੜϓϩμΫτͷ։ ൃ΋࢝·͍ͬͯΔ ͓ͦΒؔ͘܎ऀ͸શһ͕೔ຊਓͰ͋Δ ຖ݄ʮOSS Gate ౦ژϛʔτΞοϓ for Red Data ToolsʯͰ։ൃ͕ਐΊΒΕ ͍ͯΔ 12݄ͷΠϕϯτͷҊ಺ΛޙͰ͠·͢ 10 / 16
  11. GPGPU פך㼎䘔朐屣 tensorflow.rb Ͱ GPU ͕࢖͑Δ (͸ͣ) pycall.rb Ͱ Python

    ͷ GPGPU ରԠϥΠϒϥϦΛ࢖͑Δ ࠓ೥ 2017 ೥ͷ GSOC Ͱ ArrayFire ͷόΠϯσΟϯά͕࡞ΒΕͨ ࠓ೥ 2017 ೥ͷ Ruby Grant Ͱ GPGPU ରԠϓϩδΣΫτ͕2݅࠾୒ 1. RbCUDA: ArrayFire ͷόΠϯσΟϯάΛ࡞ͬͨਓͷϓϩδΣΫτͰɺ CUDA ϥϯλΠϜϥΠϒϥϦͷ Ruby όΠϯσΟϯά 2. cumo: sonots ͞ΜͷϓϩδΣΫτͰɺcupy ͷ Ruby ൛Λ Numo::NArray ʹରͯ͠࡞Δ mxnet.rb ͕࢖͑ΔΑ͏ʹͳΔͱɺ͜Ε΋ GPGPU ʹରԠ͢Δ 11 / 16
  12. Ruby דر٦ة؟؎ؒٝأׅ׷橆㞮׾知⽃ ח鑐ׅ倯岀 ࣮͸ Docker image Λ࡞ͬͯ͋Δɻ docker run --rm

    -it -p 8888:8888 rubydata/notebooks ͜ΕͰɺJupyter notebbok ্ཱ͕͕ͪΔͷͰɺIRuby kernel ͷϊʔτϒοΫ Λ࡞Ε͹ࢼͤΔɻ 12 / 16
  13. RubyData organization SciRubyɺRuby NumoɺRed Data ToolsɺͳͲෳ਺ͷϓϩδΣΫτʹਓ͕ ෼ࢄ͍ͯ͠Δݱঢ়͸ɺ७ਮͳར༻ऀ͕ށ࿭͍΍͍͢ ϓϩδΣΫτʹؔ܎ͳ͘ɺRuby ͱσʔλπʔϧΛ૊Έ߹Θͤͯ࢖͓͏ͱ͠ ͍ͯΔਓ͕ू·ͬͯ৘ใަ׵͕Ͱ͖Δ৔͕ඞཁͩΖ͏

    ͱ͍͏Θ͚Ͱɺࢲ͕࡞Γ࢝Ί·ͨ͠ http://ruby-data.org/ ·ͩϥϯσΟϯάϖʔδ͔͠ͳ͍ʂʂ 13 / 16
  14. RubyData needs helps!! ҎԼͷΑ͏ͳਓΛืूͯ͠·͢ ίϛϡχςΟӡӦ (ਓͷू·ΓΛ੍ޚ͢Δ͜ͱ) ͕ಘҙͳਓ (ࢲ mrkn ͕

    Ұ൪ෆಘҙͳ͜ͱ) AWS ʹৄ͍͠ਓ (discourse ͷ্ཱͪ͛ͱӡӦΛख఻ͬͯཉ͍͠) ࣗવݴޠͰͷܧଓతͳ৘ใൃ৴͕ಘҙͳਓ (ʮRuby ͰσʔλαΠΤϯ εʯతͳ৘ใൃ৴Λεέʔϧ͍ͤͨ͞) ӳޠ͕ಘҙͳਓ (๻ͨͪͷมͳӳޠΛ௚ͯ͠ཉ͍͠) docker-stacks ͷҡ࣋ͱൃలΛੵۃతʹ΍ͬͯ͘ΕΔਓ 14 / 16
  15. ׫זׁ׿ָ➙ּׅדֹ׷ֿה 1. ࢖ͬͯόάใࠂ 2. ೔ຊʹดͯ͡ΔϓϩμΫτΛւ֎޲͚ʹӳޠͰ঺հ͢Δ 3. ར༻ऀ͕૿͑ΔΑ͏ͳϒϩάهࣄΛॻ͘ (΍ͬͯΈͨܥ) 4. ։ൃऀ͕૿͑ΔΑ͏ͳϒϩάهࣄΛॻ͘

    (։ൃ؀ڥΛ࡞ΔɺίʔυΛಡΜͰ Έͨܥ) 5. طଘͷϥΠϒϥϦʹϓϧϦΫΛૹͬͯ։ൃʹࢀՃ͢Δ 6. RubyData ͷӡӦνʔϜʹೖͬͯಘҙͳ͜ͱΛ΍Δ 7. OSS Gate for Red Data Tools ʹࢀՃͯ͠։ൃ͢Δ 15 / 16
  16. OSS Gate for Red Data Tools in Speee 2017.12.19 Red

    Data Tools ϓϩδΣΫτͷ։ൃऀ͕ू·Γ·͢ɻ ৔ॴ: ࿡ຊ໦4-1-4 ࠇ࡚Ϗϧ 5F Speee Inc. ηϛφʔϧʔϜ ࣌ؒ: 2017೥12݄19೔ 19:00 ։৔ 19:30 ։࢝ https://speee.connpass.com/event/72926/ 16 / 16