ailexej commited on
Commit
e39a070
·
verified ·
1 Parent(s): 579f9c2

Add new SentenceTransformer model.

Browse files
Files changed (3) hide show
  1. README.md +379 -400
  2. config.json +1 -1
  3. config_sentence_transformers.json +3 -3
README.md CHANGED
@@ -12,103 +12,68 @@ tags:
12
  - loss:MultipleNegativesRankingLoss
13
  base_model: Snowflake/snowflake-arctic-embed-m-v1.5
14
  widget:
15
- - source_sentence: Where can I find older versions of ZenML documentation?
16
  sentences:
17
- - '🧙Installation
18
-
19
-
20
- Installing ZenML and getting started.
21
-
22
-
23
- ZenML is a Python package that can be installed directly via pip:
24
-
25
-
26
- pip install zenml
27
-
28
-
29
- Note that ZenML currently supports Python 3.8, 3.9, 3.10, and 3.11. Please make
30
- sure that you are using a supported Python version.
31
-
32
-
33
- Install with the dashboard
34
-
35
-
36
- ZenML comes bundled with a web dashboard that lives inside a sister repository.
37
- In order to get access to the dashboard locally, you need to launch the ZenML
38
- Server and Dashboard locally. For this, you need to install the optional dependencies
39
- for the ZenML Server:
40
-
41
-
42
- pip install "zenml[server]"
43
-
44
-
45
- We highly encourage you to install ZenML in a virtual environment. At ZenML, We
46
- like to use virtualenvwrapper or pyenv-virtualenv to manage our Python virtual
47
- environments.
48
-
49
-
50
- Installing onto MacOS with Apple Silicon (M1, M2)
51
-
52
-
53
- A change in how forking works on Macs running on Apple Silicon means that you
54
- should set the following environment variable which will ensure that your connections
55
- to the server remain unbroken:
56
-
57
-
58
- export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
59
-
60
-
61
- You can read more about this here. This environment variable is needed if you
62
- are working with a local server on your Mac, but if you''re just using ZenML as
63
- a client / CLI and connecting to a deployed server then you don''t need to set
64
- it.
65
 
66
 
67
- Nightly builds
 
 
68
 
69
 
70
- ZenML also publishes nightly builds under the zenml-nightly package name. These
71
- are built from the latest develop branch (to which work ready for release is published)
72
- and are not guaranteed to be stable. To install the nightly build, run:
73
 
74
 
75
- pip install zenml-nightly
76
 
77
 
78
- Verifying installations
 
79
 
80
 
81
- Once the installation is completed, you can check whether the installation was
82
- successful either through Bash:
83
 
84
 
85
- zenml version
 
 
 
 
86
 
87
 
88
- or through Python:
 
89
 
90
 
91
- import zenml
 
 
 
 
92
 
93
 
94
- print(zenml.__version__)
95
 
96
 
97
- If you would like to learn more about the current release, please visit our PyPi
98
- package page.
99
 
100
 
101
- Running with Docker'
102
- - 'Finetuning LLMs with ZenML
103
 
104
 
105
- Finetune LLMs for specific tasks or to improve performance and cost.
106
 
107
 
108
- PreviousEvaluating finetuned embeddingsNextSet up a project repository
109
 
110
 
111
- Last updated 6 months ago'
112
  - 'ZenML - Bridging the gap between ML & Ops
113
 
114
 
@@ -122,7 +87,7 @@ widget:
122
 
123
 
124
  Powered by GitBook'
125
- - source_sentence: How can you visualize the profiles generated by whylogs in ZenML?
126
  sentences:
127
  - 'Whylogs
128
 
@@ -181,173 +146,257 @@ widget:
181
  If you don''t need to connect to the WhyLabs platform to upload and store the
182
  generated whylogs data profiles, the Data Validator stack component does not require
183
  any configuration parameters. Adding it to a stack is as simple as running e.g.:'
184
- - "Control caching behavior\n\nBy default steps in ZenML pipelines are cached whenever\
185
- \ code and parameters stay unchanged.\n\n@step(enable_cache=True) # set cache\
186
- \ behavior at step level\ndef load_data(parameter: int) -> dict:\n ...\n\n\
187
- @step(enable_cache=False) # settings at step level override pipeline level\ndef\
188
- \ train_model(data: dict) -> None:\n ...\n\n@pipeline(enable_cache=True) #\
189
- \ set cache behavior at step level\ndef simple_ml_pipeline(parameter: int):\n\
190
- \ ...\n\nCaching only happens when code and parameters stay the same.\n\nLike\
191
- \ many other step and pipeline settings, you can also change this afterward:\n\
192
- \n# Same as passing it in the step decorator\nmy_step.configure(enable_cache=...)\n\
193
- \n# Same as passing it in the pipeline decorator\nmy_pipeline.configure(enable_cache=...)\n\
194
- \nFind out here how to configure this in a YAML file\n\nPreviousStep output typing\
195
- \ and annotationNextSchedule a pipeline\n\nLast updated 4 months ago"
196
- - "ogsDataValidatorSettings,\n)\nfrom zenml import step@step(\n settings={\n\
197
- \ \"data_validator\": WhylogsDataValidatorSettings(\n enable_whylabs=True,\
198
- \ dataset_id=\"model-1\"\n )\n }\n)\ndef data_loader() -> Tuple[\n \
199
- \ Annotated[pd.DataFrame, \"data\"],\n Annotated[DatasetProfileView, \"profile\"\
200
- ]\n]:\n \"\"\"Load the diabetes dataset.\"\"\"\n X, y = datasets.load_diabetes(return_X_y=True,\
201
- \ as_frame=True)\n\n# merge X and y together\n df = pd.merge(X, y, left_index=True,\
202
- \ right_index=True)\n\nprofile = why.log(pandas=df).profile().view()\n return\
203
- \ df, profile\n\nHow do you use it?\n\nWhylogs's profiling functions take in a\
204
- \ pandas.DataFrame dataset generate a DatasetProfileView object containing all\
205
- \ the relevant information extracted from the dataset.\n\nThere are three ways\
206
- \ you can use whylogs in your ZenML pipelines that allow different levels of flexibility:\n\
207
- \ninstantiate, configure and insert the standard WhylogsProfilerStep shipped with\
208
- \ ZenML into your pipelines. This is the easiest way and the recommended approach,\
209
- \ but can only be customized through the supported step configuration parameters.\n\
210
- \ncall the data validation methods provided by the whylogs Data Validator in your\
211
- \ custom step implementation. This method allows for more flexibility concerning\
212
- \ what can happen in the pipeline step, but you are still limited to the functionality\
213
- \ implemented in the Data Validator.\n\nuse the whylogs library directly in your\
214
- \ custom step implementation. This gives you complete freedom in how you are using\
215
- \ whylogs's features.\n\nYou can visualize whylogs profiles in Jupyter notebooks\
216
- \ or view them directly in the ZenML dashboard.\n\nThe whylogs standard step"
217
- - source_sentence: How can I build my own custom experiment tracker flavor in ZenML?
218
  sentences:
219
- - "e details of the deployment process from the user.It needs to act as a ZenML\
220
- \ BaseService registry, where every BaseService instance is used as an internal\
221
- \ representation of a remote model server (see the find_model_server abstract\
222
- \ method). To achieve this, it must be able to re-create the configuration of\
223
- \ a BaseService from information that is persisted externally, alongside, or even\
224
- \ as part of the remote model server configuration itself. For example, for model\
225
- \ servers that are implemented as Kubernetes resources, the BaseService instances\
226
- \ can be serialized and saved as Kubernetes resource annotations. This allows\
227
- \ the model deployer to keep track of all externally running model servers and\
228
- \ to re-create their corresponding BaseService instance representations at any\
229
- \ given time. The model deployer also defines methods that implement basic life-cycle\
230
- \ management on remote model servers outside the coverage of a pipeline (see stop_model_server\
231
- \ , start_model_server and delete_model_server).\n\nPutting all these considerations\
232
- \ together, we end up with the following interface:\n\nfrom abc import ABC, abstractmethod\n\
233
- from typing import Dict, List, Optional, Type\nfrom uuid import UUID\n\nfrom zenml.enums\
234
- \ import StackComponentType\nfrom zenml.services import BaseService, ServiceConfig\n\
235
- from zenml.stack import StackComponent, StackComponentConfig, Flavor\n\nDEFAULT_DEPLOYMENT_START_STOP_TIMEOUT\
236
- \ = 300\n\nclass BaseModelDeployerConfig(StackComponentConfig):\n \"\"\"Base\
237
- \ class for all ZenML model deployer configurations.\"\"\"\n\nclass BaseModelDeployer(StackComponent,\
238
- \ ABC):\n \"\"\"Base class for all ZenML model deployers.\"\"\"\n\n@abstractmethod\n\
239
- \ def perform_deploy_model(\n self,\n id: UUID,\n config:\
240
- \ ServiceConfig,\n timeout: int = DEFAULT_DEPLOYMENT_START_STOP_TIMEOUT,\n\
241
- \ ) -> BaseService:\n \"\"\"Abstract method to deploy a model.\"\"\""
242
- - 'Develop a custom experiment tracker
243
 
244
 
245
- Learning how to develop a custom experiment tracker.
246
 
247
 
248
- Before diving into the specifics of this component type, it is beneficial to familiarize
249
- yourself with our general guide to writing custom component flavors in ZenML.
250
- This guide provides an essential understanding of ZenML''s component flavor concepts.
251
 
252
 
253
- Base abstraction in progress!
 
254
 
255
 
256
- We are actively working on the base abstraction for the Experiment Tracker, which
257
- will be available soon. As a result, their extension is not recommended at the
258
- moment. When you are selecting an Experiment Tracker for your stack, you can use
259
- one of the existing flavors.
260
 
261
 
262
- If you need to implement your own Experiment Tracker flavor, you can still do
263
- so, but keep in mind that you may have to refactor it when the base abstraction
264
- is released.
265
 
266
 
267
- Build your own custom experiment tracker
268
 
269
 
270
- If you want to create your own custom flavor for an experiment tracker, you can
271
- follow the following steps:
272
 
273
 
