You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to quickly launch a Kafka cluster on GCE. See [here](
39
+
../../../README.md#kafka) for more context around using Kafka
40
+
with Dataflow.
41
+
42
+
A hosted model on Vertex AI is needed before being able to use
43
+
the Vertex AI model handler. One of the current state-of-the-art
44
+
NLP models is HuggingFace's DistilBERT, a distilled version of
45
+
BERT model and is faster at inference. To deploy DistilBERT on
46
+
Vertex AI, run this [notebook](
47
+
https://github.com/GoogleCloudPlatform/vertex-ai-samples/blob/main/notebooks/community/model_garden/model_garden_huggingface_pytorch_inference_deployment.ipynb) in Colab Enterprise.
48
+
49
+
BigQuery is the pipeline's sink for the inference result output.
50
+
A BigQuery dataset needs to exist first before the pipeline can
51
+
create/write to a table. Run the following command to create
52
+
a BigQuery dataset:
53
+
54
+
```sh
55
+
bq --location=us-central1 mk \
56
+
--dataset DATASET_ID
57
+
```
58
+
See also [here](
59
+
https://cloud.google.com/bigquery/docs/datasets) for more details on
60
+
how to create BigQuery datasets
61
+
62
+
The pipeline first reads the YouTube comments .csv dataset from
63
+
GCS bucket and performs some clean-up before writing it to a Kafka
64
+
topic. The pipeline then reads from that Kafka topic and applies
65
+
various transformation logic before `RunInference` transform performs
66
+
remote inference with the Vertex AI model handler and DistilBERT
67
+
deployed to a Vertex AI endpoint. The inference result is then
68
+
parsed and written to a BigQuery table.
69
+
70
+
Run the pipeline (replace with appropriate variables in the command
0 commit comments