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
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
---
base_model: sentence-transformers/all-MiniLM-L6-v2
datasets: []
language:
- en
library_name: sentence-transformers
license: apache-2.0
metrics:
- cosine_accuracy@1
- cosine_accuracy@3
- cosine_accuracy@5
- cosine_accuracy@10
- cosine_precision@1
- cosine_precision@3
- cosine_precision@5
- cosine_precision@10
- cosine_recall@1
- cosine_recall@3
- cosine_recall@5
- cosine_recall@10
- cosine_ndcg@10
- cosine_mrr@10
- cosine_map@100
pipeline_tag: sentence-similarity
tags:
- sentence-transformers
- sentence-similarity
- feature-extraction
- generated_from_trainer
- dataset_size:1490
- loss:MatryoshkaLoss
- loss:MultipleNegativesRankingLoss
widget:
- source_sentence: How can I configure the orchestrator settings for each cloud provider
    in ZenML?
  sentences:
  - '. If not set, the cluster will not be autostopped.down: Tear down the cluster
    after all jobs finish (successfully or abnormally). If idle_minutes_to_autostop
    is also set, the cluster will be torn down after the specified idle time. Note
    that if errors occur during provisioning/data syncing/setting up, the cluster
    will not be torn down for debugging purposes.


    stream_logs: If True, show the logs in the terminal as they are generated while
    the cluster is running.


    docker_run_args: Additional arguments to pass to the docker run command. For example,
    [''--gpus=all''] to use all GPUs available on the VM.


    The following code snippets show how to configure the orchestrator settings for
    each cloud provider:


    Code Example:


    from zenml.integrations.skypilot_aws.flavors.skypilot_orchestrator_aws_vm_flavor
    import SkypilotAWSOrchestratorSettings


    skypilot_settings = SkypilotAWSOrchestratorSettings(


    cpus="2",


    memory="16",


    accelerators="V100:2",


    accelerator_args={"tpu_vm": True, "runtime_version": "tpu-vm-base"},


    use_spot=True,


    spot_recovery="recovery_strategy",


    region="us-west-1",


    zone="us-west1-a",


    image_id="ami-1234567890abcdef0",


    disk_size=100,


    disk_tier="high",


    cluster_name="my_cluster",


    retry_until_up=True,


    idle_minutes_to_autostop=60,


    down=True,


    stream_logs=True


    docker_run_args=["--gpus=all"]


    @pipeline(


    settings={


    "orchestrator.vm_aws": skypilot_settings


    Code Example:


    from zenml.integrations.skypilot_gcp.flavors.skypilot_orchestrator_gcp_vm_flavor
    import SkypilotGCPOrchestratorSettings


    skypilot_settings = SkypilotGCPOrchestratorSettings(


    cpus="2",


    memory="16",


    accelerators="V100:2",


    accelerator_args={"tpu_vm": True, "runtime_version": "tpu-vm-base"},


    use_spot=True,


    spot_recovery="recovery_strategy",


    region="us-west1",


    zone="us-west1-a",


    image_id="ubuntu-pro-2004-focal-v20231101",


    disk_size=100,


    disk_tier="high",


    cluster_name="my_cluster",


    retry_until_up=True,


    idle_minutes_to_autostop=60,


    down=True,


    stream_logs=True


    @pipeline(


    settings={


    "orchestrator.vm_gcp": skypilot_settings'
  - 'he Post-execution workflow has changed as follows:The get_pipelines and get_pipeline
    methods have been moved out of the Repository (i.e. the new Client ) class and
    lie directly in the post_execution module now. To use the user has to do:


    from zenml.post_execution import get_pipelines, get_pipeline


    New methods to directly get a run have been introduced: get_run and get_unlisted_runs
    method has been introduced to get unlisted runs.


    Usage remains largely similar. Please read the new docs for post-execution to
    inform yourself of what further has changed.


    How to migrate: Replace all post-execution workflows from the paradigm of Repository.get_pipelines
    or Repository.get_pipeline_run to the corresponding post_execution methods.


    πŸ“‘Future Changes


    While this rehaul is big and will break previous releases, we do have some more
    work left to do. However we also expect this to be the last big rehaul of ZenML
    before our 1.0.0 release, and no other release will be so hard breaking as this
    one. Currently planned future breaking changes are:


    Following the metadata store, the secrets manager stack component might move out
    of the stack.


    ZenML StepContext might be deprecated.


    🐞 Reporting Bugs


    While we have tried our best to document everything that has changed, we realize
    that mistakes can be made and smaller changes overlooked. If this is the case,
    or you encounter a bug at any time, the ZenML core team and community are available
    around the clock on the growing Slack community.


    For bug reports, please also consider submitting a GitHub Issue.


    Lastly, if the new changes have left you desiring a feature, then consider adding
    it to our public feature voting board. Before doing so, do check what is already
    on there and consider upvoting the features you desire the most.


    PreviousMigration guide


    NextMigration guide 0.23.0 β†’ 0.30.0


    Last updated 12 days ago'
  - 'nML, namely an orchestrator and an artifact store.Keep in mind, that each one
    of these components is built on top of base abstractions and is completely extensible.


    Orchestrator


    An Orchestrator is a workhorse that coordinates all the steps to run in a pipeline.
    Since pipelines can be set up with complex combinations of steps with various
    asynchronous dependencies between them, the orchestrator acts as the component
    that decides what steps to run and when to run them.


    ZenML comes with a default local orchestrator designed to run on your local machine.
    This is useful, especially during the exploration phase of your project. You don''t
    have to rent a cloud instance just to try out basic things.


    Artifact Store


    An Artifact Store is a component that houses all data that pass through the pipeline
    as inputs and outputs. Each artifact that gets stored in the artifact store is
    tracked and versioned and this allows for extremely useful features like data
    caching which speeds up your workflows.


    Similar to the orchestrator, ZenML comes with a default local artifact store designed
    to run on your local machine. This is useful, especially during the exploration
    phase of your project. You don''t have to set up a cloud storage system to try
    out basic things.


    Flavor


    ZenML provides a dedicated base abstraction for each stack component type. These
    abstractions are used to develop solutions, called Flavors, tailored to specific
    use cases/tools. With ZenML installed, you get access to a variety of built-in
    and integrated Flavors for each component type, but users can also leverage the
    base abstractions to create their own custom flavors.


    Stack Switching


    When it comes to production-grade solutions, it is rarely enough to just run your
    workflow locally without including any cloud infrastructure.'
- source_sentence: How can I fetch artifacts from other pipelines within a step using
    ZenML?
  sentences:
  - '                                                 ┃┠──────────────────┼──────────────────────────────────────────────────────────────────────────┨


    ┃ EXPIRES IN       β”‚ N/A                                                                      ┃


    ┠──────────────────┼──────────────────────────────────────────────────────────────────────────┨


    ┃ OWNER            β”‚ default                                                                  ┃


    ┠──────────────────┼──────────────────────────────────────────────────────────────────────────┨


    ┃ WORKSPACE        β”‚ default                                                                  ┃


    ┠──────────────────┼──────────────────────────────────────────────────────────────────────────┨


    ┃ SHARED           β”‚ βž–                                                                       ┃


    ┠──────────────────┼──────────────────────────────────────────────────────────────────────────┨


    ┃ CREATED_AT       β”‚ 2023-05-19 09:15:12.882929                                               ┃


    ┠──────────────────┼──────────────────────────────────────────────────────────────────────────┨


    ┃ UPDATED_AT       β”‚ 2023-05-19 09:15:12.882930                                               ┃


    ┗━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛


    Configuration


    ┏━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━┓


    ┃ PROPERTY          β”‚ VALUE      ┃


    ┠───────────────────┼────────────┨


    ┃ project_id        β”‚ zenml-core ┃


    ┠───────────────────┼────────────┨


    ┃ user_account_json β”‚ [HIDDEN]   ┃


    ┗━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━┛


    Local client provisioning


    The local gcloud CLI, the Kubernetes kubectl CLI and the Docker CLI can be configured
    with credentials extracted from or generated by a compatible GCP Service Connector.
    Please note that unlike the configuration made possible through the GCP CLI, the
    Kubernetes and Docker credentials issued by the GCP Service Connector have a short
    lifetime and will need to be regularly refreshed. This is a byproduct of implementing
    a high-security profile.'
  - 'gmax(prediction.numpy())


    return classes[maxindex]The custom predict function should get the model and the
    input data as arguments and return the model predictions. ZenML will automatically
    take care of loading the model into memory and starting the seldon-core-microservice
    that will be responsible for serving the model and running the predict function.


    After defining your custom predict function in code, you can use the seldon_custom_model_deployer_step
    to automatically build your function into a Docker image and deploy it as a model
    server by setting the predict_function argument to the path of your custom_predict
    function:


    from zenml.integrations.seldon.steps import seldon_custom_model_deployer_step


    from zenml.integrations.seldon.services import SeldonDeploymentConfig


    from zenml import pipeline


    @pipeline


    def seldon_deployment_pipeline():


    model = ...


    seldon_custom_model_deployer_step(


    model=model,


    predict_function="<PATH.TO.custom_predict>",  # TODO: path to custom code


    service_config=SeldonDeploymentConfig(


    model_name="<MODEL_NAME>",  # TODO: name of the deployed model


    replicas=1,


    implementation="custom",


    resources=SeldonResourceRequirements(


    limits={"cpu": "200m", "memory": "250Mi"}


    ),


    serviceAccountName="kubernetes-service-account",


    ),


    Advanced Custom Code Deployment with Seldon Core Integration


    Before creating your custom model class, you should take a look at the custom
    Python model section of the Seldon Core documentation.


    The built-in Seldon Core custom deployment step is a good starting point for deploying
    your custom models. However, if you want to deploy more than the trained model,
    you can create your own custom class and a custom step to achieve this.


    See the ZenML custom Seldon model class as a reference.


    PreviousMLflow


    NextBentoML


    Last updated 15 days ago'
  - 'Get arbitrary artifacts in a step


    Not all artifacts need to come through the step interface from direct upstream
    steps.


    As described in the metadata guide, the metadata can be fetched with the client,
    and this is how you would use it to fetch it within a step. This allows you to
    fetch artifacts from other upstream steps or even completely different pipelines.


    from zenml.client import Client


    from zenml import step


    @step


    def my_step():


    client = Client()


    # Directly fetch an artifact


    output = client.get_artifact_version("my_dataset", "my_version")


    output.run_metadata["accuracy"].value


    This is one of the ways you can access artifacts that have already been created
    and stored in the artifact store. This can be useful when you want to use artifacts
    from other pipelines or steps that are not directly upstream.


    See Also


    Managing artifacts - learn about the ExternalArtifact type and how to pass artifacts
    between steps.


    PreviousOrganize data with tags


    NextHandle custom data types


    Last updated 15 days ago'
- source_sentence: Where can I find more information about using Feast in ZenML?
  sentences:
  - 'hat''s described on the feast page: How to use it?.PreviousDevelop a Custom Model
    Registry


    NextFeast


    Last updated 1 year ago'
  - 'other remote stack components also running in AWS.This method uses the implicit
    AWS authentication available in the environment where the ZenML code is running.
    On your local machine, this is the quickest way to configure an S3 Artifact Store.
    You don''t need to supply credentials explicitly when you register the S3 Artifact
    Store, as it leverages the local credentials and configuration that the AWS CLI
    stores on your local machine. However, you will need to install and set up the
    AWS CLI on your machine as a prerequisite, as covered in the AWS CLI documentation,
    before you register the S3 Artifact Store.


    Certain dashboard functionality, such as visualizing or deleting artifacts, is
    not available when using an implicitly authenticated artifact store together with
    a deployed ZenML server because the ZenML server will not have permission to access
    the filesystem.


    The implicit authentication method also needs to be coordinated with other stack
    components that are highly dependent on the Artifact Store and need to interact
    with it directly to work. If these components are not running on your machine,
    they do not have access to the local AWS CLI configuration and will encounter
    authentication failures while trying to access the S3 Artifact Store:


    Orchestrators need to access the Artifact Store to manage pipeline artifacts


    Step Operators need to access the Artifact Store to manage step-level artifacts


    Model Deployers need to access the Artifact Store to load served models


    To enable these use-cases, it is recommended to use an AWS Service Connector to
    link your S3 Artifact Store to the remote S3 bucket.


    To set up the S3 Artifact Store to authenticate to AWS and access an S3 bucket,
    it is recommended to leverage the many features provided by the AWS Service Connector
    such as auto-configuration, best security practices regarding long-lived credentials
    and fine-grained access control and reusing the same credentials across multiple
    stack components.'
  - ' us know!


    Configuration at pipeline or step levelWhen running your ZenML pipeline with the
    Sagemaker orchestrator, the configuration set when configuring the orchestrator
    as a ZenML component will be used by default. However, it is possible to provide
    additional configuration at the pipeline or step level. This allows you to run
    whole pipelines or individual steps with alternative configurations. For example,
    this allows you to run the training process with a heavier, GPU-enabled instance
    type, while running other steps with lighter instances.


    Additional configuration for the Sagemaker orchestrator can be passed via SagemakerOrchestratorSettings.
    Here, it is possible to configure processor_args, which is a dictionary of arguments
    for the Processor. For available arguments, see the Sagemaker documentation .
    Currently, it is not possible to provide custom configuration for the following
    attributes:


    image_uri


    instance_count


    sagemaker_session


    entrypoint


    base_job_name


    env


    For example, settings can be provided in the following way:


    sagemaker_orchestrator_settings = SagemakerOrchestratorSettings(


    processor_args={


    "instance_type": "ml.t3.medium",


    "volume_size_in_gb": 30


    They can then be applied to a step as follows:


    @step(settings={"orchestrator.sagemaker": sagemaker_orchestrator_settings})


    For example, if your ZenML component is configured to use ml.c5.xlarge with 400GB
    additional storage by default, all steps will use it except for the step above,
    which will use ml.t3.medium with 30GB additional storage.


    Check out this docs page for more information on how to specify settings in general.


    For more information and a full list of configurable attributes of the Sagemaker
    orchestrator, check out the SDK Docs .


    S3 data access in ZenML steps'
- source_sentence: How is the AWS region specified in the configuration for ZenML?
  sentences:
  - 'ge or if the ZenML version doesn''t change at all).a backup file or database
    is created before every database migration attempt (i.e. during every Helm upgrade).
    If a backup already exists (i.e. persisted in a persistent volume or backup database),
    it is overwritten.


    the persistent backup file or database is cleaned up after the migration is completed
    successfully or if the database doesn''t need to undergo a migration. This includes
    backups created by previous failed migration attempts.


    the persistent backup file or database is NOT cleaned up after a failed migration.
    This allows the user to manually inspect and/or apply the backup if the automatic
    recovery fails.


    The following example shows how to configure the ZenML server to use a persistent
    volume to store the database dump file:


    zenml:


    # ...


    database:


    url: "mysql://admin:[email protected]:3306/zenml"


    # Configure the database backup strategy


    backupStrategy: dump-file


    backupPVStorageSize: 1Gi


    podSecurityContext:


    fsGroup: 1000 # if you''re using a PVC for backup, this should necessarily be
    set.


    PreviousDeploy with Docker


    NextDeploy using HuggingFace Spaces


    Last updated 15 days ago'
  - '🌲Control logging


    Configuring ZenML''s default logging behavior


    ZenML produces various kinds of logs:


    The ZenML Server produces server logs (like any FastAPI server).


    The Client or Runner environment produces logs, for example after running a pipeline.
    These are steps that are typically before, after, and during the creation of a
    pipeline run.


    The Execution environment (on the orchestrator level) produces logs when it executes
    each step of a pipeline. These are logs that are typically written in your steps
    using the python logging module.


    This section talks about how users can control logging behavior in these various
    environments.


    PreviousTrain with GPUs


    NextView logs on the dashboard


    Last updated 19 days ago'
  - '                                                 ┃┠──────────────────┼─────────────────────────────────────────────────────────────────────┨


    ┃ SHARED           β”‚ βž–                                                                  ┃


    ┠──────────────────┼─────────────────────────────────────────────────────────────────────┨


    ┃ CREATED_AT       β”‚ 2023-06-19 18:12:42.066053                                          ┃


    ┠──────────────────┼─────────────────────────────────────────────────────────────────────┨


    ┃ UPDATED_AT       β”‚ 2023-06-19 18:12:42.066055                                          ┃


    ┗━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┛


    Configuration


    ┏━━━━━━━━━━━━━━━━━━━━━━━┯━━━━━━━━━━━┓


    ┃ PROPERTY              β”‚ VALUE     ┃


    ┠───────────────────────┼───────────┨


    ┃ region                β”‚ us-east-1 ┃


    ┠───────────────────────┼───────────┨


    ┃ aws_access_key_id     β”‚ [HIDDEN]  ┃


    ┠───────────────────────┼───────────┨


    ┃ aws_secret_access_key β”‚ [HIDDEN]  ┃


    ┗━━━━━━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━┛


    AWS Secret Key


    Long-lived AWS credentials consisting of an AWS access key ID and secret access
    key associated with an AWS IAM user or AWS account root user (not recommended).


    This method is preferred during development and testing due to its simplicity
    and ease of use. It is not recommended as a direct authentication method for production
    use cases because the clients have direct access to long-lived credentials and
    are granted the full set of permissions of the IAM user or AWS account root user
    associated with the credentials. For production, it is recommended to use the
    AWS IAM Role, AWS Session Token, or AWS Federation Token authentication method
    instead.


    An AWS region is required and the connector may only be used to access AWS resources
    in the specified region.


    If you already have the local AWS CLI set up with these credentials, they will
    be automatically picked up when auto-configuration is used (see the example below).'
- source_sentence: Can you explain how the `query_similar_docs` function handles document
    reranking?
  sentences:
  - 'ry_similar_docs(


    question: str,


    url_ending: str,use_reranking: bool = False,


    returned_sample_size: int = 5,


    ) -> Tuple[str, str, List[str]]:


    """Query similar documents for a given question and URL ending."""


    embedded_question = get_embeddings(question)


    db_conn = get_db_conn()


    num_docs = 20 if use_reranking else returned_sample_size


    # get (content, url) tuples for the top n similar documents


    top_similar_docs = get_topn_similar_docs(


    embedded_question, db_conn, n=num_docs, include_metadata=True


    if use_reranking:


    reranked_docs_and_urls = rerank_documents(question, top_similar_docs)[


    :returned_sample_size


    urls = [doc[1] for doc in reranked_docs_and_urls]


    else:


    urls = [doc[1] for doc in top_similar_docs]  # Unpacking URLs


    return (question, url_ending, urls)


    We get the embeddings for the question being passed into the function and connect
    to our PostgreSQL database. If we''re using reranking, we get the top 20 documents
    similar to our query and rerank them using the rerank_documents helper function.
    We then extract the URLs from the reranked documents and return them. Note that
    we only return 5 URLs, but in the case of reranking we get a larger number of
    documents and URLs back from the database to pass to our reranker, but in the
    end we always choose the top five reranked documents to return.


    Now that we''ve added reranking to our pipeline, we can evaluate the performance
    of our reranker and see how it affects the quality of the retrieved documents.


    Code Example


    To explore the full code, visit the Complete Guide repository and for this section,
    particularly the eval_retrieval.py file.


    PreviousUnderstanding reranking


    NextEvaluating reranking performance


    Last updated 15 days ago'
  - 'uter vision that expect a single dataset as input.model drift checks require
    two datasets and a mandatory model as input. This list includes a subset of the
    model evaluation checks provided by Deepchecks for tabular data and for computer
    vision that expect two datasets as input: target and reference.


    This structure is directly reflected in how Deepchecks can be used with ZenML:
    there are four different Deepchecks standard steps and four different ZenML enums
    for Deepchecks checks . The Deepchecks Data Validator API is also modeled to reflect
    this same structure.


    A notable characteristic of Deepchecks is that you don''t need to customize the
    set of Deepchecks tests that are part of a test suite. Both ZenML and Deepchecks
    provide sane defaults that will run all available Deepchecks tests in a given
    category with their default conditions if a custom list of tests and conditions
    are not provided.


    There are three ways you can use Deepchecks in your ZenML pipelines that allow
    different levels of flexibility:


    instantiate, configure and insert one or more of the standard Deepchecks steps
    shipped with ZenML into your pipelines. This is the easiest way and the recommended
    approach, but can only be customized through the supported step configuration
    parameters.


    call the data validation methods provided by the Deepchecks Data Validator in
    your custom step implementation. This method allows for more flexibility concerning
    what can happen in the pipeline step, but you are still limited to the functionality
    implemented in the Data Validator.


    use the Deepchecks library directly in your custom step implementation. This gives
    you complete freedom in how you are using Deepchecks'' features.


    You can visualize Deepchecks results in Jupyter notebooks or view them directly
    in the ZenML dashboard.


    Warning! Usage in remote orchestrators'
  - ' use for the database connection.

    database_ssl_ca:# The path to the client SSL certificate to use for the database
    connection.

    database_ssl_cert:


    # The path to the client SSL key to use for the database connection.

    database_ssl_key:


    # Whether to verify the database server SSL certificate.

    database_ssl_verify_server_cert:


    Run the deploy command and pass the config file above to it.Copyzenml deploy --config=/PATH/TO/FILENote
    To be able to run the deploy command, you should have your cloud provider''s CLI
    configured locally with permissions to create resources like MySQL databases and
    networks.


    Configuration file templates


    Base configuration file


    Below is the general structure of a config file. Use this as a base and then add
    any cloud-specific parameters from the sections below.


    # Name of the server deployment.


    name:


    # The server provider type, one of aws, gcp or azure.


    provider:


    # The path to the kubectl config file to use for deployment.


    kubectl_config_path:


    # The Kubernetes namespace to deploy the ZenML server to.


    namespace: zenmlserver


    # The path to the ZenML server helm chart to use for deployment.


    helm_chart:


    # The repository and tag to use for the ZenML server Docker image.


    zenmlserver_image_repo: zenmldocker/zenml


    zenmlserver_image_tag: latest


    # Whether to deploy an nginx ingress controller as part of the deployment.


    create_ingress_controller: true


    # Whether to use TLS for the ingress.


    ingress_tls: true


    # Whether to generate self-signed TLS certificates for the ingress.


    ingress_tls_generate_certs: true


    # The name of the Kubernetes secret to use for the ingress.


    ingress_tls_secret_name: zenml-tls-certs


    # The ingress controller''s IP address. The ZenML server will be exposed on a
    subdomain of this IP. For AWS, if you have a hostname instead, use the following
    command to get the IP address: `dig +short <hostname>`.


    ingress_controller_ip:


    # Whether to create a SQL database service as part of the recipe.


    deploy_db: true


    # The username and password for the database.'
model-index:
- name: strickvl/finetuned-all-MiniLM-L6-v2
  results:
  - task:
      type: information-retrieval
      name: Information Retrieval
    dataset:
      name: dim 384
      type: dim_384
    metrics:
    - type: cosine_accuracy@1
      value: 0.30120481927710846
      name: Cosine Accuracy@1
    - type: cosine_accuracy@3
      value: 0.5421686746987951
      name: Cosine Accuracy@3
    - type: cosine_accuracy@5
      value: 0.6746987951807228
      name: Cosine Accuracy@5
    - type: cosine_accuracy@10
      value: 0.7409638554216867
      name: Cosine Accuracy@10
    - type: cosine_precision@1
      value: 0.30120481927710846
      name: Cosine Precision@1
    - type: cosine_precision@3
      value: 0.18072289156626503
      name: Cosine Precision@3
    - type: cosine_precision@5
      value: 0.13493975903614455
      name: Cosine Precision@5
    - type: cosine_precision@10
      value: 0.07409638554216866
      name: Cosine Precision@10
    - type: cosine_recall@1
      value: 0.30120481927710846
      name: Cosine Recall@1
    - type: cosine_recall@3
      value: 0.5421686746987951
      name: Cosine Recall@3
    - type: cosine_recall@5
      value: 0.6746987951807228
      name: Cosine Recall@5
    - type: cosine_recall@10
      value: 0.7409638554216867
      name: Cosine Recall@10
    - type: cosine_ndcg@10
      value: 0.5191955019858888
      name: Cosine Ndcg@10
    - type: cosine_mrr@10
      value: 0.44787244214955063
      name: Cosine Mrr@10
    - type: cosine_map@100
      value: 0.4579267717676669
      name: Cosine Map@100
  - task:
      type: information-retrieval
      name: Information Retrieval
    dataset:
      name: dim 256
      type: dim_256
    metrics:
    - type: cosine_accuracy@1
      value: 0.29518072289156627
      name: Cosine Accuracy@1
    - type: cosine_accuracy@3
      value: 0.5301204819277109
      name: Cosine Accuracy@3
    - type: cosine_accuracy@5
      value: 0.6325301204819277
      name: Cosine Accuracy@5
    - type: cosine_accuracy@10
      value: 0.7349397590361446
      name: Cosine Accuracy@10
    - type: cosine_precision@1
      value: 0.29518072289156627
      name: Cosine Precision@1
    - type: cosine_precision@3
      value: 0.17670682730923695
      name: Cosine Precision@3
    - type: cosine_precision@5
      value: 0.12650602409638553
      name: Cosine Precision@5
    - type: cosine_precision@10
      value: 0.07349397590361445
      name: Cosine Precision@10
    - type: cosine_recall@1
      value: 0.29518072289156627
      name: Cosine Recall@1
    - type: cosine_recall@3
      value: 0.5301204819277109
      name: Cosine Recall@3
    - type: cosine_recall@5
      value: 0.6325301204819277
      name: Cosine Recall@5
    - type: cosine_recall@10
      value: 0.7349397590361446
      name: Cosine Recall@10
    - type: cosine_ndcg@10
      value: 0.5118888198675068
      name: Cosine Ndcg@10
    - type: cosine_mrr@10
      value: 0.4409805890227577
      name: Cosine Mrr@10
    - type: cosine_map@100
      value: 0.45029464689656734
      name: Cosine Map@100
  - task:
      type: information-retrieval
      name: Information Retrieval
    dataset:
      name: dim 128
      type: dim_128
    metrics:
    - type: cosine_accuracy@1
      value: 0.2710843373493976
      name: Cosine Accuracy@1
    - type: cosine_accuracy@3
      value: 0.5120481927710844
      name: Cosine Accuracy@3
    - type: cosine_accuracy@5
      value: 0.6144578313253012
      name: Cosine Accuracy@5
    - type: cosine_accuracy@10
      value: 0.6987951807228916
      name: Cosine Accuracy@10
    - type: cosine_precision@1
      value: 0.2710843373493976
      name: Cosine Precision@1
    - type: cosine_precision@3
      value: 0.1706827309236948
      name: Cosine Precision@3
    - type: cosine_precision@5
      value: 0.12289156626506023
      name: Cosine Precision@5
    - type: cosine_precision@10
      value: 0.06987951807228915
      name: Cosine Precision@10
    - type: cosine_recall@1
      value: 0.2710843373493976
      name: Cosine Recall@1
    - type: cosine_recall@3
      value: 0.5120481927710844
      name: Cosine Recall@3
    - type: cosine_recall@5
      value: 0.6144578313253012
      name: Cosine Recall@5
    - type: cosine_recall@10
      value: 0.6987951807228916
      name: Cosine Recall@10
    - type: cosine_ndcg@10
      value: 0.4883715088201252
      name: Cosine Ndcg@10
    - type: cosine_mrr@10
      value: 0.4208237712755786
      name: Cosine Mrr@10
    - type: cosine_map@100
      value: 0.4307910346351659
      name: Cosine Map@100
  - task:
      type: information-retrieval
      name: Information Retrieval
    dataset:
      name: dim 64
      type: dim_64
    metrics:
    - type: cosine_accuracy@1
      value: 0.25301204819277107
      name: Cosine Accuracy@1
    - type: cosine_accuracy@3
      value: 0.4578313253012048
      name: Cosine Accuracy@3
    - type: cosine_accuracy@5
      value: 0.5542168674698795
      name: Cosine Accuracy@5
    - type: cosine_accuracy@10
      value: 0.6566265060240963
      name: Cosine Accuracy@10
    - type: cosine_precision@1
      value: 0.25301204819277107
      name: Cosine Precision@1
    - type: cosine_precision@3
      value: 0.15261044176706828
      name: Cosine Precision@3
    - type: cosine_precision@5
      value: 0.1108433734939759
      name: Cosine Precision@5
    - type: cosine_precision@10
      value: 0.06566265060240963
      name: Cosine Precision@10
    - type: cosine_recall@1
      value: 0.25301204819277107
      name: Cosine Recall@1
    - type: cosine_recall@3
      value: 0.4578313253012048
      name: Cosine Recall@3
    - type: cosine_recall@5
      value: 0.5542168674698795
      name: Cosine Recall@5
    - type: cosine_recall@10
      value: 0.6566265060240963
      name: Cosine Recall@10
    - type: cosine_ndcg@10
      value: 0.4465853836525359
      name: Cosine Ndcg@10
    - type: cosine_mrr@10
      value: 0.380495792694588
      name: Cosine Mrr@10
    - type: cosine_map@100
      value: 0.39060460620612997
      name: Cosine Map@100
---

# strickvl/finetuned-all-MiniLM-L6-v2

This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.

## Model Details

### Model Description
- **Model Type:** Sentence Transformer
- **Base model:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) <!-- at revision 8b3219a92973c328a8e22fadcfa821b5dc75636a -->
- **Maximum Sequence Length:** 256 tokens
- **Output Dimensionality:** 384 tokens
- **Similarity Function:** Cosine Similarity
<!-- - **Training Dataset:** Unknown -->
- **Language:** en
- **License:** apache-2.0

### Model Sources

- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)

### Full Model Architecture

```
SentenceTransformer(
  (0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel 
  (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
  (2): Normalize()
)
```

## Usage

### Direct Usage (Sentence Transformers)

First install the Sentence Transformers library:

```bash
pip install -U sentence-transformers
```

Then you can load this model and run inference.
```python
from sentence_transformers import SentenceTransformer

# Download from the πŸ€— Hub
model = SentenceTransformer("strickvl/finetuned-all-MiniLM-L6-v2")
# Run inference
sentences = [
    'Can you explain how the `query_similar_docs` function handles document reranking?',
    'ry_similar_docs(\n\nquestion: str,\n\nurl_ending: str,use_reranking: bool = False,\n\nreturned_sample_size: int = 5,\n\n) -> Tuple[str, str, List[str]]:\n\n"""Query similar documents for a given question and URL ending."""\n\nembedded_question = get_embeddings(question)\n\ndb_conn = get_db_conn()\n\nnum_docs = 20 if use_reranking else returned_sample_size\n\n# get (content, url) tuples for the top n similar documents\n\ntop_similar_docs = get_topn_similar_docs(\n\nembedded_question, db_conn, n=num_docs, include_metadata=True\n\nif use_reranking:\n\nreranked_docs_and_urls = rerank_documents(question, top_similar_docs)[\n\n:returned_sample_size\n\nurls = [doc[1] for doc in reranked_docs_and_urls]\n\nelse:\n\nurls = [doc[1] for doc in top_similar_docs]  # Unpacking URLs\n\nreturn (question, url_ending, urls)\n\nWe get the embeddings for the question being passed into the function and connect to our PostgreSQL database. If we\'re using reranking, we get the top 20 documents similar to our query and rerank them using the rerank_documents helper function. We then extract the URLs from the reranked documents and return them. Note that we only return 5 URLs, but in the case of reranking we get a larger number of documents and URLs back from the database to pass to our reranker, but in the end we always choose the top five reranked documents to return.\n\nNow that we\'ve added reranking to our pipeline, we can evaluate the performance of our reranker and see how it affects the quality of the retrieved documents.\n\nCode Example\n\nTo explore the full code, visit the Complete Guide repository and for this section, particularly the eval_retrieval.py file.\n\nPreviousUnderstanding reranking\n\nNextEvaluating reranking performance\n\nLast updated 15 days ago',
    " use for the database connection.\ndatabase_ssl_ca:# The path to the client SSL certificate to use for the database connection.\ndatabase_ssl_cert:\n\n# The path to the client SSL key to use for the database connection.\ndatabase_ssl_key:\n\n# Whether to verify the database server SSL certificate.\ndatabase_ssl_verify_server_cert:\n\nRun the deploy command and pass the config file above to it.Copyzenml deploy --config=/PATH/TO/FILENote To be able to run the deploy command, you should have your cloud provider's CLI configured locally with permissions to create resources like MySQL databases and networks.\n\nConfiguration file templates\n\nBase configuration file\n\nBelow is the general structure of a config file. Use this as a base and then add any cloud-specific parameters from the sections below.\n\n# Name of the server deployment.\n\nname:\n\n# The server provider type, one of aws, gcp or azure.\n\nprovider:\n\n# The path to the kubectl config file to use for deployment.\n\nkubectl_config_path:\n\n# The Kubernetes namespace to deploy the ZenML server to.\n\nnamespace: zenmlserver\n\n# The path to the ZenML server helm chart to use for deployment.\n\nhelm_chart:\n\n# The repository and tag to use for the ZenML server Docker image.\n\nzenmlserver_image_repo: zenmldocker/zenml\n\nzenmlserver_image_tag: latest\n\n# Whether to deploy an nginx ingress controller as part of the deployment.\n\ncreate_ingress_controller: true\n\n# Whether to use TLS for the ingress.\n\ningress_tls: true\n\n# Whether to generate self-signed TLS certificates for the ingress.\n\ningress_tls_generate_certs: true\n\n# The name of the Kubernetes secret to use for the ingress.\n\ningress_tls_secret_name: zenml-tls-certs\n\n# The ingress controller's IP address. The ZenML server will be exposed on a subdomain of this IP. For AWS, if you have a hostname instead, use the following command to get the IP address: `dig +short <hostname>`.\n\ningress_controller_ip:\n\n# Whether to create a SQL database service as part of the recipe.\n\ndeploy_db: true\n\n# The username and password for the database.",
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
```

<!--
### Direct Usage (Transformers)

<details><summary>Click to see the direct usage in Transformers</summary>

</details>
-->

<!--
### Downstream Usage (Sentence Transformers)

You can finetune this model on your own dataset.

<details><summary>Click to expand</summary>

</details>
-->

<!--
### Out-of-Scope Use

*List how the model may foreseeably be misused and address what users ought not to do with the model.*
-->

## Evaluation

### Metrics

#### Information Retrieval
* Dataset: `dim_384`
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)

| Metric              | Value      |
|:--------------------|:-----------|
| cosine_accuracy@1   | 0.3012     |
| cosine_accuracy@3   | 0.5422     |
| cosine_accuracy@5   | 0.6747     |
| cosine_accuracy@10  | 0.741      |
| cosine_precision@1  | 0.3012     |
| cosine_precision@3  | 0.1807     |
| cosine_precision@5  | 0.1349     |
| cosine_precision@10 | 0.0741     |
| cosine_recall@1     | 0.3012     |
| cosine_recall@3     | 0.5422     |
| cosine_recall@5     | 0.6747     |
| cosine_recall@10    | 0.741      |
| cosine_ndcg@10      | 0.5192     |
| cosine_mrr@10       | 0.4479     |
| **cosine_map@100**  | **0.4579** |

#### Information Retrieval
* Dataset: `dim_256`
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)

| Metric              | Value      |
|:--------------------|:-----------|
| cosine_accuracy@1   | 0.2952     |
| cosine_accuracy@3   | 0.5301     |
| cosine_accuracy@5   | 0.6325     |
| cosine_accuracy@10  | 0.7349     |
| cosine_precision@1  | 0.2952     |
| cosine_precision@3  | 0.1767     |
| cosine_precision@5  | 0.1265     |
| cosine_precision@10 | 0.0735     |
| cosine_recall@1     | 0.2952     |
| cosine_recall@3     | 0.5301     |
| cosine_recall@5     | 0.6325     |
| cosine_recall@10    | 0.7349     |
| cosine_ndcg@10      | 0.5119     |
| cosine_mrr@10       | 0.441      |
| **cosine_map@100**  | **0.4503** |

#### Information Retrieval
* Dataset: `dim_128`
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)

| Metric              | Value      |
|:--------------------|:-----------|
| cosine_accuracy@1   | 0.2711     |
| cosine_accuracy@3   | 0.512      |
| cosine_accuracy@5   | 0.6145     |
| cosine_accuracy@10  | 0.6988     |
| cosine_precision@1  | 0.2711     |
| cosine_precision@3  | 0.1707     |
| cosine_precision@5  | 0.1229     |
| cosine_precision@10 | 0.0699     |
| cosine_recall@1     | 0.2711     |
| cosine_recall@3     | 0.512      |
| cosine_recall@5     | 0.6145     |
| cosine_recall@10    | 0.6988     |
| cosine_ndcg@10      | 0.4884     |
| cosine_mrr@10       | 0.4208     |
| **cosine_map@100**  | **0.4308** |

#### Information Retrieval
* Dataset: `dim_64`
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)

| Metric              | Value      |
|:--------------------|:-----------|
| cosine_accuracy@1   | 0.253      |
| cosine_accuracy@3   | 0.4578     |
| cosine_accuracy@5   | 0.5542     |
| cosine_accuracy@10  | 0.6566     |
| cosine_precision@1  | 0.253      |
| cosine_precision@3  | 0.1526     |
| cosine_precision@5  | 0.1108     |
| cosine_precision@10 | 0.0657     |
| cosine_recall@1     | 0.253      |
| cosine_recall@3     | 0.4578     |
| cosine_recall@5     | 0.5542     |
| cosine_recall@10    | 0.6566     |
| cosine_ndcg@10      | 0.4466     |
| cosine_mrr@10       | 0.3805     |
| **cosine_map@100**  | **0.3906** |

<!--
## Bias, Risks and Limitations

*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
-->

<!--
### Recommendations

*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
-->

## Training Details

### Training Dataset

#### Unnamed Dataset


* Size: 1,490 training samples
* Columns: <code>positive</code> and <code>anchor</code>
* Approximate statistics based on the first 1000 samples:
  |         | positive                                                                          | anchor                                                                               |
  |:--------|:----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
  | type    | string                                                                            | string                                                                               |
  | details | <ul><li>min: 9 tokens</li><li>mean: 21.12 tokens</li><li>max: 49 tokens</li></ul> | <ul><li>min: 21 tokens</li><li>mean: 240.72 tokens</li><li>max: 256 tokens</li></ul> |
* Samples:
  | positive                                                                                                                   | anchor                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      |
  |:---------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
  | <code>Can you provide the details for the Azure service principal with the ID 273d2812-2643-4446-82e6-6098b8ccdaa4?</code> | <code>                                                 ┃┠──────────────────┼────────────────────────────────────────────────────────────────────────────────┨<br><br>┃ ID               β”‚ 273d2812-2643-4446-82e6-6098b8ccdaa4                                           ┃<br><br>┠──────────────────┼────────────────────────────────────────────────────────────────────────────────┨<br><br>┃ NAME             β”‚ azure-service-principal                                                        ┃<br><br>┠──────────────────┼────────────────────────────────────────────────────────────────────────────────┨<br><br>┃ TYPE             β”‚ πŸ‡¦  azure                                                                       ┃<br><br>┠──────────────────┼────────────────────────────────────────────────────────────────────────────────┨<br><br>┃ AUTH METHOD      β”‚ service-principal                                                              ┃<br><br>┠──────────────────┼────────────────────────────────────────────────────────────────────────────────┨<br><br>┃ RESOURCE TYPES   β”‚ πŸ‡¦  azure-generic, πŸ“¦ blob-container, πŸŒ€ kubernetes-cluster, 🐳 docker-registry ┃<br><br>┠──────────────────┼────────────────────────────────────────────────────────────────────────────────┨<br><br>┃ RESOURCE NAME    β”‚ <multiple>                                                                     ┃<br><br>┠──────────────────┼────────────────────────────────────────────────────────────────────────────────┨<br><br>┃ SECRET ID        β”‚ 50d9f230-c4ea-400e-b2d7-6b52ba2a6f90                                           ┃<br><br>┠──────────────────┼────────────────────────────────────────────────────────────────────────────────┨<br><br>┃ SESSION DURATION β”‚ N/A                                                                            ┃<br><br>┠──────────────────┼────────────────────────────────────────────────────────────────────────────────┨<br><br>┃ EXPIRES IN       β”‚ N/A                                                                            ┃<br><br>┠──────────────────┼────────────────────────────────────────────────────────────────────────────────┨</code> |
  | <code>What are the new features introduced in ZenML 0.20.0 regarding the Metadata Store?</code>                            | <code>ed to update the way they are registered in ZenML.the updated ZenML server provides a new and improved collaborative experience. When connected to a ZenML server, you can now share your ZenML Stacks and Stack Components with other users. If you were previously using the ZenML Profiles or the ZenML server to share your ZenML Stacks, you should switch to the new ZenML server and Dashboard and update your existing workflows to reflect the new features.<br><br>ZenML takes over the Metadata Store role<br><br>ZenML can now run as a server that can be accessed via a REST API and also comes with a visual user interface (called the ZenML Dashboard). This server can be deployed in arbitrary environments (local, on-prem, via Docker, on AWS, GCP, Azure etc.) and supports user management, workspace scoping, and more.<br><br>The release introduces a series of commands to facilitate managing the lifecycle of the ZenML server and to access the pipeline and pipeline run information:<br><br>zenml connect / disconnect / down / up / logs / status can be used to configure your client to connect to a ZenML server, to start a local ZenML Dashboard or to deploy a ZenML server to a cloud environment. For more information on how to use these commands, see the ZenML deployment documentation.<br><br>zenml pipeline list / runs / delete can be used to display information and about and manage your pipelines and pipeline runs.<br><br>In ZenML 0.13.2 and earlier versions, information about pipelines and pipeline runs used to be stored in a separate stack component called the Metadata Store. Starting with 0.20.0, the role of the Metadata Store is now taken over by ZenML itself. This means that the Metadata Store is no longer a separate component in the ZenML architecture, but rather a part of the ZenML core, located wherever ZenML is deployed: locally on your machine or running remotely as a server.</code>                                                                                                                                                                                                                     |
  | <code>Which environment variables should I set to use the Azure Service Connector authentication method in ZenML?</code>   | <code>-client-id","client_secret": "my-client-secret"}).Note: The remaining configuration options are deprecated and may be removed in a future release. Instead, you should set the ZENML_SECRETS_STORE_AUTH_METHOD and ZENML_SECRETS_STORE_AUTH_CONFIG variables to use the Azure Service Connector authentication method.<br><br>ZENML_SECRETS_STORE_AZURE_CLIENT_ID: The Azure application service principal client ID to use to authenticate with the Azure Key Vault API. If you are running the ZenML server hosted in Azure and are using a managed identity to access the Azure Key Vault service, you can omit this variable.<br><br>ZENML_SECRETS_STORE_AZURE_CLIENT_SECRET: The Azure application service principal client secret to use to authenticate with the Azure Key Vault API. If you are running the ZenML server hosted in Azure and are using a managed identity to access the Azure Key Vault service, you can omit this variable.<br><br>ZENML_SECRETS_STORE_AZURE_TENANT_ID: The Azure application service principal tenant ID to use to authenticate with the Azure Key Vault API. If you are running the ZenML server hosted in Azure and are using a managed identity to access the Azure Key Vault service, you can omit this variable.<br><br>These configuration options are only relevant if you're using Hashicorp Vault as the secrets store backend.<br><br>ZENML_SECRETS_STORE_TYPE: Set this to hashicorp in order to set this type of secret store.<br><br>ZENML_SECRETS_STORE_VAULT_ADDR: The URL of the HashiCorp Vault server to connect to. NOTE: this is the same as setting the VAULT_ADDR environment variable.<br><br>ZENML_SECRETS_STORE_VAULT_TOKEN: The token to use to authenticate with the HashiCorp Vault server. NOTE: this is the same as setting the VAULT_TOKEN environment variable.<br><br>ZENML_SECRETS_STORE_VAULT_NAMESPACE: The Vault Enterprise namespace. Not required for Vault OSS. NOTE: this is the same as setting the VAULT_NAMESPACE environment variable.</code>                                                                                                                                                                  |
* Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
  ```json
  {
      "loss": "MultipleNegativesRankingLoss",
      "matryoshka_dims": [
          384,
          256,
          128,
          64
      ],
      "matryoshka_weights": [
          1,
          1,
          1,
          1
      ],
      "n_dims_per_step": -1
  }
  ```

### Training Hyperparameters
#### Non-Default Hyperparameters

- `eval_strategy`: epoch
- `per_device_train_batch_size`: 32
- `per_device_eval_batch_size`: 16
- `gradient_accumulation_steps`: 16
- `learning_rate`: 2e-05
- `num_train_epochs`: 4
- `lr_scheduler_type`: cosine
- `warmup_ratio`: 0.1
- `bf16`: True
- `tf32`: True
- `load_best_model_at_end`: True
- `optim`: adamw_torch_fused
- `batch_sampler`: no_duplicates

#### All Hyperparameters
<details><summary>Click to expand</summary>

- `overwrite_output_dir`: False
- `do_predict`: False
- `eval_strategy`: epoch
- `prediction_loss_only`: True
- `per_device_train_batch_size`: 32
- `per_device_eval_batch_size`: 16
- `per_gpu_train_batch_size`: None
- `per_gpu_eval_batch_size`: None
- `gradient_accumulation_steps`: 16
- `eval_accumulation_steps`: None
- `learning_rate`: 2e-05
- `weight_decay`: 0.0
- `adam_beta1`: 0.9
- `adam_beta2`: 0.999
- `adam_epsilon`: 1e-08
- `max_grad_norm`: 1.0
- `num_train_epochs`: 4
- `max_steps`: -1
- `lr_scheduler_type`: cosine
- `lr_scheduler_kwargs`: {}
- `warmup_ratio`: 0.1
- `warmup_steps`: 0
- `log_level`: passive
- `log_level_replica`: warning
- `log_on_each_node`: True
- `logging_nan_inf_filter`: True
- `save_safetensors`: True
- `save_on_each_node`: False
- `save_only_model`: False
- `restore_callback_states_from_checkpoint`: False
- `no_cuda`: False
- `use_cpu`: False
- `use_mps_device`: False
- `seed`: 42
- `data_seed`: None
- `jit_mode_eval`: False
- `use_ipex`: False
- `bf16`: True
- `fp16`: False
- `fp16_opt_level`: O1
- `half_precision_backend`: auto
- `bf16_full_eval`: False
- `fp16_full_eval`: False
- `tf32`: True
- `local_rank`: 0
- `ddp_backend`: None
- `tpu_num_cores`: None
- `tpu_metrics_debug`: False
- `debug`: []
- `dataloader_drop_last`: False
- `dataloader_num_workers`: 0
- `dataloader_prefetch_factor`: None
- `past_index`: -1
- `disable_tqdm`: True
- `remove_unused_columns`: True
- `label_names`: None
- `load_best_model_at_end`: True
- `ignore_data_skip`: False
- `fsdp`: []
- `fsdp_min_num_params`: 0
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
- `fsdp_transformer_layer_cls_to_wrap`: None
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
- `deepspeed`: None
- `label_smoothing_factor`: 0.0
- `optim`: adamw_torch_fused
- `optim_args`: None
- `adafactor`: False
- `group_by_length`: False
- `length_column_name`: length
- `ddp_find_unused_parameters`: None
- `ddp_bucket_cap_mb`: None
- `ddp_broadcast_buffers`: False
- `dataloader_pin_memory`: True
- `dataloader_persistent_workers`: False
- `skip_memory_metrics`: True
- `use_legacy_prediction_loop`: False
- `push_to_hub`: False
- `resume_from_checkpoint`: None
- `hub_model_id`: None
- `hub_strategy`: every_save
- `hub_private_repo`: False
- `hub_always_push`: False
- `gradient_checkpointing`: False
- `gradient_checkpointing_kwargs`: None
- `include_inputs_for_metrics`: False
- `eval_do_concat_batches`: True
- `fp16_backend`: auto
- `push_to_hub_model_id`: None
- `push_to_hub_organization`: None
- `mp_parameters`: 
- `auto_find_batch_size`: False
- `full_determinism`: False
- `torchdynamo`: None
- `ray_scope`: last
- `ddp_timeout`: 1800
- `torch_compile`: False
- `torch_compile_backend`: None
- `torch_compile_mode`: None
- `dispatch_batches`: None
- `split_batches`: None
- `include_tokens_per_second`: False
- `include_num_input_tokens_seen`: False
- `neftune_noise_alpha`: None
- `optim_target_modules`: None
- `batch_eval_metrics`: False
- `batch_sampler`: no_duplicates
- `multi_dataset_batch_sampler`: proportional

</details>

### Training Logs
| Epoch      | Step  | dim_128_cosine_map@100 | dim_256_cosine_map@100 | dim_384_cosine_map@100 | dim_64_cosine_map@100 |
|:----------:|:-----:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|
| 0.6667     | 1     | 0.3800                 | 0.3986                 | 0.4149                 | 0.3471                |
| 2.0        | 3     | 0.4194                 | 0.4473                 | 0.4557                 | 0.3762                |
| **2.6667** | **4** | **0.4308**             | **0.4503**             | **0.4579**             | **0.3906**            |

* The bold row denotes the saved checkpoint.

### Framework Versions
- Python: 3.10.14
- Sentence Transformers: 3.0.1
- Transformers: 4.41.2
- PyTorch: 2.3.1+cu121
- Accelerate: 0.31.0
- Datasets: 2.19.1
- Tokenizers: 0.19.1

## Citation

### BibTeX

#### Sentence Transformers
```bibtex
@inproceedings{reimers-2019-sentence-bert,
    title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
    author = "Reimers, Nils and Gurevych, Iryna",
    booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
    month = "11",
    year = "2019",
    publisher = "Association for Computational Linguistics",
    url = "https://arxiv.org/abs/1908.10084",
}
```

#### MatryoshkaLoss
```bibtex
@misc{kusupati2024matryoshka,
    title={Matryoshka Representation Learning}, 
    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},
    year={2024},
    eprint={2205.13147},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}
```

#### MultipleNegativesRankingLoss
```bibtex
@misc{henderson2017efficient,
    title={Efficient Natural Language Response Suggestion for Smart Reply}, 
    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},
    year={2017},
    eprint={1705.00652},
    archivePrefix={arXiv},
    primaryClass={cs.CL}
}
```

<!--
## Glossary

*Clearly define terms in order to be accessible across audiences.*
-->

<!--
## Model Card Authors

*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
-->

<!--
## Model Card Contact

*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
-->