274
- Create a class that inherits from the BaseExperimentTracker class and implements
275
- the abstract methods.
276
 
277
 
278
- If you need any configuration, create a class that inherits from the BaseExperimentTrackerConfig
279
- class and add your configuration parameters.
 
 
280
 
281
 
282
- Bring both the implementation and the configuration together by inheriting from
283
- the BaseExperimentTrackerFlavor class.
284
 
285
 
286
- Once you are done with the implementation, you can register it through the CLI.
287
- Please ensure you point to the flavor class via dot notation:
 
288
 
289
 
290
- zenml experiment-tracker flavor register <path.to.MyExperimentTrackerFlavor>
291
 
292
 
293
- For example, if your flavor class MyExperimentTrackerFlavor is defined in flavors/my_flavor.py,
294
- you''d register it by doing:
 
295
 
296
 
297
- zenml experiment-tracker flavor register flavors.my_flavor.MyExperimentTrackerFlavor'
298
- - "res Spark to handle the resource configuration.\"\"\"def _backend_configuration(\n\
299
- \ self,\n spark_config: SparkConf,\n step_config:\
300
- \ \"StepConfiguration\",\n ) -> None:\n \"\"\"Configures Spark to handle\
301
- \ backends like YARN, Mesos or Kubernetes.\"\"\"\n\ndef _io_configuration(\n \
302
- \ self,\n spark_config: SparkConf\n ) -> None:\n \
303
- \ \"\"\"Configures Spark to handle different input/output sources.\"\"\"\n\n\
304
- def _additional_configuration(\n self,\n spark_config: SparkConf\n\
305
- \ ) -> None:\n \"\"\"Appends the user-defined configuration parameters.\"\
306
- \"\"\n\ndef _launch_spark_job(\n self,\n spark_config: SparkConf,\n\
307
- \ entrypoint_command: List[str]\n ) -> None:\n \"\"\"Generates\
308
- \ and executes a spark-submit command.\"\"\"\n\ndef launch(\n self,\n\
309
- \ info: \"StepRunInfo\",\n entrypoint_command: List[str],\n\
310
- \ ) -> None:\n \"\"\"Launches the step on Spark.\"\"\"\n\nUnder the\
311
- \ base configuration, you will see the main configuration parameters:\n\nmaster\
312
- \ is the master URL for the cluster where Spark will run. You might see different\
313
- \ schemes for this URL with varying cluster managers such as Mesos, YARN, or Kubernetes.\n\
314
- \ndeploy_mode can either be 'cluster' (default) or 'client' and it decides where\
315
- \ the driver node of the application will run.\n\nsubmit_args is the JSON string\
316
- \ of a dictionary, which will be used to define additional parameters if required\
317
- \ ( Spark has a wide variety of parameters, thus including them all in a single\
318
- \ class was deemed unnecessary.).\n\nIn addition to this configuration, the launch\
319
- \ method of the step operator gets additional configuration parameters from the\
320
- \ DockerSettings and ResourceSettings. As a result, the overall configuration\
321
- \ happens in 4 base methods:\n\n_resource_configuration translates the ZenML ResourceSettings\
322
- \ object to Spark's own resource configuration.\n\n_backend_configuration is responsible\
323
- \ for cluster-manager-specific configuration."
324
- - source_sentence: What are the steps to configure RBAC for Spark in Kubernetes and
325
- register the stack component using ZenML?
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
  sentences:
327
- - " build to finish. More information: Build Timeout.We can register the image builder\
328
- \ and use it in our active stack:\n\nzenml image-builder register <IMAGE_BUILDER_NAME>\
329
- \ \\\n --flavor=gcp \\\n --cloud_builder_image=<BUILDER_IMAGE_NAME> \\\n\
330
- \ --network=<DOCKER_NETWORK> \\\n --build_timeout=<BUILD_TIMEOUT_IN_SECONDS>\n\
331
- \n# Register and activate a stack with the new image builder\nzenml stack register\
332
- \ <STACK_NAME> -i <IMAGE_BUILDER_NAME> ... --set\n\nYou also need to set up authentication\
333
- \ required to access the Cloud Build GCP services.\n\nAuthentication Methods\n\
334
- \nIntegrating and using a GCP Image Builder in your pipelines is not possible\
335
- \ without employing some form of authentication. If you're looking for a quick\
336
- \ way to get started locally, you can use the Local Authentication method. However,\
337
- \ the recommended way to authenticate to the GCP cloud platform is through a GCP\
338
- \ Service Connector. This is particularly useful if you are configuring ZenML\
339
- \ stacks that combine the GCP Image Builder with other remote stack components\
340
- \ also running in GCP.\n\nThis method uses the implicit GCP authentication available\
341
- \ in the environment where the ZenML code is running. On your local machine, this\
342
- \ is the quickest way to configure a GCP Image Builder. You don't need to supply\
343
- \ credentials explicitly when you register the GCP Image Builder, as it leverages\
344
- \ the local credentials and configuration that the Google Cloud CLI stores on\
345
- \ your local machine. However, you will need to install and set up the Google\
346
- \ Cloud CLI on your machine as a prerequisite, as covered in the Google Cloud\
347
- \ documentation , before you register the GCP Image Builder.\n\nStacks using the\
348
- \ GCP Image Builder set up with local authentication are not portable across environments.\
349
- \ To make ZenML pipelines fully portable, it is recommended to use a GCP Service\
350
- \ Connector to authenticate your GCP Image Builder to the GCP cloud platform."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
351
  - ' your GCP Image Builder to the GCP cloud platform.To set up the GCP Image Builder
352
  to authenticate to GCP and access the GCP Cloud Build services, it is recommended
353
  to leverage the many features provided by the GCP Service Connector such as auto-configuration,
@@ -403,76 +452,7 @@ widget:
403
  If you already have one or more GCP Service Connectors configured in your ZenML
404
  deployment, you can check which of them can be used to access generic GCP resources
405
  like the GCP Image Builder required for your GCP Image Builder by running e.g.:'
406
- - "ngs/python/Dockerfile -u 0 build\n\nConfiguring RBACAdditionally, you may need\
407
- \ to create the several resources in Kubernetes in order to give Spark access\
408
- \ to edit/manage your driver executor pods.\n\nTo do so, create a file called\
409
- \ rbac.yaml with the following content:\n\napiVersion: v1\nkind: Namespace\nmetadata:\n\
410
- \ name: spark-namespace\n---\napiVersion: v1\nkind: ServiceAccount\nmetadata:\n\
411
- \ name: spark-service-account\n namespace: spark-namespace\n---\napiVersion:\
412
- \ rbac.authorization.k8s.io/v1\nkind: ClusterRoleBinding\nmetadata:\n name: spark-role\n\
413
- \ namespace: spark-namespace\nsubjects:\n - kind: ServiceAccount\n name:\
414
- \ spark-service-account\n namespace: spark-namespace\nroleRef:\n kind: ClusterRole\n\
415
- \ name: edit\n apiGroup: rbac.authorization.k8s.io\n---\n\nAnd then execute\
416
- \ the following command to create the resources:\n\naws eks --region=$REGION update-kubeconfig\
417
- \ --name=$EKS_CLUSTER_NAME\n\nkubectl create -f rbac.yaml\n\nLastly, note down\
418
- \ the namespace and the name of the service account since you will need them when\
419
- \ registering the stack component in the next step.\n\nHow to use it\n\nTo use\
420
- \ the KubernetesSparkStepOperator, you need:\n\nthe ZenML spark integration. If\
421
- \ you haven't installed it already, run\n\nzenml integration install spark\n\n\
422
- Docker installed and running.\n\nA remote artifact store as part of your stack.\n\
423
- \nA remote container registry as part of your stack.\n\nA Kubernetes cluster deployed.\n\
424
- \nWe can then register the step operator and use it in our active stack:\n\nzenml\
425
- \ step-operator register spark_step_operator \\\n\t--flavor=spark-kubernetes \\\
426
- \n\t--master=k8s://$EKS_API_SERVER_ENDPOINT \\\n\t--namespace=<SPARK_KUBERNETES_NAMESPACE>\
427
- \ \\\n\t--service_account=<SPARK_KUBERNETES_SERVICE_ACCOUNT>\n\n# Register the\
428
- \ stack\nzenml stack register spark_stack \\\n -o default \\\n -s spark_step_operator\
429
- \ \\\n -a spark_artifact_store \\\n -c spark_container_registry \\\n \
430
- \ -i local_builder \\\n --set"
431
- - source_sentence: Where can I find older versions of ZenML documentation?
432
- sentences:
433
- - 'ZenML - Bridging the gap between ML & Ops
434
-
435
-
436
- Legacy Docs
437
-
438
-
439
- Bleeding EdgeLegacy Docs0.67.0
440
-
441
-
442
- 🧙‍♂️Find older version our docs
443
-
444
-
445
- Powered by GitBook'
446
- - 'ZenML - Bridging the gap between ML & Ops
447
-
448
-
449
- Legacy Docs
450
-
451
-
452
- Bleeding EdgeLegacy Docs0.67.0
453
-
454
-
455
- 🧙‍♂️Find older version our docs
456
-
457
-
458
- Powered by GitBook'
459
- - "tainer_registry \\\n -i local_builder \\\n --setOnce you added the step\
460
- \ operator to your active stack, you can use it to execute individual steps of\
461
- \ your pipeline by specifying it in the @step decorator as follows:\n\nfrom zenml\
462
- \ import step\n\n@step(step_operator=<STEP_OPERATOR_NAME>)\ndef step_on_spark(...)\
463
- \ -> ...:\n \"\"\"Some step that should run with Spark on Kubernetes.\"\"\"\
464
- \n ...\n\nAfter successfully running any step with a KubernetesSparkStepOperator,\
465
- \ you should be able to see that a Spark driver pod was created in your cluster\
466
- \ for each pipeline step when running kubectl get pods -n $KUBERNETES_NAMESPACE.\n\
467
- \nInstead of hardcoding a step operator name, you can also use the Client to dynamically\
468
- \ use the step operator of your active stack:\n\nfrom zenml.client import Client\n\
469
- \nstep_operator = Client().active_stack.step_operator\n\n@step(step_operator=step_operator.name)\n\
470
- def step_on_spark(...) -> ...:\n ...\n\nAdditional configuration\n\nFor additional\
471
- \ configuration of the Spark step operator, you can pass SparkStepOperatorSettings\
472
- \ when defining or running your pipeline. Check out the SDK docs for a full list\
473
- \ of available attributes and this docs page for more information on how to specify\
474
- \ settings.\n\nPreviousKubernetesNextDevelop a Custom Step Operator\n\nLast updated\
475
- \ 4 months ago"
476
  pipeline_tag: sentence-similarity
