DatabricksでTwelveLabsのマルチモーダルEmbed APIを動かしてみる

こちらの続きです。

https://qiita.com/taka_yayoi/items/17ba3b779a0c7c06e29c

上の記事は翻訳しただけだったのですが、実際に動かして見たいと思ってAPIのプレビューを申請していました。

- [TwelveLabsへのサインアップ](https://api.twelvelabs.io/)
- [Embed APIの申請](https://twelvelabs.typeform.com/to/q0VyBAd4?typeform-source=tl-docs)

私の場合、2週間くらいしたらメールが届きました。
![Screenshot 2024-09-19 at 17.00.46.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1168882/c00475ba-8619-15a9-5c89-6f584a3ea48f.png)

APIキーを取得します。
![Screenshot 2024-09-19 at 17.02.02.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1168882/56aa771d-4670-1d57-4be5-64bde885a289.png)

![Screenshot 2024-09-19 at 17.02.26.png](https://qiita-image-store.s3.ap-northeast-1.amazonaws.com/0/1168882/9b6f3bfb-0da9-9dd6-6d9c-47d5c00acccc.png)

# クイックスタートのウォークスルー

届いたメールにクイックスタートクックブックがあったので、そちらを動かします。以下はノートブックの翻訳です。

```py
%pip install -U -q twelvelabs
dbutils.library.restartPython()
```

## **API キーの設定。API キーを環境変数として追加します。**

TwelveLabs にサインアップして、[こちら](https://playground.twelvelabs.io/dashboard/api-key)から API キーを取得してください 。無料プランを使用するためにクレジットカードは必要ありません。無料プランには、小規模プロジェクトに十分な、600分のビデオのインデックス作成が含まれています。

*次のセルを実行するには、*
* *Colab ノートブックでは、API キーを Colab シークレットに名前 TL_API_KEY として保存する必要があります。API キーをまだ持っていない場合、または Colab シークレットを作成する方法がわからない場合は、[こちら](https://medium.com/@parthdasawant/how-to-use-secrets-in-google-colab-450c38e3ec75)の例を参照してください。*
* *他の Python 環境では、`os.environ()` を使用して Python 変数を使用することもできます。*

:::note info
**注意**
以下では平文でAPIキーを指定していますが、Databricksの場合は[シークレット](https://docs.databricks.com/ja/security/secrets/secrets.html)をお使いください。
:::

```py
TL_API_KEY = "<APIキー>"
```

## **エンベディングの生成**

Embed API を使用して、ビデオやテキストの文脈的なベクトル表現であるマルチモーダルエンベディングを作成します。Twelve Labs のビデオエンベディングは、視覚的表現、ボディランゲージ、話された言葉、およびビデオの全体的なコンテキストなど、異なるモダリティ間の微妙な手がかりや相互作用をすべて捉え、これらのモダリティとその時間を通じた相互関係の本質を包括します。

ビデオエンベディングを作成するには、まずビデオをアップロードし、プラットフォームがそれらを処理するのを待つ必要があります。ビデオのアップロードと処理には時間がかかります。そのため、エンベディングの作成は、次の3つのステップで構成される非同期プロセスです：

1. ビデオをアップロードして処理する：ビデオのアップロードを開始すると、プラットフォームはビデオエンベディングタスクを作成し、その一意のタスク識別子を返します。

2. ビデオエンベディングタスクの状態を監視する：タスクの一意の識別子を使用して、完了するまで定期的にその状態をチェックします。

3. エンベディングを取得する：ビデオエンベッディングタスクが完了した後、タスク識別子を提供してビデオエンベディングを取得します。

[ドキュメント](https://docs.twelvelabs.io/docs/create-video-embeddings)で詳細を学びましょう

以下の動画のエンべディングを生成しています。

https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_2mb.mp4

```py
from twelvelabs import TwelveLabs
from twelvelabs.models.embed import EmbeddingsTask

client = TwelveLabs(api_key=TL_API_KEY)
task = client.embed.task.create(
    engine_name="Marengo-retrieval-2.6",
    video_url="https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_2mb.mp4" # # Example: https://sample-videos.com/video321/mp4/720/big_buck_bunny_720p_2mb.mp4
)
print(
    f"Created task: id={task.id} engine_name={task.engine_name} status={task.status}"
)

def on_task_update(task: EmbeddingsTask):
    print(f"  Status={task.status}")

status = task.wait_for_done(
    sleep_interval=2,
    callback=on_task_update
)
print(f"Embedding done: {status}")

task_result = client.embed.task.retrieve(task.id)
if task_result.video_embeddings is not None:
    for v in task_result.video_embeddings:
        print(
            f"embedding_scope={v.embedding_scope} start_offset_sec={v.start_offset_sec} end_offset_sec={v.end_offset_sec}"
        )
        print(f"embeddings: {', '.join([str(x) for x in v.embedding.float])}")
```

動画のエンべディングを取得することができました。

```
Created task: id=66eb7e60808d95368f6f8491 engine_name=Marengo-retrieval-2.6 status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=processing
  Status=ready
Embedding done: ready
embedding_scope=clip start_offset_sec=0.0 end_offset_sec=6.0
embeddings: -0.060086973, 0.016479108, -0.0060139652, 0.0048271893, 0.0077120494, -0.0148147335, 0.011775261, 0.004679612, 0.031531, -0.025363177, 0.0076997993, 0.0020179816, -0.033635158, -0.013939535, -0.01095711, -0.026104819, -0.018278124, -0.101518646, 0.0033319574, -0.03146514, 0.00087973947, -0.018634306, -0.018339625, 0.00022322813, -0.017329184, 0.019002717, 0.017529953, -0.017403385, -0.033266023, -0.02116763, 0.03423956, 0.019606508, -0.0057908148, -0.0034565318, -0.06185663, 0.019633947, -0.04960684, -0.0022776118, 0.029254839, -0.011256867, -0.010750044, 0.002401849, -0.024535414, -0.049518578, -0.018483916, 0.03527698, 0.014162095, 0.0407244, -0.040075995, 0.0033199189, 0.034340926, 0.05518638, -0.014319015, -0.017810533, 0.0010725246, -0.027161539, 0.04413806, -0.016160486, 0.002294424, 0.05532013, -0.0008937118, -0.004660868, 0.020598397, 0.0048343563, -0.015287018, 0.00035438634, 0.04355665, -0.03257236, -0.028851317, -0.018825592, 0.011250313, -0.019678388, 0.021866819, 0.03320627, -0.0049894433, -0.014177559, 0.035557352, 0.015211711, -0.008845638, -0.0002657301, -0.0013533208, 0.040306795, -0.037757363, 0.000602499, 0.0054760184, -0.0028000604, 0.014050633, 0.01541408, 0.008951065, 0.0070035807, -0.07194257, 0.0024858417, -0.008925812, -0.027633453, 0.009474452, -0.031595483, -0.08700231, -0.03295565, 0.0072236084, -0.01964603, -0.010734787, 0.029191064, -0.04338865, 0.015629437, -0.012727981, 0.049014006, -0.0021011215, -0.007026564, -0.009518647, 0.03229967, -0.021052763, -0.023152376, 0.004137702, -0.026437232, 0.03250718, 0.0077671963, 0.030071823, -0.014795541, 0.05344016, 0.025034394, 0.0016504818, 0.007160467, -0.012214237, 0.01614917, 0.013523111, -0.02130759, 0.008345699, -0.015019576, 0.013696057, 0.06612333, -0.02678209, -0.0070742774, 0.07140906, -0.019790407, 0.050571956, 0.010452594, -0.06318784, 0.049219467, 0.029556364, -0.0037716026, 0.045751642, -0.0622052, -0.01699805, 0.0040762057, 0.0020980814, 0.029380813, -0.007293652, 0.017883245, -0.00075233425, -0.05306011, 0.03886815, -0.0486905, -0.012189975, 0.026076974, -0.040416513, 0.06870693, -0.03845282, 0.028379124, -0.0544358, 0.011827992, -0.0031111399, -0.03801391, -0.010454809, 0.012400265, 0.03881253, -0.043420855, 0.03903049, -0.03558347, -0.025440648, 0.035964824, 0.017432224, 0.0073324754, 0.034006797, -0.061403107, -0.015403115, -0.010407774, -0.038564708, -0.011730291, -0.00723849, 0.018335065, -0.016090859, -0.020537937, -0.0010321101, 0.013920824, -0.031811632, 0.05085569, 0.0020758961, -0.026337894, -0.021051876, -0.021517694, 0.034365017, 0.029979462, -0.0123899365, -0.0055744634, -0.037173226, 0.032232665, -0.04850397, -0.0016167792, 0.047376946, -0.039089154, 0.04274626, 0.01267932, -0.048392903, 0.045584273, -0.004410955, -0.029655935, -0.0009784038, -0.0016463452, -0.07463025, -0.013062307, -0.024386011, 0.013101474, 0.001993212, -0.027518196, 0.01511438, -0.06364772, 0.00011663671, 0.034992184, 0.0672028, 0.018348949, 0.01770745, 0.037930764, 0.010303554, 0.0017949131, -0.016391346, -0.044297967, 0.010202993, -0.02199695, 0.11376265, -0.010827421, 0.004213572, -0.052402616, 0.005501019, -0.05605638, -0.03627798, -0.013551237, 0.036587983, 0.02379138, -0.00057136023, 0.002467874, -0.078592725, 0.078369886, -0.0055490523, -0.01577636, 0.06439924, -0.037139926, -0.07354969, -0.07867986, 0.026089974, -0.0144738825, 0.011421639, -0.007971645, -0.007326717, 0.13272676, -0.040904842, -0.005276445, -0.01808855, 0.00028698216, 0.013798602, -0.018425401, 0.018862937, 0.026388913, 0.015586878, -0.015969008, -0.0147435, 0.0022153151, 0.03855804, 0.034329474, -0.03983455, -0.0026194516, 0.0020268906, -0.010093657, -0.0134882545, -0.013830042, -0.022625577, -0.041252874, -0.018028954, 0.06833717, -0.004793218, -0.049187027, -0.06620049, 0.009646389, 0.025857983, 0.03442328, 0.026219007, 0.0026174388, 0.009492891, 0.06875413, 0.04376699, 0.025001785, 0.022415116, 0.028489543, 0.02402294, 0.024360623, 0.031146033, -0.0027573842, -0.040314585, -0.022700105, -0.020321239, -0.028665775, -0.020925378, 0.009680659, -0.026738932, 0.003007026, 0.012681515, 0.035421263, 0.011382212, 0.005099818, -0.063615896, 0.012620723, -0.023630342, 0.028959367, -0.01437283, 0.02259669, -0.056993496, -0.009739823, -0.011462339, -0.009561893, 0.009574517, -0.055388626, 0.07643259, -0.02500566, 0.020038906, 0.031926263, -0.012772667, -0.002938917, -0.0038700106, 0.008011213, -0.006646045, -0.007908108, -0.004766426, -0.00351735, 0.042283133, 0.049898785, -0.065704174, -0.0037304861, -0.01151114, -0.0024640292, 0.004310888, -0.035348907, -0.0009171123, 0.018550886, 0.010107016, -0.02289733, -0.022663245, -0.05894512, -0.025407143, -0.05880697, -0.031622574, -0.0012540758, 0.0037431223, -0.011520247, -0.046826173, 0.0024289924, -0.00740329, -0.08953589, -0.047887046, -0.028516041, 0.026353989, 0.0020365664, 0.02595641, 0.05749229, -0.012663947, -0.025053045, -0.012981865, 0.046354897, 0.006227492, -0.033957247, -0.010253096, 0.07652309, 0.0058225146, 0.060991738, 0.04871023, -0.0332532, 0.04815378, -0.01570799, 0.03566884, -0.045501478, -0.031891678, -0.019189473, -0.03240488, -0.0077978945, 0.00049894326, -0.040615343, 0.01757751, -0.00895925, -0.02682785, 0.040195677, 0.027776215, 0.017129159, 0.019830845, -0.009518289, 0.064962566, 0.019490328, 0.036231436, 0.020634476, 0.005467864, 0.057580195, -0.013807259, 0.012161428, -0.006541044, -0.0041659814, -0.0039754347, -0.060644444, 0.017126339, -0.01974226, 0.025122225, 0.10432627, -0.005949118, -0.0048080296, -0.07089896, -0.008770434, -0.013600175, 0.04531312, -0.049193505, -0.016741449, -0.031173008, -0.0025019867, -0.0024958854, -0.02895726, -0.015425376, 0.020596335, 0.002824636, 0.011593557, -0.013473093, 0.04224118, 0.021186974, 0.033365857, 0.002958535, 0.025283583, -0.044646528, -0.0119344555, -0.035654284, 0.023465458, -0.019836476, 0.023688423, -0.0083645545, -0.014283521, -0.0050694784, -0.005806634, -0.08953373, 0.006386916, -0.007508261, 0.0035115809, 0.006901959, 0.011953678, -0.04919674, 0.012631615, -0.0017981332, -0.018585268, 0.00508909, -0.0022484532, -0.0018763348, 0.0037454825, -0.023995152, 0.03636696, 0.023159042, 0.008948886, -0.021473302, 0.00997134, 0.033559818, 0.001980704, 0.024696987, -0.01335462, -0.011318345, -0.0011114654, -0.11100561, -0.07194375, -0.015610289, 0.027786247, 0.03746622, 0.0007853715, 0.028748885, 0.010888568, -0.03293643, 0.023106314, -0.0075672725, -0.036387347, -0.04217908, -0.03333749, -0.027250111, -0.0117708985, -0.039556615, 0.037336506, 0.021915795, -0.030081682, -0.03598429, -0.020563956, -0.012323749, -0.036752712, -0.021762777, 0.010191495, 0.008998425, -0.013376029, 0.0050017727, 0.010853094, -0.04001397, 0.018472767, -0.020190556, 0.030709371, 0.06174421, 0.05149658, -0.0029530926, -0.0053036846, -0.016851818, 0.0032166045, -0.05727647, 0.010107425, 0.035392154, 0.0034632212, 0.042749193, -0.0017062774, 0.009733895, 0.027704388, 0.01631579, -0.005881855, -0.024372414, 0.029140119, -0.015830375, 0.018877367, -0.010800196, 0.018390927, 0.04814988, -0.004078993, 0.017940816, 0.041012403, 0.006339234, -0.015543695, -0.006418781, 0.005841562, 0.009694471, -0.032982863, -0.016252723, 0.00016219822, -0.026791336, 0.027037332, -0.015306181, 0.023582183, -0.021819513, 0.026548717, 0.03711314, -0.011760128, -0.0001271148, 0.0150151355, -0.03303953, 0.04133108, -0.027027242, 0.04966926, -0.002690468, -0.030231435, -0.003955537, -0.011522204, 0.014775016, 0.009684368, 0.0071682744, 0.008235005, 0.0016355093, 0.05628964, 0.05475489, 0.015920088, -0.0071062213, -0.0015886498, 0.02544889, -0.067594215, 0.025111146, 0.011640886, -0.01910595, 0.024285156, -0.01585235, 0.040026307, -0.07696258, -0.018167432, 3.9994437e-05, 0.04627793, 0.014189968, 0.04098593, 0.051961217, -0.032129128, 0.008191405, 0.011671172, -0.018879263, -0.019578215, 0.014174741, -0.038835026, 0.006707622, -0.011135283, 0.01221356, 0.029053112, -0.021440722, -0.044847988, -0.022430168, 0.029739657, 0.00195628, 0.008681817, 0.021279486, -0.0015969306, 0.009241477, 0.03292187, -0.0426318, 0.019670224, -0.018986152, -0.048227575, 0.017335715, 0.014540468, 0.04839645, -0.037581444, -0.03019634, -0.03865438, 0.01231668, -0.011397396, -0.08061027, -0.07435432, -0.018448962, -0.03673627, -0.022009648, -0.011198546, -0.0040190853, 0.035860296, -0.046089903, -0.033202916, 0.020630464, 0.016672404, -0.032497652, -0.0037439202, 0.0042082765, 0.0016541722, 0.012422817, 0.007048867, 0.0155687975, -0.031261258, -0.014674201, -0.04801593, -0.014110611, 0.019653302, 0.012805023, 0.071879804, 0.013774836, 0.033548422, -0.016708776, -0.013556407, -0.026897974, 0.01436472, 0.009483182, -0.005683514, 0.029322535, -0.050043557, -0.04793329, 0.06087792, -0.062790245, -0.013978833, 0.0099653695, 0.0046472526, 0.0094364835, 0.020706052, 0.047697205, -0.032865364, 0.005339946, -0.020726513, -0.021009311, 0.011081528, 0.05469637, 0.012156873, 0.045223463, 0.0014587771, -0.011124406, -0.02268358, 0.019706791, 0.025472473, -2.9468052e-05, -0.013040956, -0.032629672, 0.031776782, 0.0017764133, -0.019824488, 0.03419612, 0.037325967, 0.032718237, 0.035823535, -0.027880378, -0.005077116, -0.018756319, -0.03115097, -0.027171759, 0.066228785, -0.013171057, 0.026810985, -0.0337985, 0.013006288, 0.0059979064, -0.012463553, 0.0142834, 0.010552169, 0.0008486406, -3.104765e-05, 0.01731959, -0.04765351, -0.008414988, -0.019625656, -0.031051427, 0.08809011, 0.03498049, 0.028374258, 0.014493979, -0.048333466, -0.0127950655, -0.009906523, -0.04418479, 0.02338317, 0.013540955, -0.025749601, -0.001509237, 0.004667368, -0.010027624, -0.09683784, -0.0074271015, 0.031031735, 0.06552573, 0.0011700807, 0.027665097, 0.0025431935, -0.010171209, -0.03302758, -0.049705345, -0.0005498426, -0.019176159, 0.010525753, 0.019365923, -0.025372038, -0.0262662, -0.06266142, 0.015043414, 0.019883644, -0.05477573, -0.013528351, 0.060502782, 0.0016651365, -0.02587618, -0.012565702, -0.0085338, -0.034005895, -0.030409258, 0.0129748965, 0.0174038, -0.0072504054, 0.0035223616, 0.010577307, 0.044128217, 0.0141861085, 0.026956914, -0.023149395, -0.046100385, -0.004252346, -0.019334903, 0.011459365, -0.022140006, -0.018958053, 0.00767007, 9.469797e-05, -0.034521237, -0.0029992084, 0.017002644, -0.03857146, 0.018912727, -0.09876343, 0.019118682, 0.013727099, -0.025606116, 0.006697321, 0.016532153, -0.06600049, -0.022878097, -0.012504256, -0.010020266, 0.0018482135, 0.035317346, 0.023673993, 0.040592246, -0.016732255, 0.0454684, -0.017790614, -0.0085586775, 0.026683826, 0.013783821, 0.053053964, -0.008992355, 0.030399311, -0.020832758, -0.022222932, 0.034638535, 0.011332447, 0.017604848, -0.028097544, -0.06297504, 0.014055168, 0.0067813946, 0.011903417, 0.0060141636, 0.015707646, 0.0342147, 0.04133136, -0.026782503, -0.0021297182, 0.021704596, 0.0067510046, 0.049061943, -0.017108439, -0.018697355, 0.046567168, 0.033586267, -0.03464465, 0.011004962, 0.030477911, 0.04260684, 0.02525125, 0.003433386, -0.0068764673, 0.061720237, -0.008662938, 0.00020904119, -0.022943163, -0.005221573, -0.0053868224, -0.087346174, 0.026180565, -0.066882506, -0.043699328, -0.03379622, -0.01599642, -0.015535398, 0.03331518, 0.012356143, 0.0036131523, 0.0097709345, 0.0034276696, 0.04864022, 0.036749244, -0.036260612, -0.004460548, 0.0006129405, 0.03265899, -0.0072730454, -0.08008531, -0.005295228, 0.015160056, 0.019982748, 0.03755122, -0.008657462, -0.061977796, 0.048145417, 0.029669765, -0.00093363423, 0.021445815, 0.004024409, -0.016229128, -0.004541855, 0.023112899, 0.039444055, -0.0069418466, 0.036537692, -0.0005684492, 0.01649976, -0.007558249, -0.0016717192, 0.026119782, -0.015853805, -0.007098712, 0.0032465474, -0.0572105, -0.02998347, -0.007961127, 0.020138677, 0.02082604, 0.036894556, 0.016602177, 0.00528833, 0.038105793, 0.0059311558, 0.004846056, -0.006694053, -0.029141342, -0.029799981, -0.04140565, -0.016081609, 0.00789425, -0.027987724, 0.0018632964, 0.0016470893, -0.003178147, 0.0029932358, -0.044273306, 0.009340824, -0.089985475, 0.04410994, -0.0061103003, 0.015524098, -0.021418516, 0.003967481, 0.0336457, 0.047461215, -0.014298582, -0.0031822163, -0.0062466552, -0.006869331, -0.02357861, -0.012142815, -0.011450043, -0.027151404, -0.0066985073, 0.022578882, 0.023353761, 0.016418545, 0.0024721217, -0.011998047, -0.0015260611, -0.04206061, 0.00632177, -0.024579424, -0.011868283, -0.03499283, -0.006257664, 0.0391778, 0.016695738, 0.014413746, -0.030029336, 0.0053191343, 0.022528451, -0.031708412, 0.025951825, -0.03107221, 0.03250863, 0.0067419275, 0.004386547, -0.014997875, -0.0143616125, 0.061790902, 0.024747757, 0.009407722, -0.012400008, -0.019415641, -0.02699906, -0.018273393, -0.0034985887, -0.0027711177, -0.016569616, -0.04723437, -0.04612775, 0.013592889, 0.12101954, 0.0021926097, 0.022482758, 0.082998626, -0.00877125, 0.001825291, 0.052395027, -0.0204819, -0.033035766, 0.042189624, -0.008924477, -0.021261735, -0.0033142276, 0.00649192, -0.008119222, -0.023724996, 0.035766765, 0.00929841, 0.0029688273, -0.022010954, 0.054030456, 0.026407681, 0.040694404, 0.03257478, -0.007874122, 0.015783455, -0.09610485, -0.02426855, -0.076495945, -0.016188657, 0.026636012, 0.01572097, 0.028501688, -0.020508016, 0.023900539, 0.006957213, 0.028514054, -0.00770535, -0.026031202, 0.019580295, 0.0080894185, -0.058947135, -0.038718473, -0.031121874, -0.07335459, 0.019822553, 0.013191584, 0.015294253, -0.023202296, -0.029736523, -0.0038419992, 0.018930998, 0.021007804, -0.04660817, -0.009053059, 0.03631448, -0.017124599, 0.004365605, -0.051075947, -0.012290755, 0.07362776, 0.047026146, 0.003133233, -0.0045102932, 0.046650674, 0.024756335, -0.006512382, -0.075702764, -0.0015884327, 0.013005683, -0.0050416673, 0.012466058, -0.00031125703, 0.011988929, -0.012687706, 0.004293034, 0.052573267
embedding_scope=clip start_offset_sec=6.0 end_offset_sec=12.0
embeddings: -0.056660935, 0.012404642, 0.010516968, -0.00093884545, 0.0086998055, -0.0025733735, 0.016387483, 0.015893865, 0.0034511834, -0.004281931, -0.006466366, -0.019368403, -0.051614784, -0.0031998728, -0.011963539, -0.02690788, -0.039418392, -0.11833265, -0.005665065, -0.013550856, -0.00074696465, 0.012443754, -0.012427208, -0.00051751436, -0.0052794116, 0.026714899, 0.017209256, -0.017349835, -0.008199193, -0.04318936, 0.035997346, 0.01600301, -0.017482292, -0.007339179, -0.05208761, 0.038954847, -0.057867892, -0.018801412, 0.03408653, -0.01998978, -0.009385402, 0.014813972, -0.025134245, -0.052713163, -0.049821, 0.038113117, 0.017636914, 0.048139486, -0.02448901, -0.017868968, 0.030549617, 0.06054612, 0.011247972, -0.04252146, 0.0021909985, -0.027436426, 0.013664176, -0.022347294, 0.00875328, 0.062616654, -0.019922007, -0.011863954, 0.023135249, 0.01980591, -0.01960893, 0.0070619737, 0.041647505, -0.044827297, -0.014553004, -0.018921282, 0.026500626, -0.025437277, 0.0026526218, -0.003936665, 0.026480218, -0.032216717, 0.031883318, -0.0004944528, 0.0009599415, -0.01368953, -0.0007075364, 0.064601265, -0.030819392, 0.014898372, 0.021727707, 0.0061104423, 0.0065117367, 0.03289097, 0.0064417073, -0.01300283, -0.06654073, -0.00021889686, -0.011237311, -0.033814922, 0.016427465, -0.020641265, -0.09371794, -0.024231277, -0.0031388518, -0.037647773, -0.013465488, 0.027814487, -0.032645352, 0.012493194, -0.011203385, 0.052792292, -0.0101286555, -0.017759966, -0.028125921, -0.0027015388, -0.00934416, -0.013294947, -0.005938772, -0.016740767, 0.04305644, 0.022773515, 0.025048487, -0.012896692, 0.038451605, 0.042484105, 0.013667306, -0.0037407973, -0.017424976, 0.029147083, 0.011601818, -0.025789184, 0.0043391297, -0.010719042, 0.013017534, 0.06500369, -0.018867178, -0.0036695974, 0.058988005, -0.012371591, 0.03191226, 0.030460529, -0.055438045, 0.04604555, 0.045597814, -0.02465621, 0.03467527, -0.07024937, -0.01848823, 0.000689496, 0.000113324124, 0.024605317, -0.0028420717, 0.024274848, -0.020952135, -0.03647721, 0.03788665, -0.052432857, -0.039017823, 0.03088968, -0.046907075, 0.06985772, -0.011705989, 0.032674998, -0.06304823, -0.0063004154, 0.0006747727, -0.015038574, -0.031759035, -0.0011318618, 0.02782094, -0.042156674, 0.042854473, -0.034096763, -0.011301275, 0.023131039, 0.0013184083, -0.018450076, 0.02040353, -0.056134555, -0.00030827284, -0.026325664, -0.021885892, -0.019655183, 0.0006141199, 0.02070665, -0.028610462, -0.04566834, 0.0052189855, 0.014729072, -0.029080633, 0.030149844, -0.006077713, -0.021174561, -0.009087599, -0.034425586, 0.0230076, 0.0359926, -0.033901397, -0.009203791, -0.050603844, 0.006576507, -0.041400068, -0.018291358, 0.054337356, -0.036963493, 0.02636185, 0.022956613, -0.024251623, 0.062581144, -0.037448056, -0.020300142, -0.0046395785, -0.0032438033, -0.06046089, -0.022855973, -0.013825028, 0.0205165, -0.0082748365, -0.028363029, -0.00106036, -0.015736133, -0.013517879, 0.041836496, 0.061580572, 0.038242243, 0.00833758, 0.013169224, 0.005033896, 0.014842161, -0.027733538, -0.064603694, 0.01722026, -0.0155170355, 0.09125607, -0.01535287, 0.0013972761, -0.023593977, 0.0069152433, -0.048888054, -0.05482296, -0.014274427, 0.0046043363, 0.009029521, -0.008222105, 0.015470353, -0.08051393, 0.04553721, 0.017731542, -0.039939214, 0.06850139, -0.0146492245, -0.07327384, -0.07711347, 0.037339073, -0.011630062, 0.005641106, 0.0031979205, -0.007038368, 0.12106079, -0.07067061, -0.023051316, -0.0093792975, -0.006118774, 0.021288082, -0.015120192, 0.030503295, 0.04142604, 0.011529417, -0.028977238, -0.019051952, -0.019809771, 0.034954425, 0.02803271, -0.034652594, -0.0006320712, -0.0042453897, -0.0017619969, -0.044876516, -0.02287808, -0.04642171, -0.029638821, -0.01548991, 0.06395139, 0.015927965, -0.04237836, -0.07588227, 0.01475784, 0.018081285, 0.03789092, 0.0050990004, 0.0018714668, 0.009103881, 0.0886874, 0.061592996, 0.043674517, 0.014378193, 0.04093822, 0.01244974, 0.00936568, 0.016787281, 0.010840588, -0.045375004, -0.0047945343, -0.0042929994, -0.031251274, -0.012674497, -0.009486277, -0.008835702, -0.007289819, 0.017196216, 0.045500524, 0.021789022, 0.0029975718, -0.06623584, 0.009261824, -0.02741811, 0.031665243, 0.002905237, 0.012956279, -0.021821702, -0.01923851, -0.012395375, 0.01554841, 0.012655268, -0.06859221, 0.052681718, -0.024511853, 0.031184098, 0.037980817, -0.019301796, -0.036686536, -0.013101815, 0.005080814, -0.011119385, -0.01001249, -0.0030392613, 0.013253054, 0.04378488, 0.048204992, -0.045675583, -0.016045501, -0.01625652, 0.004139735, 0.002699377, -0.02068061, -0.009315064, 0.0131908795, -0.0091295615, -0.03562678, -0.02272555, -0.07163642, -0.036941964, -0.048347075, -0.019444441, 0.0136108855, 0.02835401, -0.021808427, -0.055820815, 0.004839125, -0.011180203, -0.09977746, -0.028962864, -0.034182996, -0.0012941954, 0.009394035, -0.0053287707, 0.045311585, -0.003141131, -0.032659505, -0.02722844, 0.052112725, 0.018436993, -0.042591438, -0.006721756, 0.059041828, -0.0017921152, 0.08251532, 0.040004764, -0.025191851, 0.04940727, -0.005405393, 0.039274212, -0.043915443, -0.03668858, -0.022961384, -0.030028058, -0.005008022, 0.0033394461, -0.041860335, 0.03878991, 0.003469887, -0.01141805, 0.044105064, 0.026536567, -0.0056668115, 0.016437704, -0.010211656, 0.05028614, 0.013121111, 0.013905005, 0.018009383, 0.012097787, 0.034888804, -0.028401893, 0.026224334, -0.013500259, -0.0019519281, -0.014006458, -0.059003655, 0.020516085, -0.021466667, 0.016503446, 0.09099702, -0.0056832833, -0.0006107868, -0.04976512, -0.00010989403, -0.026924135, 0.055362523, -0.061015766, -0.0023945298, -0.03665704, -0.024805518, 0.009064307, -0.009223196, 0.0022333034, 0.03635371, -0.017433109, 0.013475683, -0.01760386, 0.031249138, 0.047919393, 0.038509503, 0.007032583, 0.033153474, -0.04230279, -0.021608075, -0.025975838, 0.01389431, 0.009128065, 0.011768642, -0.002186707, -0.026543546, -0.0086131245, -0.02242988, -0.0687476, 0.009856818, -0.015746173, -0.016637735, 0.0005705271, 0.024691844, -0.03251502, 0.020087313, 0.014232069, -0.016009726, -0.006445031, 0.007115338, -0.013421884, -0.011926281, -0.014854418, 0.0239574, 0.024984011, 0.014876168, -0.010396088, 0.022401925, 0.046337865, -0.016540593, 0.0164257, 0.00394545, -0.0150380125, 0.013583637, -0.10124906, -0.064455576, -0.03141789, 0.035054337, 0.028386896, 0.004204253, 0.011829532, 0.02478991, -0.04755784, 0.0439438, 0.0017919606, -0.045726575, -0.023287753, -0.026579496, -0.011346556, -0.014527791, -0.033514455, 0.013494312, 0.016073113, -0.027106509, -0.023273835, -0.016112357, -0.008579013, -0.02428755, -0.010357142, 0.018237015, -0.0070406045, -0.018339142, 0.021764139, 0.017714463, -0.03418862, 0.017639738, -0.022499643, 0.029555373, 0.079882935, 0.022322737, 0.004299808, -0.018269101, -0.028701017, 0.032192957, -0.029390981, 0.013356389, 0.029344274, -0.0019453801, 0.049495876, 0.0019849963, 0.026337622, 0.017314045, 0.0070061237, 0.005187323, -0.0137795275, 0.033883695, -0.0035259482, 0.015246666, -0.032829646, 0.039291617, 0.02960346, 0.030412346, 0.0020991755, 0.018198662, 0.008641462, -0.018485023, 0.0030894948, -0.027293788, 0.022300238, -0.058137223, -0.028246233, 0.03284102, -0.031997535, 0.045731608, -0.015819594, 0.024735698, -0.018870575, 0.024020026, 0.019374821, -0.011652156, -0.011854041, 0.0043600705, -0.018832149, 0.024255238, -0.023412494, 0.03500238, 0.013180098, -0.007709522, 0.00015006313, -0.036496464, -0.0048533403, 0.0022645479, -0.011134513, -0.0034151033, -0.0038836184, 0.061047018, 0.017696029, 0.011744912, 0.0044538556, -0.018883685, 0.023539556, -0.050303698, 0.017903235, 0.027289767, -0.017299367, 0.019036047, -0.023070892, 0.031329237, -0.0467052, -0.01832334, -0.0061969114, 0.053643227, 0.011057499, 0.053835317, 0.042121142, -0.00878989, 0.0033145966, 0.0035813637, -0.013886137, -0.007039252, 0.006298343, -0.036826927, -0.004869338, 0.0054129725, 0.01769644, 0.02160994, -0.03296566, -0.0349183, -0.03887728, 0.014361224, -0.0035984577, 0.035280466, 0.033338513, 0.010048492, 0.017577838, 0.02725244, -0.017758809, 0.020583706, -0.0038836712, -0.034508932, 0.0032492536, 0.011589666, 0.051838614, -0.04259455, -0.02256403, -0.035800967, 0.027530605, 0.0016798878, -0.087005556, -0.07388417, -0.002018561, -0.0270712, -0.017610338, -0.008781626, -0.020558603, 0.041503284, -0.03491547, -0.034392484, -0.010896433, 0.0069597512, -0.016921425, -0.0061368984, 0.0069812415, -0.007965713, 0.029191907, 0.006575424, 0.013407991, -0.03198607, 0.010523658, -0.049526904, -0.011662901, 0.027468782, 0.020904088, 0.07747015, 0.010516555, 0.022334538, -0.035612606, 0.011651608, -0.020710541, 0.03151908, -0.0039047094, -0.00418744, 0.031337414, -0.06217018, -0.022666646, 0.060897287, -0.062601775, -0.00014024622, 0.014769643, -0.010227884, -0.007969433, 0.03157857, 0.030731507, -0.04907384, -0.011611797, -0.010440706, 2.1065402e-05, 0.02105151, 0.054592855, 0.017612452, 0.03309195, 0.008225182, -0.016881688, -0.008934213, -0.0081509035, 0.033990335, 0.0038010643, -0.004569831, -0.048775576, 0.009852644, -0.0017523167, -0.029179716, 0.029743088, 0.042331748, 0.02538597, 0.043883543, -0.026510017, -0.03759798, -0.010928473, 0.0034099314, -0.025714157, 0.056502447, -0.010226132, 0.019617345, -0.037729684, 0.0017710805, 0.023072615, -0.010584015, -0.0005398036, 0.0042973, -0.019213337, 0.00211817, 0.0063980836, -0.03498346, -0.026814086, 0.0032334102, -0.043546353, 0.05435514, 0.046686023, -0.0005336676, -0.0027849048, -0.037102636, -0.018941553, -0.008316227, -0.025928384, 0.02424551, 0.029906292, -0.007293937, 0.01938472, -0.0027404078, 0.017654605, -0.09760228, 0.017483607, 0.039121926, 0.055576038, 0.003990553, 0.055780347, -0.012954607, -0.020561814, -0.023411607, -0.029890792, -0.0013863938, -0.005076044, 0.016931064, 0.016423794, -0.004530942, -0.029941667, -0.07179528, 0.0133429235, -0.011282463, -0.056124553, -0.0043646605, 0.0720466, 0.013583981, -0.017977687, -0.015142899, 0.009003499, -0.0060013626, -0.027904175, 0.012186907, -0.007893264, -0.022160174, -0.010001998, -0.018164374, 0.028215116, 0.0104656685, 0.022874147, -0.019549778, -0.062400453, 0.0012185341, -0.015859775, 0.0017035545, -0.01638896, -0.020812662, 0.01874824, -0.0017510047, -0.045450535, 0.0027217418, 0.028401012, -0.025394604, 0.010469947, -0.08416052, 0.012370591, 0.01467967, -0.05029511, 0.024251617, 0.021148317, -0.07545196, -0.032129608, -0.017843928, 0.009638263, 0.017060166, 0.054145224, 0.018223658, 0.023853136, -0.017277373, 0.016393727, -0.024546377, -0.006988847, 0.02687102, -0.0045382846, 0.059870843, -0.014783479, 0.04010051, -0.0015071994, -0.013808805, 0.035051122, 0.029261632, 0.023400426, -0.013374713, -0.058852505, -0.0037170097, 0.019820657, 0.017602902, -0.0015267475, 0.0191677, 0.016050717, 0.05606553, -0.020963565, -0.031317975, 0.024616065, 0.006976756, 0.03177719, -0.046614904, -0.030181205, 0.012943135, 0.053334575, -0.04046304, 0.0030235092, 0.014948875, 0.04036093, 0.02837773, 0.005293814, 0.00063075504, 0.070272826, 0.006497669, 0.010854375, -0.013619698, -0.025011186, 0.0033844714, -0.08806444, 0.042138666, -0.06902466, -0.06205779, -0.017915884, -0.016522579, -0.012898309, 0.034982704, 0.027533635, -0.0074755675, 0.0134802135, 0.004335894, 0.03324722, 0.03356172, -0.03412009, -0.009772126, 0.0242637, 0.032884363, -0.006312623, -0.05573378, 0.0022431433, 0.026194429, -0.013557011, 0.01889382, -0.00037165228, -0.057675943, 0.049582865, 0.0233206, -0.014952175, 0.044115793, 0.008010276, -0.011729247, 0.0074453084, 0.037317175, 0.023880554, 0.021370227, 0.02038597, -0.016131042, 0.0076988325, -0.01574941, 0.022204785, 0.050007813, 0.0047394284, -0.03625685, -0.0057697, -0.06532559, -0.025645023, 0.021574195, 0.03991222, 0.0069006914, 0.054759935, 0.012230677, 0.009231788, 0.034160607, 0.0037187468, 0.013506122, -0.000956736, -0.014294036, -0.04759722, -0.036271326, -0.044466056, -0.00081875577, -0.030495279, 0.0046069324, 0.0036042503, 0.027811747, -0.015174587, -0.0045109354, 0.0017800259, -0.10100491, 0.061891302, -0.021989409, -0.006155581, -0.0060171243, 0.003865466, 0.04553787, 0.03986641, -0.015748613, -0.018323058, -0.012783008, -0.0037289886, -0.0040913397, 0.004084354, 0.0041083554, -0.023849016, -0.0017146992, 0.0042298003, 0.029894572, -0.00961207, -0.013214912, 0.0013984867, 0.0051161214, -0.052154973, 0.016993212, -0.01444121, 0.0039300914, -0.017901292, -0.014591564, 0.027849289, -0.00040657257, 0.0150923915, -0.028917307, 0.0312674, 0.028737936, -0.029173946, 0.020644082, -0.050919734, 0.015170177, -0.008805154, 0.007898957, -0.03270724, 0.009503924, 0.045991424, 0.009086248, 0.0054868716, -0.017317738, -0.029379232, -0.020489942, -0.0036019566, -0.0069658807, -0.001465238, -0.023492685, -0.033500258, -0.05405845, 0.029939195, 0.13187087, 0.013011877, 0.032444917, 0.09735872, 0.005575083, 0.0070292703, 0.038570277, -0.011643986, -0.028315935, 0.016576415, -0.038574997, 0.018461168, -0.009060153, -0.0012812358, -0.0022609404, -0.008238538, 0.029758433, -0.01654842, -0.0071691363, -0.0175694, 0.037836462, 0.03513777, 0.047484823, 0.026186338, 0.0064433757, 0.009613315, -0.1035406, -0.013866963, -0.06493805, -0.0091921305, 0.033803653, -0.019089116, 0.025566632, -0.026866881, 0.034967337, 0.0144037735, 0.018249659, -0.020732742, -0.021970572, 0.022675958, 0.0037169165, -0.047529835, -0.025448162, -0.022863593, -0.055193644, -0.011355122, 0.012357057, -6.422415e-05, -0.015012987, -0.045862094, 0.0011096236, 0.009990376, -0.011129824, -0.041757587, -0.017860932, 0.025908416, -0.003553186, 0.020813404, -0.05974124, -0.0090143755, 0.07557064, 0.054220412, 0.0025323199, -0.009612669, 0.025730725, 0.011319844, 0.009119236, -0.06911808, -0.011830078, 0.0059598847, 0.0033042065, 0.021314258, -0.008423276, -0.0045200516, 0.0062271697, 0.008869475, 0.058885608
```



### はじめてのDatabricks

[はじめてのDatabricks](https://qiita.com/taka_yayoi/items/8dc72d083edb879a5e5d)

### Databricks無料トライアル

[Databricks無料トライアル](https://databricks.com/jp/try-databricks)