477
  library_name: sentence-transformers
478
  metrics:
@@ -502,10 +482,10 @@ model-index:
502
  type: dim_384
503
  metrics:
504
  - type: cosine_accuracy@1
505
- value: 1.0
506
  name: Cosine Accuracy@1
507
  - type: cosine_accuracy@3
508
- value: 1.0
509
  name: Cosine Accuracy@3
510
  - type: cosine_accuracy@5
511
  value: 1.0
@@ -514,10 +494,10 @@ model-index:
514
  value: 1.0
515
  name: Cosine Accuracy@10
516
  - type: cosine_precision@1
517
- value: 1.0
518
  name: Cosine Precision@1
519
  - type: cosine_precision@3
520
- value: 0.3333333333333333
521
  name: Cosine Precision@3
522
  - type: cosine_precision@5
523
  value: 0.2
@@ -526,10 +506,10 @@ model-index:
526
  value: 0.1
527
  name: Cosine Precision@10
528
  - type: cosine_recall@1
529
- value: 1.0
530
  name: Cosine Recall@1
531
  - type: cosine_recall@3
532
- value: 1.0
533
  name: Cosine Recall@3
534
  - type: cosine_recall@5
535
  value: 1.0
@@ -538,13 +518,13 @@ model-index:
538
  value: 1.0
539
  name: Cosine Recall@10
540
  - type: cosine_ndcg@10
541
- value: 1.0
542
  name: Cosine Ndcg@10
543
  - type: cosine_mrr@10
544
- value: 1.0
545
  name: Cosine Mrr@10
546
  - type: cosine_map@100
547
- value: 1.0
548
  name: Cosine Map@100
549
  - task:
550
  type: information-retrieval
@@ -554,10 +534,10 @@ model-index:
554
  type: dim_256
555
  metrics:
556
  - type: cosine_accuracy@1
557
- value: 0.75
558
  name: Cosine Accuracy@1
559
  - type: cosine_accuracy@3
560
- value: 1.0
561
  name: Cosine Accuracy@3
562
  - type: cosine_accuracy@5
563
  value: 1.0
@@ -566,10 +546,10 @@ model-index:
566
  value: 1.0
567
  name: Cosine Accuracy@10
568
  - type: cosine_precision@1
569
- value: 0.75
570
  name: Cosine Precision@1
571
  - type: cosine_precision@3
572
- value: 0.3333333333333333
573
  name: Cosine Precision@3
574
  - type: cosine_precision@5
575
  value: 0.2
@@ -578,10 +558,10 @@ model-index:
578
  value: 0.1
579
  name: Cosine Precision@10
580
  - type: cosine_recall@1
581
- value: 0.75
582
  name: Cosine Recall@1
583
  - type: cosine_recall@3
584
- value: 1.0
585
  name: Cosine Recall@3
586
  - type: cosine_recall@5
587
  value: 1.0
@@ -590,13 +570,13 @@ model-index:
590
  value: 1.0
591
  name: Cosine Recall@10
592
  - type: cosine_ndcg@10
593
- value: 0.9077324383928644
594
  name: Cosine Ndcg@10
595
  - type: cosine_mrr@10
596
- value: 0.875
597
  name: Cosine Mrr@10
598
  - type: cosine_map@100
599
- value: 0.875
600
  name: Cosine Map@100
601
  - task:
602
  type: information-retrieval
@@ -606,10 +586,10 @@ model-index:
606
  type: dim_128
607
  metrics:
608
  - type: cosine_accuracy@1
609
- value: 0.75
610
  name: Cosine Accuracy@1
611
  - type: cosine_accuracy@3
612
- value: 1.0
613
  name: Cosine Accuracy@3
614
  - type: cosine_accuracy@5
615
  value: 1.0
@@ -618,10 +598,10 @@ model-index:
618
  value: 1.0
619
  name: Cosine Accuracy@10
620
  - type: cosine_precision@1
621
- value: 0.75
622
  name: Cosine Precision@1
623
  - type: cosine_precision@3
624
- value: 0.3333333333333333
625
  name: Cosine Precision@3
626
  - type: cosine_precision@5
627
  value: 0.2
@@ -630,10 +610,10 @@ model-index:
630
  value: 0.1
631
  name: Cosine Precision@10
632
  - type: cosine_recall@1
633
- value: 0.75
634
  name: Cosine Recall@1
635
  - type: cosine_recall@3
636
- value: 1.0
637
  name: Cosine Recall@3
638
  - type: cosine_recall@5
639
  value: 1.0
@@ -642,13 +622,13 @@ model-index:
642
  value: 1.0
643
  name: Cosine Recall@10
644
  - type: cosine_ndcg@10
645
- value: 0.9077324383928644
646
  name: Cosine Ndcg@10
647
  - type: cosine_mrr@10
648
- value: 0.875
649
  name: Cosine Mrr@10
650
  - type: cosine_map@100
651
- value: 0.875
652
  name: Cosine Map@100
653
  - task:
654
  type: information-retrieval
@@ -658,10 +638,10 @@ model-index:
658
  type: dim_64
659
  metrics:
660
  - type: cosine_accuracy@1
661
- value: 0.75
662
  name: Cosine Accuracy@1
663
  - type: cosine_accuracy@3
664
- value: 1.0
665
  name: Cosine Accuracy@3
666
  - type: cosine_accuracy@5
667
  value: 1.0
@@ -670,10 +650,10 @@ model-index:
670
  value: 1.0
671
  name: Cosine Accuracy@10
672
  - type: cosine_precision@1
673
- value: 0.75
674
  name: Cosine Precision@1
675
  - type: cosine_precision@3
676
- value: 0.3333333333333333
677
  name: Cosine Precision@3
678
  - type: cosine_precision@5
679
  value: 0.2
@@ -682,10 +662,10 @@ model-index:
682
  value: 0.1
683
  name: Cosine Precision@10
684
  - type: cosine_recall@1
685
- value: 0.75
686
  name: Cosine Recall@1
687
  - type: cosine_recall@3
688
- value: 1.0
689
  name: Cosine Recall@3
690
  - type: cosine_recall@5
691
  value: 1.0
@@ -694,19 +674,19 @@ model-index:
694
  value: 1.0
695
  name: Cosine Recall@10
696
  - type: cosine_ndcg@10
697
- value: 0.9077324383928644
698
  name: Cosine Ndcg@10
699
  - type: cosine_mrr@10
700
- value: 0.875
701
  name: Cosine Mrr@10
702
  - type: cosine_map@100
703
- value: 0.875
704
  name: Cosine Map@100
705
  ---
706
 
707
  # zenml/finetuned-snowflake-arctic-embed-m-v1.5
708
 
709
- This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Snowflake/snowflake-arctic-embed-m-v1.5](https://huggingface.co/Snowflake/snowflake-arctic-embed-m-v1.5) on the json dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
710
 
711
  ## Model Details
712
 
@@ -716,8 +696,7 @@ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [S
716
  - **Maximum Sequence Length:** 512 tokens
717
  - **Output Dimensionality:** 768 tokens
718
  - **Similarity Function:** Cosine Similarity
719
- - **Training Dataset:**
720
- - json
721
  - **Language:** en
722
  - **License:** apache-2.0
723
 
@@ -755,9 +734,9 @@ from sentence_transformers import SentenceTransformer
755
  model = SentenceTransformer("zenml/finetuned-snowflake-arctic-embed-m-v1.5")
756
  # Run inference
757
  sentences = [
758
- 'Where can I find older versions of ZenML documentation?',
759
- 'ZenML - Bridging the gap between ML & Ops\n\nLegacy Docs\n\nBleeding EdgeLegacy Docs0.67.0\n\n🧙\u200d♂️Find older version our docs\n\nPowered by GitBook',
760
- 'tainer_registry \\\n -i local_builder \\\n --setOnce you added the step operator to your active stack, you can use it to execute individual steps of your pipeline by specifying it in the @step decorator as follows:\n\nfrom zenml import step\n\n@step(step_operator=<STEP_OPERATOR_NAME>)\ndef step_on_spark(...) -> ...:\n """Some step that should run with Spark on Kubernetes."""\n ...\n\nAfter successfully running any step with a KubernetesSparkStepOperator, you should be able to see that a Spark driver pod was created in your cluster for each pipeline step when running kubectl get pods -n $KUBERNETES_NAMESPACE.\n\nInstead of hardcoding a step operator name, you can also use the Client to dynamically use the step operator of your active stack:\n\nfrom zenml.client import Client\n\nstep_operator = Client().active_stack.step_operator\n\n@step(step_operator=step_operator.name)\ndef step_on_spark(...) -> ...:\n ...\n\nAdditional configuration\n\nFor additional configuration of the Spark step operator, you can pass SparkStepOperatorSettings when defining or running your pipeline. Check out the SDK docs for a full list of available attributes and this docs page for more information on how to specify settings.\n\nPreviousKubernetesNextDevelop a Custom Step Operator\n\nLast updated 4 months ago',
761
  ]
762
  embeddings = model.encode(sentences)
763
  print(embeddings.shape)
@@ -801,45 +780,45 @@ You can finetune this model on your own dataset.
801
  * Dataset: `dim_384`
802
  * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
803
 
804
- | Metric | Value |
805
- |:--------------------|:--------|
806
- | cosine_accuracy@1 | 1.0 |
807
- | cosine_accuracy@3 | 1.0 |
808
- | cosine_accuracy@5 | 1.0 |
809
- | cosine_accuracy@10 | 1.0 |
810
- | cosine_precision@1 | 1.0 |
811
- | cosine_precision@3 | 0.3333 |
812
- | cosine_precision@5 | 0.2 |
813
- | cosine_precision@10 | 0.1 |
814
- | cosine_recall@1 | 1.0 |
815
- | cosine_recall@3 | 1.0 |
816
- | cosine_recall@5 | 1.0 |
817
- | cosine_recall@10 | 1.0 |
818
- | cosine_ndcg@10 | 1.0 |
819
- | cosine_mrr@10 | 1.0 |
820
- | **cosine_map@100** | **1.0** |
821
 
822
  #### Information Retrieval
823
  * Dataset: `dim_256`
824
  * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
825
 
826
- | Metric | Value |
827
- |:--------------------|:----------|
828
- | cosine_accuracy@1 | 0.75 |
829
- | cosine_accuracy@3 | 1.0 |
830
- | cosine_accuracy@5 | 1.0 |
831
- | cosine_accuracy@10 | 1.0 |
832
- | cosine_precision@1 | 0.75 |
833
- | cosine_precision@3 | 0.3333 |
834
- | cosine_precision@5 | 0.2 |
835
- | cosine_precision@10 | 0.1 |
836
- | cosine_recall@1 | 0.75 |
837
- | cosine_recall@3 | 1.0 |
838
- | cosine_recall@5 | 1.0 |
839
- | cosine_recall@10 | 1.0 |
840
- | cosine_ndcg@10 | 0.9077 |
841
- | cosine_mrr@10 | 0.875 |
842
- | **cosine_map@100** | **0.875** |
843
 
844
  #### Information Retrieval
845
  * Dataset: `dim_128`
@@ -847,43 +826,43 @@ You can finetune this model on your own dataset.
847
 
848
  | Metric | Value |
849
  |:--------------------|:----------|
850
- | cosine_accuracy@1 | 0.75 |
851
- | cosine_accuracy@3 | 1.0 |
852
  | cosine_accuracy@5 | 1.0 |
853
  | cosine_accuracy@10 | 1.0 |
854
- | cosine_precision@1 | 0.75 |
855
- | cosine_precision@3 | 0.3333 |
856
  | cosine_precision@5 | 0.2 |
857
  | cosine_precision@10 | 0.1 |
858
- | cosine_recall@1 | 0.75 |
859
- | cosine_recall@3 | 1.0 |
860
  | cosine_recall@5 | 1.0 |
861
  | cosine_recall@10 | 1.0 |
862
- | cosine_ndcg@10 | 0.9077 |
863
- | cosine_mrr@10 | 0.875 |
864
- | **cosine_map@100** | **0.875** |
865
 
866
  #### Information Retrieval
867
  * Dataset: `dim_64`
868
  * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
869
 
870
- | Metric | Value |
871
- |:--------------------|:----------|
872
- | cosine_accuracy@1 | 0.75 |
873
- | cosine_accuracy@3 | 1.0 |
874
- | cosine_accuracy@5 | 1.0 |
875
- | cosine_accuracy@10 | 1.0 |
876
- | cosine_precision@1 | 0.75 |
877
- | cosine_precision@3 | 0.3333 |
878
- | cosine_precision@5 | 0.2 |
879
- | cosine_precision@10 | 0.1 |
880
- | cosine_recall@1 | 0.75 |
881
- | cosine_recall@3 | 1.0 |
882
- | cosine_recall@5 | 1.0 |
883
- | cosine_recall@10 | 1.0 |
884
- | cosine_ndcg@10 | 0.9077 |
885
- | cosine_mrr@10 | 0.875 |
886
- | **cosine_map@100** | **0.875** |
887
 
888
  <!--
889
  ## Bias, Risks and Limitations
@@ -901,22 +880,22 @@ You can finetune this model on your own dataset.
901
 
902
  ### Training Dataset
903
 
904
- #### json
 
905
 
906
- * Dataset: json
907
  * Size: 36 training samples
908
  * Columns: <code>positive</code> and <code>anchor</code>
909
- * Approximate statistics based on the first 36 samples:
910
  | | positive | anchor |
911
  |:--------|:-----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
912
  | type | string | string |
913
- | details | <ul><li>min: 13 tokens</li><li>mean: 22.58 tokens</li><li>max: 44 tokens</li></ul> | <ul><li>min: 32 tokens</li><li>mean: 300.72 tokens</li><li>max: 512 tokens</li></ul> |
914
  * Samples:
915
- | positive | anchor |
916
- |:-----------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
917
- | <code>How do you configure ZenML to display data visualizations in the dashboard?</code> | <code>📊Visualizing artifacts<br><br>Configuring ZenML to display data visualizations in the dashboard.<br><br>PreviousRegister Existing Data as a ZenML ArtifactNextDefault visualizations<br><br>Last updated 4 months ago</code> |
918
- | <code>How does the model deployer in ZenML facilitate the deployment and management of machine learning models?</code> | <code>Develop a Custom Model Deployer<br><br>Learning how to develop a custom model deployer.<br><br>Before diving into the specifics of this component type, it is beneficial to familiarize yourself with our general guide to writing custom component flavors in ZenML. This guide provides an essential understanding of ZenML's component flavor concepts.<br><br>To deploy and manage your trained machine-learning models, ZenML provides a stack component called Model Deployer. This component is responsible for interacting with the deployment tool, framework, or platform.<br><br>When present in a stack, the model deployer can also act as a registry for models that are served with ZenML. You can use the model deployer to list all models that are currently deployed for online inference or filtered according to a particular pipeline run or step, or to suspend, resume or delete an external model server managed through ZenML.<br><br>Base Abstraction<br><br>In ZenML, the base abstraction of the model deployer is built on top of three major criteria:<br><br>It needs to ensure efficient deployment and management of models in accordance with the specific requirements of the serving infrastructure, by holding all the stack-related configuration attributes required to interact with the remote model serving tool, service, or platform.<br><br>It needs to implement the continuous deployment logic necessary to deploy models in a way that updates an existing model server that is already serving a previous version of the same model instead of creating a new model server for every new model version (see the deploy_model abstract method). This functionality can be consumed directly from ZenML pipeline steps, but it can also be used outside the pipeline to deploy ad-hoc models. It is also usually coupled with a standard model deployer step, implemented by each integration, that hides the details of the deployment process from the user.</code> |
919
- | <code>How can I track the improvement of my RAG pipeline using evaluation and metrics?</code> | <code>Evaluation and metrics<br><br>Track how your RAG pipeline improves using evaluation and metrics.<br><br>PreviousBasic RAG inference pipelineNextEvaluation in 65 lines of code<br><br>Last updated 4 months ago</code> |
920
  * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
921
  ```json
922
  {
@@ -1010,7 +989,7 @@ You can finetune this model on your own dataset.
1010
  - `dataloader_num_workers`: 0
1011
  - `dataloader_prefetch_factor`: None
1012
  - `past_index`: -1
1013
- - `disable_tqdm`: False
1014
  - `remove_unused_columns`: True
1015
  - `label_names`: None
1016
  - `load_best_model_at_end`: True
@@ -1071,21 +1050,21 @@ You can finetune this model on your own dataset.
1071
  </details>
1072
 
1073
  ### Training Logs
1074
- | Epoch | Step | dim_384_cosine_map@100 | dim_256_cosine_map@100 | dim_128_cosine_map@100 | dim_64_cosine_map@100 |
1075
  |:-------:|:-----:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|
1076
- | **1.0** | **1** | **0.875** | **0.875** | **0.875** | **0.875** |
1077
- | 2.0 | 3 | 1.0 | 0.875 | 0.875 | 0.875 |
1078
- | 3.0 | 4 | 1.0 | 0.875 | 0.875 | 0.875 |
1079
 
1080
  * The bold row denotes the saved checkpoint.
1081
 
1082
  ### Framework Versions
1083
- - Python: 3.11.10
1084
- - Sentence Transformers: 3.2.1
1085
- - Transformers: 4.43.1
1086
- - PyTorch: 2.5.1+cu124
1087
- - Accelerate: 1.1.0
1088
- - Datasets: 3.1.0
1089
  - Tokenizers: 0.19.1
1090
 
1091
  ## Citation
@@ -1108,7 +1087,7 @@ You can finetune this model on your own dataset.
1108
  #### MatryoshkaLoss
1109
  ```bibtex
1110
  @misc{kusupati2024matryoshka,
1111
- title={Matryoshka Representation Learning},
1112
  author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
1113
  year={2024},
1114
  eprint={2205.13147},
@@ -1120,7 +1099,7 @@ You can finetune this model on your own dataset.
1120
  #### MultipleNegativesRankingLoss
1121
  ```bibtex
1122
  @misc{henderson2017efficient,
1123
- title={Efficient Natural Language Response Suggestion for Smart Reply},
1124
  author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
1125
  year={2017},
1126
  eprint={1705.00652},
 
12
  - loss:MultipleNegativesRankingLoss
13
  base_model: Snowflake/snowflake-arctic-embed-m-v1.5
14
  widget:
15
+ - source_sentence: Where can I find older versions of the ZenML documentation?
16
  sentences:
17
+ - 'gister flavors.my_flavor.MyExperimentTrackerFlavorZenML resolves the flavor class
18
+ by taking the path where you initialized zenml (via zenml init) as the starting
19
+ point of resolution. Therefore, please ensure you follow the best practice of
20
+ initializing zenml at the root of your repository.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
 
22
 
23
+ If ZenML does not find an initialized ZenML repository in any parent directory,
24
+ it will default to the current working directory, but usually, it''s better to
25
+ not have to rely on this mechanism and initialize zenml at the root.
26
 
27
 
28
+ Afterward, you should see the new flavor in the list of available flavors:
 
 
29
 
30
 
31
+ zenml experiment-tracker flavor list
32
 
33
 
34
+ It is important to draw attention to when and how these base abstractions are
35
+ coming into play in a ZenML workflow.
36
 
37
 
38
+ The CustomExperimentTrackerFlavor class is imported and utilized upon the creation
39
+ of the custom flavor through the CLI.
40
 
41
 
42
+ The CustomExperimentTrackerConfig class is imported when someone tries to register/update
43
+ a stack component with this custom flavor. Especially, during the registration
44
+ process of the stack component, the config will be used to validate the values
45
+ given by the user. As Config objects are inherently pydantic objects, you can
46
+ also add your own custom validators here.
47
 
48
 
49
+ The CustomExperimentTracker only comes into play when the component is ultimately
50
+ in use.
51
 
52
 
53
+ The design behind this interaction lets us separate the configuration of the flavor
54
+ from its implementation. This way we can register flavors and components even
55
+ when the major dependencies behind their implementation are not installed in our
56
+ local setting (assuming the CustomExperimentTrackerFlavor and the CustomExperimentTrackerConfig
57
+ are implemented in a different module/path than the actual CustomExperimentTracker).
58
 
59
 
60
+ PreviousWeights & BiasesNextModel Deployers
61
 
62
 
63
+ Last updated 21 days ago'
64
+ - 'ZenML - Bridging the gap between ML & Ops
65
 
66
 
67
+ Legacy Docs
 
68
 
69
 
70
+ Bleeding EdgeLegacy Docs0.67.0
71
 
72
 
73
+ 🧙‍♂️Find older version our docs
74
 
75
 
76
+ Powered by GitBook'
77
  - 'ZenML - Bridging the gap between ML & Ops
78
 
79
 
 
87
 
88
 
89
  Powered by GitBook'
90
+ - source_sentence: Where can I find older versions of the ZenML documentation?
91
  sentences:
92
  - 'Whylogs
93
 
 
146
  If you don''t need to connect to the WhyLabs platform to upload and store the
147
  generated whylogs data profiles, the Data Validator stack component does not require
148
  any configuration parameters. Adding it to a stack is as simple as running e.g.:'
149
+ - 'ZenML - Bridging the gap between ML & Ops
150
+
151
+
152
+ Legacy Docs
153
+
154
+
155
+ Bleeding EdgeLegacy Docs0.67.0
156
+
157
+
158
+ 🧙‍♂️Find older version our docs
159
+
160
+
161
+ Powered by GitBook'
162
+ - 'ZenML - Bridging the gap between ML & Ops
163
+
164
+
165
+ Legacy Docs
166
+
167
+
168
+ Bleeding EdgeLegacy Docs0.67.0
169
+
170
+
171
+ 🧙‍♂️Find older version our docs
172
+
173
+
174
+ Powered by GitBook'
175
+ - source_sentence: How can I install ZenML with support for a local dashboard, and
176
+ what precautions should I take when installing on a Mac with Apple Silicon?
 
 
 
 
 
 
177
  sentences:
178
+ - 'Finetuning LLMs with ZenML
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
179
 
180
 
181
+ Finetune LLMs for specific tasks or to improve performance and cost.
182
 
183
 
184
+ PreviousEvaluating finetuned embeddingsNextSet up a project repository
 
 
185
 
186
 
187
+ Last updated 6 months ago'
188
+ - '🧙Installation
189
 
190
 
191
+ Installing ZenML and getting started.
 
 
 
192
 
193
 
194
+ ZenML is a Python package that can be installed directly via pip:
 
 
195
 
196
 
197
+ pip install zenml
198
 
199
 
200
+ Note that ZenML currently supports Python 3.8, 3.9, 3.10, and 3.11. Please make
201
+ sure that you are using a supported Python version.
202
 
203
 
204
+ Install with the dashboard
 
205
 
206
 
207
+ ZenML comes bundled with a web dashboard that lives inside a sister repository.
208
+ In order to get access to the dashboard locally, you need to launch the ZenML
209
+ Server and Dashboard locally. For this, you need to install the optional dependencies
210
+ for the ZenML Server:
211
 
212
 
213
+ pip install "zenml[server]"
 
214
 
215
 
216
+ We highly encourage you to install ZenML in a virtual environment. At ZenML, We
217
+ like to use virtualenvwrapper or pyenv-virtualenv to manage our Python virtual
218
+ environments.
219
 
220
 
221
+ Installing onto MacOS with Apple Silicon (M1, M2)
222
 
223
 
224
+ A change in how forking works on Macs running on Apple Silicon means that you
225
+ should set the following environment variable which will ensure that your connections
226
+ to the server remain unbroken:
227
 
228
 
229
+ export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES
230
+
231
+
232
+ You can read more about this here. This environment variable is needed if you
233
+ are working with a local server on your Mac, but if you''re just using ZenML as
234
+ a client / CLI and connecting to a deployed server then you don''t need to set
235
+ it.
236
+
237
+
238
+ Nightly builds
239
+
240
+
241
+ ZenML also publishes nightly builds under the zenml-nightly package name. These
242
+ are built from the latest develop branch (to which work ready for release is published)
243
+ and are not guaranteed to be stable. To install the nightly build, run:
244
+
245
+
246
+ pip install zenml-nightly
247
+
248
+
249
+ Verifying installations
250
+
251
+
252
+ Once the installation is completed, you can check whether the installation was
253
+ successful either through Bash:
254
+
255
+
256
+ zenml version
257
+
258
+
259
+ or through Python:
260
+
261
+
262
+ import zenml
263
+
264
+
265
+ print(zenml.__version__)
266
+
267
+
268
+ If you would like to learn more about the current release, please visit our PyPi
269
+ package page.
270
+
271
+
272
+ Running with Docker'
273
+ - "se you decide to switch to another Data Validator.All you have to do is call\
274
+ \ the whylogs Data Validator methods when you need to interact with whylogs to\
275
+ \ generate data profiles. You may optionally enable whylabs logging to automatically\
276
+ \ upload the returned whylogs profile to WhyLabs, e.g.:\n\nimport pandas as pd\n\
277
+ from whylogs.core import DatasetProfileView\nfrom zenml.integrations.whylogs.data_validators.whylogs_data_validator\
278
+ \ import (\n WhylogsDataValidator,\n)\nfrom zenml.integrations.whylogs.flavors.whylogs_data_validator_flavor\
279
+ \ import (\n WhylogsDataValidatorSettings,\n)\nfrom zenml import step\n\nwhylogs_settings\
280
+ \ = WhylogsDataValidatorSettings(\n enable_whylabs=True, dataset_id=\"<WHYLABS_DATASET_ID>\"\
281
+ \n)\n\n@step(\n settings={\n \"data_validator\": whylogs_settings\n\
282
+ \ }\n)\ndef data_profiler(\n dataset: pd.DataFrame,\n) -> DatasetProfileView:\n\
283
+ \ \"\"\"Custom data profiler step with whylogs\n\nArgs:\n dataset: a\
284
+ \ Pandas DataFrame\n\nReturns:\n Whylogs profile generated for the data\n\
285
+ \ \"\"\"\n\n# validation pre-processing (e.g. dataset preparation) can take\
286
+ \ place here\n\ndata_validator = WhylogsDataValidator.get_active_data_validator()\n\
287
+ \ profile = data_validator.data_profiling(\n dataset,\n )\n #\
288
+ \ optionally upload the profile to WhyLabs, if WhyLabs credentials are configured\n\
289
+ \ data_validator.upload_profile_view(profile)\n\n# validation post-processing\
290
+ \ (e.g. interpret results, take actions) can happen here\n\nreturn profile\n\n\
291
+ Have a look at the complete list of methods and parameters available in the WhylogsDataValidator\
292
+ \ API in the SDK docs.\n\nCall whylogs directly\n\nYou can use the whylogs library\
293
+ \ directly in your custom pipeline steps, and only leverage ZenML's capability\
294
+ \ of serializing, versioning and storing the DatasetProfileView objects in its\
295
+ \ Artifact Store. You may optionally enable whylabs logging to automatically upload\
296
+ \ the returned whylogs profile to WhyLabs, e.g.:"
297
+ - source_sentence: How can I finetune embeddings using Sentence Transformers as described
298
+ in the ZenML documentation?
299
  sentences:
300
+ - 'Evaluation and metrics
301
+
302
+
303
+ Track how your RAG pipeline improves using evaluation and metrics.
304
+
305
+
306
+ PreviousBasic RAG inference pipelineNextEvaluation in 65 lines of code
307
+
308
+
309
+ Last updated 4 months ago'
310
+ - ":\n \"\"\"Abstract method to deploy a model.\"\"\"@staticmethod\n @abstractmethod\n\
311
+ \ def get_model_server_info(\n service: BaseService,\n ) -> Dict[str,\
312
+ \ Optional[str]]:\n \"\"\"Give implementation-specific way to extract relevant\
313
+ \ model server\n properties for the user.\"\"\"\n\n@abstractmethod\n \
314
+ \ def perform_stop_model(\n self,\n service: BaseService,\n \
315
+ \ timeout: int = DEFAULT_DEPLOYMENT_START_STOP_TIMEOUT,\n force: bool\
316
+ \ = False,\n ) -> BaseService:\n \"\"\"Abstract method to stop a model\
317
+ \ server.\"\"\"\n\n@abstractmethod\n def perform_start_model(\n self,\n\
318
+ \ service: BaseService,\n timeout: int = DEFAULT_DEPLOYMENT_START_STOP_TIMEOUT,\n\
319
+ \ ) -> BaseService:\n \"\"\"Abstract method to start a model server.\"\
320
+ \"\"\n\n@abstractmethod\n def perform_delete_model(\n self,\n \
321
+ \ service: BaseService,\n timeout: int = DEFAULT_DEPLOYMENT_START_STOP_TIMEOUT,\n\
322
+ \ force: bool = False,\n ) -> None:\n \"\"\"Abstract method to\
323
+ \ delete a model server.\"\"\"\n\nclass BaseModelDeployerFlavor(Flavor):\n \
324
+ \ \"\"\"Base class for model deployer flavors.\"\"\"\n\n@property\n @abstractmethod\n\
325
+ \ def name(self):\n \"\"\"Returns the name of the flavor.\"\"\"\n\n\
326
+ @property\n def type(self) -> StackComponentType:\n \"\"\"Returns the\
327
+ \ flavor type.\n\nReturns:\n The flavor type.\n \"\"\"\n \
328
+ \ return StackComponentType.MODEL_DEPLOYER\n\n@property\n def config_class(self)\
329
+ \ -> Type[BaseModelDeployerConfig]:\n \"\"\"Returns `BaseModelDeployerConfig`\
330
+ \ config class.\n\nReturns:\n The config class.\n \"\"\"\
331
+ \n return BaseModelDeployerConfig\n\n@property\n @abstractmethod\n \
332
+ \ def implementation_class(self) -> Type[BaseModelDeployer]:\n \"\"\"\
333
+ The class that implements the model deployer.\"\"\"\n\nThis is a slimmed-down\
334
+ \ version of the base implementation which aims to highlight the abstraction layer.\
335
+ \ In order to see the full implementation and get the complete docstrings, please\
336
+ \ check the SDK docs .\n\nBuilding your own model deployers"
337
+ - 'Finetuning embeddings with Sentence Transformers
338
+
339
+
340
+ Finetune embeddings with Sentence Transformers.
341
+
342
+
343
+ PreviousSynthetic data generationNextEvaluating finetuned embeddings
344
+
345
+
346
+ Last updated 1 month ago'
347
+ - source_sentence: How does ZenML utilize type annotations in step outputs to enhance
348
+ data handling between pipeline steps?
349
+ sentences:
350
+ - "ator which runs Steps with Spark on Kubernetes.\"\"\"def _backend_configuration(\n\
351
+ \ self,\n spark_config: SparkConf,\n step_config:\
352
+ \ \"StepConfiguration\",\n ) -> None:\n \"\"\"Configures Spark to run\
353
+ \ on Kubernetes.\"\"\"\n # Build and push the image\n docker_image_builder\
354
+ \ = PipelineDockerImageBuilder()\n image_name = docker_image_builder.build_and_push_docker_image(...)\n\
355
+ \n# Adjust the spark configuration\n spark_config.set(\"spark.kubernetes.container.image\"\
356
+ , image_name)\n ...\n\nFor Kubernetes, there are also some additional important\
357
+ \ configuration parameters:\n\nnamespace is the namespace under which the driver\
358
+ \ and executor pods will run.\n\nservice_account is the service account that will\
359
+ \ be used by various Spark components (to create and watch the pods).\n\nAdditionally,\
360
+ \ the _backend_configuration method is adjusted to handle the Kubernetes-specific\
361
+ \ configuration.\n\nWhen to use it\n\nYou should use the Spark step operator:\n\
362
+ \nwhen you are dealing with large amounts of data.\n\nwhen you are designing a\
363
+ \ step that can benefit from distributed computing paradigms in terms of time\
364
+ \ and resources.\n\nHow to deploy it\n\nTo use the KubernetesSparkStepOperator\
365
+ \ you will need to setup a few things first:\n\nRemote ZenML server: See the deployment\
366
+ \ guide for more information.\n\nKubernetes cluster: There are many ways to deploy\
367
+ \ a Kubernetes cluster using different cloud providers or on your custom infrastructure.\
368
+ \ For AWS, you can follow the Spark EKS Setup Guide below.\n\nSpark EKS Setup\
369
+ \ Guide\n\nThe following guide will walk you through how to spin up and configure\
370
+ \ a Amazon Elastic Kubernetes Service with Spark on it:\n\nEKS Kubernetes Cluster\n\
371
+ \nFollow this guide to create an Amazon EKS cluster role.\n\nFollow this guide\
372
+ \ to create an Amazon EC2 node role.\n\nGo to the IAM website, and select Roles\
373
+ \ to edit both roles.\n\nAttach the AmazonRDSFullAccess and AmazonS3FullAccess\
374
+ \ policies to both roles.\n\nGo to the EKS website.\n\nMake sure the correct region\
375
+ \ is selected on the top right."
376
+ - "\U0001F5C4️Handle Data/Artifacts\n\nStep outputs in ZenML are stored in the artifact\
377
+ \ store. This enables caching, lineage and auditability. Using type annotations\
378
+ \ helps with transparency, passing data between steps, and serializing/des\n\n\
379
+ For best results, use type annotations for your outputs. This is good coding practice\
380
+ \ for transparency, helps ZenML handle passing data between steps, and also enables\
381
+ \ ZenML to serialize and deserialize (referred to as 'materialize' in ZenML) the\
382
+ \ data.\n\n@step\ndef load_data(parameter: int) -> Dict[str, Any]:\n\n# do something\
383
+ \ with the parameter here\n\ntraining_data = [[1, 2], [3, 4], [5, 6]]\n labels\
384
+ \ = [0, 1, 0]\n return {'features': training_data, 'labels': labels}\n\n@step\n\
385
+ def train_model(data: Dict[str, Any]) -> None:\n total_features = sum(map(sum,\
386
+ \ data['features']))\n total_labels = sum(data['labels'])\n \n # Train\
387
+ \ some model here\n \n print(f\"Trained model using {len(data['features'])}\
388
+ \ data points. \"\n f\"Feature sum is {total_features}, label sum is\
389
+ \ {total_labels}\")\n\n@pipeline \ndef simple_ml_pipeline(parameter: int):\n\
390
+ \ dataset = load_data(parameter=parameter) # Get the output \n train_model(dataset)\
391
+ \ # Pipe the previous step output into the downstream step\n\nIn this code, we\
392
+ \ define two steps: load_data and train_model. The load_data step takes an integer\
393
+ \ parameter and returns a dictionary containing training data and labels. The\
394
+ \ train_model step receives the dictionary from load_data, extracts the features\
395
+ \ and labels, and trains a model (not shown here).\n\nFinally, we define a pipeline\
396
+ \ simple_ml_pipeline that chains the load_data and train_model steps together.\
397
+ \ The output from load_data is passed as input to train_model, demonstrating how\
398
+ \ data flows between steps in a ZenML pipeline.\n\nPreviousDisable colorful loggingNextHow\
399
+ \ ZenML stores data\n\nLast updated 4 months ago"
400
  - ' your GCP Image Builder to the GCP cloud platform.To set up the GCP Image Builder
401
  to authenticate to GCP and access the GCP Cloud Build services, it is recommended
402
  to leverage the many features provided by the GCP Service Connector such as auto-configuration,
 
452
  If you already have one or more GCP Service Connectors configured in your ZenML
453
  deployment, you can check which of them can be used to access generic GCP resources
454
  like the GCP Image Builder required for your GCP Image Builder by running e.g.:'
455
+ datasets: []
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
456
  pipeline_tag: sentence-similarity
457
  library_name: sentence-transformers
458
  metrics:
 
482
  type: dim_384
483
  metrics:
484
  - type: cosine_accuracy@1
485
+ value: 0.5
486
  name: Cosine Accuracy@1
487
  - type: cosine_accuracy@3
488
+ value: 0.75
489
  name: Cosine Accuracy@3
490
  - type: cosine_accuracy@5
491
  value: 1.0
 
494
  value: 1.0
495
  name: Cosine Accuracy@10
496
  - type: cosine_precision@1
497
+ value: 0.5
498
  name: Cosine Precision@1
499
  - type: cosine_precision@3
500
+ value: 0.25
501
  name: Cosine Precision@3
502
  - type: cosine_precision@5
503
  value: 0.2
 
506
  value: 0.1
507
  name: Cosine Precision@10
508
  - type: cosine_recall@1
509
+ value: 0.5
510
  name: Cosine Recall@1
511
  - type: cosine_recall@3
512
+ value: 0.75
513
  name: Cosine Recall@3
514
  - type: cosine_recall@5
515
  value: 1.0
 
518
  value: 1.0
519
  name: Cosine Recall@10
520
  - type: cosine_ndcg@10
521
+ value: 0.7326691395183482
522
  name: Cosine Ndcg@10
523
  - type: cosine_mrr@10
524
+ value: 0.6458333333333333
525
  name: Cosine Mrr@10
526
  - type: cosine_map@100
527
+ value: 0.6458333333333333
528
  name: Cosine Map@100
529
  - task:
530
  type: information-retrieval
 
534
  type: dim_256
535
  metrics:
536
  - type: cosine_accuracy@1
537
+ value: 0.5
538
  name: Cosine Accuracy@1
539
  - type: cosine_accuracy@3
540
+ value: 0.75
541
  name: Cosine Accuracy@3
542
  - type: cosine_accuracy@5
543
  value: 1.0
 
546
  value: 1.0
547
  name: Cosine Accuracy@10
548
  - type: cosine_precision@1
549
+ value: 0.5
550
  name: Cosine Precision@1
551
  - type: cosine_precision@3
552
+ value: 0.25
553
  name: Cosine Precision@3
554
  - type: cosine_precision@5
555
  value: 0.2
 
558
  value: 0.1
559
  name: Cosine Precision@10
560
  - type: cosine_recall@1
561
+ value: 0.5
562
  name: Cosine Recall@1
563
  - type: cosine_recall@3
564
+ value: 0.75
565
  name: Cosine Recall@3
566
  - type: cosine_recall@5
567
  value: 1.0
 
570
  value: 1.0
571
  name: Cosine Recall@10
572
  - type: cosine_ndcg@10
573
+ value: 0.7326691395183482
574
  name: Cosine Ndcg@10
575
  - type: cosine_mrr@10
576
+ value: 0.6458333333333333
577
  name: Cosine Mrr@10
578
  - type: cosine_map@100
579
+ value: 0.6458333333333333
580
  name: Cosine Map@100
581
  - task:
582
  type: information-retrieval
 
586
  type: dim_128
587
  metrics:
588
  - type: cosine_accuracy@1
589
+ value: 0.5
590
  name: Cosine Accuracy@1
591
  - type: cosine_accuracy@3
592
+ value: 0.5
593
  name: Cosine Accuracy@3
594
  - type: cosine_accuracy@5
595
  value: 1.0
 
598
  value: 1.0
599
  name: Cosine Accuracy@10
600
  - type: cosine_precision@1
601
+ value: 0.5
602
  name: Cosine Precision@1
603
  - type: cosine_precision@3
604
+ value: 0.16666666666666666
605
  name: Cosine Precision@3
606
  - type: cosine_precision@5
607
  value: 0.2
 
610
  value: 0.1
611
  name: Cosine Precision@10
612
  - type: cosine_recall@1
613
+ value: 0.5
614
  name: Cosine Recall@1
615
  - type: cosine_recall@3
616
+ value: 0.5
617
  name: Cosine Recall@3
618
  - type: cosine_recall@5
619
  value: 1.0
 
622
  value: 1.0
623
  name: Cosine Recall@10
624
  - type: cosine_ndcg@10
625
+ value: 0.7153382790366966
626
  name: Cosine Ndcg@10
627
  - type: cosine_mrr@10
628
+ value: 0.625
629
  name: Cosine Mrr@10
630
  - type: cosine_map@100
631
+ value: 0.625
632
  name: Cosine Map@100
633
  - task:
634
  type: information-retrieval
 
638
  type: dim_64
639
  metrics:
640
  - type: cosine_accuracy@1
641
+ value: 0.5
642
  name: Cosine Accuracy@1
643
  - type: cosine_accuracy@3
644
+ value: 0.75
645
  name: Cosine Accuracy@3
646
  - type: cosine_accuracy@5
647
  value: 1.0
 
650
  value: 1.0
651
  name: Cosine Accuracy@10
652
  - type: cosine_precision@1
653
+ value: 0.5
654
  name: Cosine Precision@1
655
  - type: cosine_precision@3
656
+ value: 0.25
657
  name: Cosine Precision@3
658
  - type: cosine_precision@5
659
  value: 0.2
 
662
  value: 0.1
663
  name: Cosine Precision@10
664
  - type: cosine_recall@1
665
+ value: 0.5
666
  name: Cosine Recall@1
667
  - type: cosine_recall@3
668
+ value: 0.75
669
  name: Cosine Recall@3
670
  - type: cosine_recall@5
671
  value: 1.0
 
674
  value: 1.0
675
  name: Cosine Recall@10
676
  - type: cosine_ndcg@10
677
+ value: 0.7326691395183482
678
  name: Cosine Ndcg@10
679
  - type: cosine_mrr@10
680
+ value: 0.6458333333333333
681
  name: Cosine Mrr@10
682
  - type: cosine_map@100
683
+ value: 0.6458333333333333
684
  name: Cosine Map@100
685
  ---
686
 
687
  # zenml/finetuned-snowflake-arctic-embed-m-v1.5
688
 
689
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Snowflake/snowflake-arctic-embed-m-v1.5](https://huggingface.co/Snowflake/snowflake-arctic-embed-m-v1.5). It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
690
 
691
  ## Model Details
692
 
 
696
  - **Maximum Sequence Length:** 512 tokens
697
  - **Output Dimensionality:** 768 tokens
698
  - **Similarity Function:** Cosine Similarity
699
+ <!-- - **Training Dataset:** Unknown -->
 
700
  - **Language:** en
701
  - **License:** apache-2.0
702
 
 
734
  model = SentenceTransformer("zenml/finetuned-snowflake-arctic-embed-m-v1.5")
735
  # Run inference
736
  sentences = [
737
+ 'How does ZenML utilize type annotations in step outputs to enhance data handling between pipeline steps?',
738
+ '🗄️Handle Data/Artifacts\n\nStep outputs in ZenML are stored in the artifact store. This enables caching, lineage and auditability. Using type annotations helps with transparency, passing data between steps, and serializing/des\n\nFor best results, use type annotations for your outputs. This is good coding practice for transparency, helps ZenML handle passing data between steps, and also enables ZenML to serialize and deserialize (referred to as \'materialize\' in ZenML) the data.\n\n@step\ndef load_data(parameter: int) -> Dict[str, Any]:\n\n# do something with the parameter here\n\ntraining_data = [[1, 2], [3, 4], [5, 6]]\n labels = [0, 1, 0]\n return {\'features\': training_data, \'labels\': labels}\n\n@step\ndef train_model(data: Dict[str, Any]) -> None:\n total_features = sum(map(sum, data[\'features\']))\n total_labels = sum(data[\'labels\'])\n \n # Train some model here\n \n print(f"Trained model using {len(data[\'features\'])} data points. "\n f"Feature sum is {total_features}, label sum is {total_labels}")\n\n@pipeline \ndef simple_ml_pipeline(parameter: int):\n dataset = load_data(parameter=parameter) # Get the output \n train_model(dataset) # Pipe the previous step output into the downstream step\n\nIn this code, we define two steps: load_data and train_model. The load_data step takes an integer parameter and returns a dictionary containing training data and labels. The train_model step receives the dictionary from load_data, extracts the features and labels, and trains a model (not shown here).\n\nFinally, we define a pipeline simple_ml_pipeline that chains the load_data and train_model steps together. The output from load_data is passed as input to train_model, demonstrating how data flows between steps in a ZenML pipeline.\n\nPreviousDisable colorful loggingNextHow ZenML stores data\n\nLast updated 4 months ago',
739
+ " your GCP Image Builder to the GCP cloud platform.To set up the GCP Image Builder to authenticate to GCP and access the GCP Cloud Build services, it is recommended to leverage the many features provided by the GCP Service Connector such as auto-configuration, best security practices regarding long-lived credentials and reusing the same credentials across multiple stack components.\n\nIf you don't already have a GCP Service Connector configured in your ZenML deployment, you can register one using the interactive CLI command. You also have the option to configure a GCP Service Connector that can be used to access more than just the GCP Cloud Build service:\n\nzenml service-connector register --type gcp -i\n\nA non-interactive CLI example that leverages the Google Cloud CLI configuration on your local machine to auto-configure a GCP Service Connector for the GCP Cloud Build service:\n\nzenml service-connector register <CONNECTOR_NAME> --type gcp --resource-type gcp-generic --resource-name <GCS_BUCKET_NAME> --auto-configure\n\nExample Command Output\n\n$ zenml service-connector register gcp-generic --type gcp --resource-type gcp-generic --auto-configure\nSuccessfully registered service connector `gcp-generic` with access to the following resources:\n┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┓\n RESOURCE TYPE │ RESOURCE NAMES ┃\n┠────────────────┼────────────────┨\n┃ 🔵 gcp-generic │ zenml-core ┃\n┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┛\n\nNote: Please remember to grant the entity associated with your GCP credentials permissions to access the Cloud Build API and to run Cloud Builder jobs (e.g. the Cloud Build Editor IAM role). The GCP Service Connector supports many different authentication methods with different levels of security and convenience. You should pick the one that best fits your use case.\n\nIf you already have one or more GCP Service Connectors configured in your ZenML deployment, you can check which of them can be used to access generic GCP resources like the GCP Image Builder required for your GCP Image Builder by running e.g.:",
740
  ]
741
  embeddings = model.encode(sentences)
742
  print(embeddings.shape)
 
780
  * Dataset: `dim_384`
781
  * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
782
 
783
+ | Metric | Value |
784
+ |:--------------------|:-----------|
785
+ | cosine_accuracy@1 | 0.5 |
786
+ | cosine_accuracy@3 | 0.75 |
787
+ | cosine_accuracy@5 | 1.0 |
788
+ | cosine_accuracy@10 | 1.0 |
789
+ | cosine_precision@1 | 0.5 |
790
+ | cosine_precision@3 | 0.25 |
791
+ | cosine_precision@5 | 0.2 |
792
+ | cosine_precision@10 | 0.1 |
793
+ | cosine_recall@1 | 0.5 |
794
+ | cosine_recall@3 | 0.75 |
795
+ | cosine_recall@5 | 1.0 |
796
+ | cosine_recall@10 | 1.0 |
797
+ | cosine_ndcg@10 | 0.7327 |
798
+ | cosine_mrr@10 | 0.6458 |
799
+ | **cosine_map@100** | **0.6458** |
800
 
801
  #### Information Retrieval
802
  * Dataset: `dim_256`
803
  * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
804
 
805
+ | Metric | Value |
806
+ |:--------------------|:-----------|
807
+ | cosine_accuracy@1 | 0.5 |
808
+ | cosine_accuracy@3 | 0.75 |
809
+ | cosine_accuracy@5 | 1.0 |
810
+ | cosine_accuracy@10 | 1.0 |
811
+ | cosine_precision@1 | 0.5 |
812
+ | cosine_precision@3 | 0.25 |
813
+ | cosine_precision@5 | 0.2 |
814
+ | cosine_precision@10 | 0.1 |
815
+ | cosine_recall@1 | 0.5 |
816
+ | cosine_recall@3 | 0.75 |
817
+ | cosine_recall@5 | 1.0 |
818
+ | cosine_recall@10 | 1.0 |
819
+ | cosine_ndcg@10 | 0.7327 |
820
+ | cosine_mrr@10 | 0.6458 |
821
+ | **cosine_map@100** | **0.6458** |
822
 
823
  #### Information Retrieval
824
  * Dataset: `dim_128`
 
826
 
827
  | Metric | Value |
828
  |:--------------------|:----------|
829
+ | cosine_accuracy@1 | 0.5 |
830
+ | cosine_accuracy@3 | 0.5 |
831
  | cosine_accuracy@5 | 1.0 |
832
  | cosine_accuracy@10 | 1.0 |
833
+ | cosine_precision@1 | 0.5 |
834
+ | cosine_precision@3 | 0.1667 |
835
  | cosine_precision@5 | 0.2 |
836
  | cosine_precision@10 | 0.1 |
837
+ | cosine_recall@1 | 0.5 |
838
+ | cosine_recall@3 | 0.5 |
839
  | cosine_recall@5 | 1.0 |
840
  | cosine_recall@10 | 1.0 |
841
+ | cosine_ndcg@10 | 0.7153 |
842
+ | cosine_mrr@10 | 0.625 |
843
+ | **cosine_map@100** | **0.625** |
844
 
845
  #### Information Retrieval
846
  * Dataset: `dim_64`
847
  * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
848
 
849
+ | Metric | Value |
850
+ |:--------------------|:-----------|
851
+ | cosine_accuracy@1 | 0.5 |
852
+ | cosine_accuracy@3 | 0.75 |
853
+ | cosine_accuracy@5 | 1.0 |
854
+ | cosine_accuracy@10 | 1.0 |
855
+ | cosine_precision@1 | 0.5 |
856
+ | cosine_precision@3 | 0.25 |
857
+ | cosine_precision@5 | 0.2 |
858
+ | cosine_precision@10 | 0.1 |
859
+ | cosine_recall@1 | 0.5 |
860
+ | cosine_recall@3 | 0.75 |
861
+ | cosine_recall@5 | 1.0 |
862
+ | cosine_recall@10 | 1.0 |
863
+ | cosine_ndcg@10 | 0.7327 |
864
+ | cosine_mrr@10 | 0.6458 |
865
+ | **cosine_map@100** | **0.6458** |
866
 
867
  <!--
868
  ## Bias, Risks and Limitations
 
880
 
881
  ### Training Dataset
882
 
883
+ #### Unnamed Dataset
884
+
885
 
 
886
  * Size: 36 training samples
887
  * Columns: <code>positive</code> and <code>anchor</code>
888
+ * Approximate statistics based on the first 1000 samples:
889
  | | positive | anchor |
890
  |:--------|:-----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
891
  | type | string | string |
892
+ | details | <ul><li>min: 13 tokens</li><li>mean: 23.14 tokens</li><li>max: 38 tokens</li></ul> | <ul><li>min: 31 tokens</li><li>mean: 311.83 tokens</li><li>max: 512 tokens</li></ul> |
893
  * Samples:
894
+ | positive | anchor |
895
+ |:-----------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
896
+ | <code>What are the necessary steps to deploy the KubernetesSparkStepOperator, and what configurations are required for running Spark on Kubernetes?</code> | <code>ator which runs Steps with Spark on Kubernetes."""def _backend_configuration(<br> self,<br> spark_config: SparkConf,<br> step_config: "StepConfiguration",<br> ) -> None:<br> """Configures Spark to run on Kubernetes."""<br> # Build and push the image<br> docker_image_builder = PipelineDockerImageBuilder()<br> image_name = docker_image_builder.build_and_push_docker_image(...)<br><br># Adjust the spark configuration<br> spark_config.set("spark.kubernetes.container.image", image_name)<br> ...<br><br>For Kubernetes, there are also some additional important configuration parameters:<br><br>namespace is the namespace under which the driver and executor pods will run.<br><br>service_account is the service account that will be used by various Spark components (to create and watch the pods).<br><br>Additionally, the _backend_configuration method is adjusted to handle the Kubernetes-specific configuration.<br><br>When to use it<br><br>You should use the Spark step operator:<br><br>when you are dealing with large amounts of data.<br><br>when you are designing a step that can benefit from distributed computing paradigms in terms of time and resources.<br><br>How to deploy it<br><br>To use the KubernetesSparkStepOperator you will need to setup a few things first:<br><br>Remote ZenML server: See the deployment guide for more information.<br><br>Kubernetes cluster: There are many ways to deploy a Kubernetes cluster using different cloud providers or on your custom infrastructure. For AWS, you can follow the Spark EKS Setup Guide below.<br><br>Spark EKS Setup Guide<br><br>The following guide will walk you through how to spin up and configure a Amazon Elastic Kubernetes Service with Spark on it:<br><br>EKS Kubernetes Cluster<br><br>Follow this guide to create an Amazon EKS cluster role.<br><br>Follow this guide to create an Amazon EC2 node role.<br><br>Go to the IAM website, and select Roles to edit both roles.<br><br>Attach the AmazonRDSFullAccess and AmazonS3FullAccess policies to both roles.<br><br>Go to the EKS website.<br><br>Make sure the correct region is selected on the top right.</code> |
897
+ | <code>How do I set up a GCP Service Connector within ZenML to authenticate and access GCP Cloud Build services?</code> | <code> your GCP Image Builder to the GCP cloud platform.To set up the GCP Image Builder to authenticate to GCP and access the GCP Cloud Build services, it is recommended to leverage the many features provided by the GCP Service Connector such as auto-configuration, best security practices regarding long-lived credentials and reusing the same credentials across multiple stack components.<br><br>If you don't already have a GCP Service Connector configured in your ZenML deployment, you can register one using the interactive CLI command. You also have the option to configure a GCP Service Connector that can be used to access more than just the GCP Cloud Build service:<br><br>zenml service-connector register --type gcp -i<br><br>A non-interactive CLI example that leverages the Google Cloud CLI configuration on your local machine to auto-configure a GCP Service Connector for the GCP Cloud Build service:<br><br>zenml service-connector register <CONNECTOR_NAME> --type gcp --resource-type gcp-generic --resource-name <GCS_BUCKET_NAME> --auto-configure<br><br>Example Command Output<br><br>$ zenml service-connector register gcp-generic --type gcp --resource-type gcp-generic --auto-configure<br>Successfully registered service connector `gcp-generic` with access to the following resources:<br>┏━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━┓<br>┃ RESOURCE TYPE │ RESOURCE NAMES ┃<br>┠────────────────┼────────────────┨<br>┃ 🔵 gcp-generic │ zenml-core ┃<br>┗━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┛<br><br>Note: Please remember to grant the entity associated with your GCP credentials permissions to access the Cloud Build API and to run Cloud Builder jobs (e.g. the Cloud Build Editor IAM role). The GCP Service Connector supports many different authentication methods with different levels of security and convenience. You should pick the one that best fits your use case.<br><br>If you already have one or more GCP Service Connectors configured in your ZenML deployment, you can check which of them can be used to access generic GCP resources like the GCP Image Builder required for your GCP Image Builder by running e.g.:</code> |
898
+ | <code>How do I register and activate a ZenML stack with a new GCP Image Builder while ensuring proper authentication?</code> | <code> build to finish. More information: Build Timeout.We can register the image builder and use it in our active stack:<br><br>zenml image-builder register <IMAGE_BUILDER_NAME> \<br> --flavor=gcp \<br> --cloud_builder_image=<BUILDER_IMAGE_NAME> \<br> --network=<DOCKER_NETWORK> \<br> --build_timeout=<BUILD_TIMEOUT_IN_SECONDS><br><br># Register and activate a stack with the new image builder<br>zenml stack register <STACK_NAME> -i <IMAGE_BUILDER_NAME> ... --set<br><br>You also need to set up authentication required to access the Cloud Build GCP services.<br><br>Authentication Methods<br><br>Integrating and using a GCP Image Builder in your pipelines is not possible without employing some form of authentication. If you're looking for a quick way to get started locally, you can use the Local Authentication method. However, the recommended way to authenticate to the GCP cloud platform is through a GCP Service Connector. This is particularly useful if you are configuring ZenML stacks that combine the GCP Image Builder with other remote stack components also running in GCP.<br><br>This method uses the implicit GCP authentication available in the environment where the ZenML code is running. On your local machine, this is the quickest way to configure a GCP Image Builder. You don't need to supply credentials explicitly when you register the GCP Image Builder, as it leverages the local credentials and configuration that the Google Cloud CLI stores on your local machine. However, you will need to install and set up the Google Cloud CLI on your machine as a prerequisite, as covered in the Google Cloud documentation , before you register the GCP Image Builder.<br><br>Stacks using the GCP Image Builder set up with local authentication are not portable across environments. To make ZenML pipelines fully portable, it is recommended to use a GCP Service Connector to authenticate your GCP Image Builder to the GCP cloud platform.</code> |
899
  * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
900
  ```json
901
  {
 
989
  - `dataloader_num_workers`: 0
990
  - `dataloader_prefetch_factor`: None
991
  - `past_index`: -1
992
+ - `disable_tqdm`: True
993
  - `remove_unused_columns`: True
994
  - `label_names`: None
995
  - `load_best_model_at_end`: True
 
1050
  </details>
1051
 
1052
  ### Training Logs
1053
+ | Epoch | Step | dim_128_cosine_map@100 | dim_256_cosine_map@100 | dim_384_cosine_map@100 | dim_64_cosine_map@100 |
1054
  |:-------:|:-----:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|
1055
+ | **1.0** | **1** | **0.625** | **0.6458** | **0.6458** | **0.6458** |
1056
+ | 2.0 | 3 | 0.625 | 0.6458 | 0.6458 | 0.6458 |
1057
+ | 3.0 | 4 | 0.625 | 0.6458 | 0.6458 | 0.6458 |
1058
 
1059
  * The bold row denotes the saved checkpoint.
1060
 
1061
  ### Framework Versions
1062
+ - Python: 3.9.6
1063
+ - Sentence Transformers: 3.0.1
1064
+ - Transformers: 4.44.0
1065
+ - PyTorch: 2.5.1
1066
+ - Accelerate: 0.33.0
1067
+ - Datasets: 2.20.0
1068
  - Tokenizers: 0.19.1
1069
 
1070
  ## Citation
 
1087
  #### MatryoshkaLoss
1088
  ```bibtex
1089
  @misc{kusupati2024matryoshka,
1090
+ title={Matryoshka Representation Learning},
1091
  author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
1092
  year={2024},
1093
  eprint={2205.13147},
 
1099
  #### MultipleNegativesRankingLoss
1100
  ```bibtex
1101
  @misc{henderson2017efficient,
1102
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
1103
  author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
1104
  year={2017},
1105
  eprint={1705.00652},
config.json CHANGED
@@ -19,7 +19,7 @@
19
  "pad_token_id": 0,
20
  "position_embedding_type": "absolute",
21
  "torch_dtype": "float32",
22
- "transformers_version": "4.43.1",
23
  "type_vocab_size": 2,
24
  "use_cache": true,
25
  "vocab_size": 30522
 
19
  "pad_token_id": 0,
20
  "position_embedding_type": "absolute",
21
  "torch_dtype": "float32",
22
+ "transformers_version": "4.44.0",
23
  "type_vocab_size": 2,
24
  "use_cache": true,
25
  "vocab_size": 30522
config_sentence_transformers.json CHANGED
@@ -1,8 +1,8 @@
1
  {
2
  "__version__": {
3
- "sentence_transformers": "3.2.1",
4
- "transformers": "4.43.1",
5
- "pytorch": "2.5.1+cu124"
6
  },
7
  "prompts": {
8
  "query": "Represent this sentence for searching relevant passages: "
 
1
  {
2
  "__version__": {
3
+ "sentence_transformers": "3.0.1",
4
+ "transformers": "4.44.0",
5
+ "pytorch": "2.5.1"
6
  },
7
  "prompts": {
8
  "query": "Represent this sentence for searching relevant passages: "