/
evidently.jl
1706 lines (1556 loc) · 62.5 KB
/
evidently.jl
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
# This file is auto-generated by AWSMetadata.jl
using AWS
using AWS.AWSServices: evidently
using AWS.Compat
using AWS.UUIDs
"""
batch_evaluate_feature(project, requests)
batch_evaluate_feature(project, requests, params::Dict{String,<:Any})
This operation assigns feature variation to user sessions. For each user session, you pass
in an entityID that represents the user. Evidently then checks the evaluation rules and
assigns the variation. The first rules that are evaluated are the override rules. If the
user's entityID matches an override rule, the user is served the variation specified by
that rule. Next, if there is a launch of the feature, the user might be assigned to a
variation in the launch. The chance of this depends on the percentage of users that are
allocated to that launch. If the user is enrolled in the launch, the variation they are
served depends on the allocation of the various feature variations used for the launch. If
the user is not assigned to a launch, and there is an ongoing experiment for this feature,
the user might be assigned to a variation in the experiment. The chance of this depends on
the percentage of users that are allocated to that experiment. If the user is enrolled in
the experiment, the variation they are served depends on the allocation of the various
feature variations used for the experiment. If the user is not assigned to a launch or
experiment, they are served the default variation.
# Arguments
- `project`: The name or ARN of the project that contains the feature being evaluated.
- `requests`: An array of structures, where each structure assigns a feature variation to
one user session.
"""
function batch_evaluate_feature(
project, requests; aws_config::AbstractAWSConfig=global_aws_config()
)
return evidently(
"POST",
"/projects/$(project)/evaluations",
Dict{String,Any}("requests" => requests);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function batch_evaluate_feature(
project,
requests,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return evidently(
"POST",
"/projects/$(project)/evaluations",
Dict{String,Any}(
mergewith(_merge, Dict{String,Any}("requests" => requests), params)
);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
create_experiment(metric_goals, name, project, treatments)
create_experiment(metric_goals, name, project, treatments, params::Dict{String,<:Any})
Creates an Evidently experiment. Before you create an experiment, you must create the
feature to use for the experiment. An experiment helps you make feature design decisions
based on evidence and data. An experiment can test as many as five variations at once.
Evidently collects experiment data and analyzes it by statistical methods, and provides
clear recommendations about which variations perform better. You can optionally specify a
segment to have the experiment consider only certain audience types in the experiment, such
as using only user sessions from a certain location or who use a certain internet browser.
Don't use this operation to update an existing experiment. Instead, use UpdateExperiment.
# Arguments
- `metric_goals`: An array of structures that defines the metrics used for the experiment,
and whether a higher or lower value for each metric is the goal.
- `name`: A name for the new experiment.
- `project`: The name or ARN of the project that you want to create the new experiment in.
- `treatments`: An array of structures that describe the configuration of each feature
variation used in the experiment.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"description"`: An optional description of the experiment.
- `"onlineAbConfig"`: A structure that contains the configuration of which variation to use
as the \"control\" version. tThe \"control\" version is used for comparison with other
variations. This structure also specifies how much experiment traffic is allocated to each
variation.
- `"randomizationSalt"`: When Evidently assigns a particular user session to an experiment,
it must use a randomization ID to determine which variation the user session is served.
This randomization ID is a combination of the entity ID and randomizationSalt. If you omit
randomizationSalt, Evidently uses the experiment name as the randomizationSalt.
- `"samplingRate"`: The portion of the available audience that you want to allocate to this
experiment, in thousandths of a percent. The available audience is the total audience minus
the audience that you have allocated to overrides or current launches of this feature. This
is represented in thousandths of a percent. For example, specify 10,000 to allocate 10% of
the available audience.
- `"segment"`: Specifies an audience segment to use in the experiment. When a segment is
used in an experiment, only user sessions that match the segment pattern are used in the
experiment.
- `"tags"`: Assigns one or more tags (key-value pairs) to the experiment. Tags can help you
organize and categorize your resources. You can also use them to scope user permissions by
granting a user permission to access or change only resources with certain tag values. Tags
don't have any semantic meaning to Amazon Web Services and are interpreted strictly as
strings of characters. You can associate as many as 50 tags with an experiment. For more
information, see Tagging Amazon Web Services resources.
"""
function create_experiment(
metricGoals,
name,
project,
treatments;
aws_config::AbstractAWSConfig=global_aws_config(),
)
return evidently(
"POST",
"/projects/$(project)/experiments",
Dict{String,Any}(
"metricGoals" => metricGoals, "name" => name, "treatments" => treatments
);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function create_experiment(
metricGoals,
name,
project,
treatments,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return evidently(
"POST",
"/projects/$(project)/experiments",
Dict{String,Any}(
mergewith(
_merge,
Dict{String,Any}(
"metricGoals" => metricGoals, "name" => name, "treatments" => treatments
),
params,
),
);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
create_feature(name, project, variations)
create_feature(name, project, variations, params::Dict{String,<:Any})
Creates an Evidently feature that you want to launch or test. You can define up to five
variations of a feature, and use these variations in your launches and experiments. A
feature must be created in a project. For information about creating a project, see
CreateProject. Don't use this operation to update an existing feature. Instead, use
UpdateFeature.
# Arguments
- `name`: The name for the new feature.
- `project`: The name or ARN of the project that is to contain the new feature.
- `variations`: An array of structures that contain the configuration of the feature's
different variations.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"defaultVariation"`: The name of the variation to use as the default variation. The
default variation is served to users who are not allocated to any ongoing launches or
experiments of this feature. This variation must also be listed in the variations
structure. If you omit defaultVariation, the first variation listed in the variations
structure is used as the default variation.
- `"description"`: An optional description of the feature.
- `"entityOverrides"`: Specify users that should always be served a specific variation of a
feature. Each user is specified by a key-value pair . For each key, specify a user by
entering their user ID, account ID, or some other identifier. For the value, specify the
name of the variation that they are to be served. This parameter is limited to 2500
overrides or a total of 40KB. The 40KB limit includes an overhead of 6 bytes per override.
- `"evaluationStrategy"`: Specify ALL_RULES to activate the traffic allocation specified by
any ongoing launches or experiments. Specify DEFAULT_VARIATION to serve the default
variation to all users instead.
- `"tags"`: Assigns one or more tags (key-value pairs) to the feature. Tags can help you
organize and categorize your resources. You can also use them to scope user permissions by
granting a user permission to access or change only resources with certain tag values. Tags
don't have any semantic meaning to Amazon Web Services and are interpreted strictly as
strings of characters. You can associate as many as 50 tags with a feature. For more
information, see Tagging Amazon Web Services resources.
"""
function create_feature(
name, project, variations; aws_config::AbstractAWSConfig=global_aws_config()
)
return evidently(
"POST",
"/projects/$(project)/features",
Dict{String,Any}("name" => name, "variations" => variations);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function create_feature(
name,
project,
variations,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return evidently(
"POST",
"/projects/$(project)/features",
Dict{String,Any}(
mergewith(
_merge, Dict{String,Any}("name" => name, "variations" => variations), params
),
);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
create_launch(groups, name, project)
create_launch(groups, name, project, params::Dict{String,<:Any})
Creates a launch of a given feature. Before you create a launch, you must create the
feature to use for the launch. You can use a launch to safely validate new features by
serving them to a specified percentage of your users while you roll out the feature. You
can monitor the performance of the new feature to help you decide when to ramp up traffic
to more users. This helps you reduce risk and identify unintended consequences before you
fully launch the feature. Don't use this operation to update an existing launch. Instead,
use UpdateLaunch.
# Arguments
- `groups`: An array of structures that contains the feature and variations that are to be
used for the launch.
- `name`: The name for the new launch.
- `project`: The name or ARN of the project that you want to create the launch in.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"description"`: An optional description for the launch.
- `"metricMonitors"`: An array of structures that define the metrics that will be used to
monitor the launch performance.
- `"randomizationSalt"`: When Evidently assigns a particular user session to a launch, it
must use a randomization ID to determine which variation the user session is served. This
randomization ID is a combination of the entity ID and randomizationSalt. If you omit
randomizationSalt, Evidently uses the launch name as the randomizationSalt.
- `"scheduledSplitsConfig"`: An array of structures that define the traffic allocation
percentages among the feature variations during each step of the launch.
- `"tags"`: Assigns one or more tags (key-value pairs) to the launch. Tags can help you
organize and categorize your resources. You can also use them to scope user permissions by
granting a user permission to access or change only resources with certain tag values. Tags
don't have any semantic meaning to Amazon Web Services and are interpreted strictly as
strings of characters. You can associate as many as 50 tags with a launch. For more
information, see Tagging Amazon Web Services resources.
"""
function create_launch(
groups, name, project; aws_config::AbstractAWSConfig=global_aws_config()
)
return evidently(
"POST",
"/projects/$(project)/launches",
Dict{String,Any}("groups" => groups, "name" => name);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function create_launch(
groups,
name,
project,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return evidently(
"POST",
"/projects/$(project)/launches",
Dict{String,Any}(
mergewith(_merge, Dict{String,Any}("groups" => groups, "name" => name), params)
);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
create_project(name)
create_project(name, params::Dict{String,<:Any})
Creates a project, which is the logical object in Evidently that can contain features,
launches, and experiments. Use projects to group similar features together. To update an
existing project, use UpdateProject.
# Arguments
- `name`: The name for the project.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"appConfigResource"`: Use this parameter if the project will use client-side evaluation
powered by AppConfig. Client-side evaluation allows your application to assign variations
to user sessions locally instead of by calling the EvaluateFeature operation. This
mitigates the latency and availability risks that come with an API call. For more
information, see Client-side evaluation - powered by AppConfig. This parameter is a
structure that contains information about the AppConfig application and environment that
will be used as for client-side evaluation. To create a project that uses client-side
evaluation, you must have the evidently:ExportProjectAsConfiguration permission.
- `"dataDelivery"`: A structure that contains information about where Evidently is to store
evaluation events for longer term storage, if you choose to do so. If you choose not to
store these events, Evidently deletes them after using them to produce metrics and other
experiment results that you can view.
- `"description"`: An optional description of the project.
- `"tags"`: Assigns one or more tags (key-value pairs) to the project. Tags can help you
organize and categorize your resources. You can also use them to scope user permissions by
granting a user permission to access or change only resources with certain tag values. Tags
don't have any semantic meaning to Amazon Web Services and are interpreted strictly as
strings of characters. You can associate as many as 50 tags with a project. For more
information, see Tagging Amazon Web Services resources.
"""
function create_project(name; aws_config::AbstractAWSConfig=global_aws_config())
return evidently(
"POST",
"/projects",
Dict{String,Any}("name" => name);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function create_project(
name, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
return evidently(
"POST",
"/projects",
Dict{String,Any}(mergewith(_merge, Dict{String,Any}("name" => name), params));
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
create_segment(name, pattern)
create_segment(name, pattern, params::Dict{String,<:Any})
Use this operation to define a segment of your audience. A segment is a portion of your
audience that share one or more characteristics. Examples could be Chrome browser users,
users in Europe, or Firefox browser users in Europe who also fit other criteria that your
application collects, such as age. Using a segment in an experiment limits that experiment
to evaluate only the users who match the segment criteria. Using one or more segments in a
launch allows you to define different traffic splits for the different audience segments.
For more information about segment pattern syntax, see Segment rule pattern syntax. The
pattern that you define for a segment is matched against the value of evaluationContext,
which is passed into Evidently in the EvaluateFeature operation, when Evidently assigns a
feature variation to a user.
# Arguments
- `name`: A name for the segment.
- `pattern`: The pattern to use for the segment. For more information about pattern syntax,
see Segment rule pattern syntax.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"description"`: An optional description for this segment.
- `"tags"`: Assigns one or more tags (key-value pairs) to the segment. Tags can help you
organize and categorize your resources. You can also use them to scope user permissions by
granting a user permission to access or change only resources with certain tag values. Tags
don't have any semantic meaning to Amazon Web Services and are interpreted strictly as
strings of characters. You can associate as many as 50 tags with a segment. For more
information, see Tagging Amazon Web Services resources.
"""
function create_segment(name, pattern; aws_config::AbstractAWSConfig=global_aws_config())
return evidently(
"POST",
"/segments",
Dict{String,Any}("name" => name, "pattern" => pattern);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function create_segment(
name,
pattern,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return evidently(
"POST",
"/segments",
Dict{String,Any}(
mergewith(
_merge, Dict{String,Any}("name" => name, "pattern" => pattern), params
),
);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
delete_experiment(experiment, project)
delete_experiment(experiment, project, params::Dict{String,<:Any})
Deletes an Evidently experiment. The feature used for the experiment is not deleted. To
stop an experiment without deleting it, use StopExperiment.
# Arguments
- `experiment`: The name of the experiment to delete.
- `project`: The name or ARN of the project that contains the experiment to delete.
"""
function delete_experiment(
experiment, project; aws_config::AbstractAWSConfig=global_aws_config()
)
return evidently(
"DELETE",
"/projects/$(project)/experiments/$(experiment)";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function delete_experiment(
experiment,
project,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return evidently(
"DELETE",
"/projects/$(project)/experiments/$(experiment)",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
delete_feature(feature, project)
delete_feature(feature, project, params::Dict{String,<:Any})
Deletes an Evidently feature.
# Arguments
- `feature`: The name of the feature to delete.
- `project`: The name or ARN of the project that contains the feature to delete.
"""
function delete_feature(feature, project; aws_config::AbstractAWSConfig=global_aws_config())
return evidently(
"DELETE",
"/projects/$(project)/features/$(feature)";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function delete_feature(
feature,
project,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return evidently(
"DELETE",
"/projects/$(project)/features/$(feature)",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
delete_launch(launch, project)
delete_launch(launch, project, params::Dict{String,<:Any})
Deletes an Evidently launch. The feature used for the launch is not deleted. To stop a
launch without deleting it, use StopLaunch.
# Arguments
- `launch`: The name of the launch to delete.
- `project`: The name or ARN of the project that contains the launch to delete.
"""
function delete_launch(launch, project; aws_config::AbstractAWSConfig=global_aws_config())
return evidently(
"DELETE",
"/projects/$(project)/launches/$(launch)";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function delete_launch(
launch,
project,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return evidently(
"DELETE",
"/projects/$(project)/launches/$(launch)",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
delete_project(project)
delete_project(project, params::Dict{String,<:Any})
Deletes an Evidently project. Before you can delete a project, you must delete all the
features that the project contains. To delete a feature, use DeleteFeature.
# Arguments
- `project`: The name or ARN of the project to delete.
"""
function delete_project(project; aws_config::AbstractAWSConfig=global_aws_config())
return evidently(
"DELETE",
"/projects/$(project)";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function delete_project(
project, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
return evidently(
"DELETE",
"/projects/$(project)",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
delete_segment(segment)
delete_segment(segment, params::Dict{String,<:Any})
Deletes a segment. You can't delete a segment that is being used in a launch or experiment,
even if that launch or experiment is not currently running.
# Arguments
- `segment`: Specifies the segment to delete.
"""
function delete_segment(segment; aws_config::AbstractAWSConfig=global_aws_config())
return evidently(
"DELETE",
"/segments/$(segment)";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function delete_segment(
segment, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
return evidently(
"DELETE",
"/segments/$(segment)",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
evaluate_feature(entity_id, feature, project)
evaluate_feature(entity_id, feature, project, params::Dict{String,<:Any})
This operation assigns a feature variation to one given user session. You pass in an
entityID that represents the user. Evidently then checks the evaluation rules and assigns
the variation. The first rules that are evaluated are the override rules. If the user's
entityID matches an override rule, the user is served the variation specified by that rule.
If there is a current launch with this feature that uses segment overrides, and if the user
session's evaluationContext matches a segment rule defined in a segment override, the
configuration in the segment overrides is used. For more information about segments, see
CreateSegment and Use segments to focus your audience. If there is a launch with no segment
overrides, the user might be assigned to a variation in the launch. The chance of this
depends on the percentage of users that are allocated to that launch. If the user is
enrolled in the launch, the variation they are served depends on the allocation of the
various feature variations used for the launch. If the user is not assigned to a launch,
and there is an ongoing experiment for this feature, the user might be assigned to a
variation in the experiment. The chance of this depends on the percentage of users that are
allocated to that experiment. If the experiment uses a segment, then only user sessions
with evaluationContext values that match the segment rule are used in the experiment. If
the user is enrolled in the experiment, the variation they are served depends on the
allocation of the various feature variations used for the experiment. If the user is not
assigned to a launch or experiment, they are served the default variation.
# Arguments
- `entity_id`: An internal ID that represents a unique user of the application. This
entityID is checked against any override rules assigned for this feature.
- `feature`: The name of the feature being evaluated.
- `project`: The name or ARN of the project that contains this feature.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"evaluationContext"`: A JSON object of attributes that you can optionally pass in as
part of the evaluation event sent to Evidently from the user session. Evidently can use
this value to match user sessions with defined audience segments. For more information, see
Use segments to focus your audience. If you include this parameter, the value must be a
JSON object. A JSON array is not supported.
"""
function evaluate_feature(
entityId, feature, project; aws_config::AbstractAWSConfig=global_aws_config()
)
return evidently(
"POST",
"/projects/$(project)/evaluations/$(feature)",
Dict{String,Any}("entityId" => entityId);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function evaluate_feature(
entityId,
feature,
project,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return evidently(
"POST",
"/projects/$(project)/evaluations/$(feature)",
Dict{String,Any}(
mergewith(_merge, Dict{String,Any}("entityId" => entityId), params)
);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
get_experiment(experiment, project)
get_experiment(experiment, project, params::Dict{String,<:Any})
Returns the details about one experiment. You must already know the experiment name. To
retrieve a list of experiments in your account, use ListExperiments.
# Arguments
- `experiment`: The name of the experiment that you want to see the details of.
- `project`: The name or ARN of the project that contains the experiment.
"""
function get_experiment(
experiment, project; aws_config::AbstractAWSConfig=global_aws_config()
)
return evidently(
"GET",
"/projects/$(project)/experiments/$(experiment)";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function get_experiment(
experiment,
project,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return evidently(
"GET",
"/projects/$(project)/experiments/$(experiment)",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
get_experiment_results(experiment, metric_names, project, treatment_names)
get_experiment_results(experiment, metric_names, project, treatment_names, params::Dict{String,<:Any})
Retrieves the results of a running or completed experiment. No results are available until
there have been 100 events for each variation and at least 10 minutes have passed since the
start of the experiment. To increase the statistical power, Evidently performs an
additional offline p-value analysis at the end of the experiment. Offline p-value analysis
can detect statistical significance in some cases where the anytime p-values used during
the experiment do not find statistical significance. Experiment results are available up to
63 days after the start of the experiment. They are not available after that because of
CloudWatch data retention policies.
# Arguments
- `experiment`: The name of the experiment to retrieve the results of.
- `metric_names`: The names of the experiment metrics that you want to see the results of.
- `project`: The name or ARN of the project that contains the experiment that you want to
see the results of.
- `treatment_names`: The names of the experiment treatments that you want to see the
results for.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"baseStat"`: The statistic used to calculate experiment results. Currently the only
valid value is mean, which uses the mean of the collected values as the statistic.
- `"endTime"`: The date and time that the experiment ended, if it is completed. This must
be no longer than 30 days after the experiment start time.
- `"period"`: In seconds, the amount of time to aggregate results together.
- `"reportNames"`: The names of the report types that you want to see. Currently,
BayesianInference is the only valid value.
- `"resultStats"`: The statistics that you want to see in the returned results. PValue
specifies to use p-values for the results. A p-value is used in hypothesis testing to
measure how often you are willing to make a mistake in rejecting the null hypothesis. A
general practice is to reject the null hypothesis and declare that the results are
statistically significant when the p-value is less than 0.05. ConfidenceInterval
specifies a confidence interval for the results. The confidence interval represents the
range of values for the chosen metric that is likely to contain the true difference between
the baseStat of a variation and the baseline. Evidently returns the 95% confidence
interval. TreatmentEffect is the difference in the statistic specified by the baseStat
parameter between each variation and the default variation. BaseStat returns the
statistical values collected for the metric for each variation. The statistic uses the same
statistic specified in the baseStat parameter. Therefore, if baseStat is mean, this returns
the mean of the values collected for each variation.
- `"startTime"`: The date and time that the experiment started.
"""
function get_experiment_results(
experiment,
metricNames,
project,
treatmentNames;
aws_config::AbstractAWSConfig=global_aws_config(),
)
return evidently(
"POST",
"/projects/$(project)/experiments/$(experiment)/results",
Dict{String,Any}("metricNames" => metricNames, "treatmentNames" => treatmentNames);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function get_experiment_results(
experiment,
metricNames,
project,
treatmentNames,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return evidently(
"POST",
"/projects/$(project)/experiments/$(experiment)/results",
Dict{String,Any}(
mergewith(
_merge,
Dict{String,Any}(
"metricNames" => metricNames, "treatmentNames" => treatmentNames
),
params,
),
);
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
get_feature(feature, project)
get_feature(feature, project, params::Dict{String,<:Any})
Returns the details about one feature. You must already know the feature name. To retrieve
a list of features in your account, use ListFeatures.
# Arguments
- `feature`: The name of the feature that you want to retrieve information for.
- `project`: The name or ARN of the project that contains the feature.
"""
function get_feature(feature, project; aws_config::AbstractAWSConfig=global_aws_config())
return evidently(
"GET",
"/projects/$(project)/features/$(feature)";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function get_feature(
feature,
project,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return evidently(
"GET",
"/projects/$(project)/features/$(feature)",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
get_launch(launch, project)
get_launch(launch, project, params::Dict{String,<:Any})
Returns the details about one launch. You must already know the launch name. To retrieve a
list of launches in your account, use ListLaunches.
# Arguments
- `launch`: The name of the launch that you want to see the details of.
- `project`: The name or ARN of the project that contains the launch.
"""
function get_launch(launch, project; aws_config::AbstractAWSConfig=global_aws_config())
return evidently(
"GET",
"/projects/$(project)/launches/$(launch)";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function get_launch(
launch,
project,
params::AbstractDict{String};
aws_config::AbstractAWSConfig=global_aws_config(),
)
return evidently(
"GET",
"/projects/$(project)/launches/$(launch)",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
get_project(project)
get_project(project, params::Dict{String,<:Any})
Returns the details about one launch. You must already know the project name. To retrieve a
list of projects in your account, use ListProjects.
# Arguments
- `project`: The name or ARN of the project that you want to see the details of.
"""
function get_project(project; aws_config::AbstractAWSConfig=global_aws_config())
return evidently(
"GET",
"/projects/$(project)";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function get_project(
project, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
return evidently(
"GET",
"/projects/$(project)",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
get_segment(segment)
get_segment(segment, params::Dict{String,<:Any})
Returns information about the specified segment. Specify the segment you want to view by
specifying its ARN.
# Arguments
- `segment`: The ARN of the segment to return information for.
"""
function get_segment(segment; aws_config::AbstractAWSConfig=global_aws_config())
return evidently(
"GET",
"/segments/$(segment)";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function get_segment(
segment, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
return evidently(
"GET",
"/segments/$(segment)",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
list_experiments(project)
list_experiments(project, params::Dict{String,<:Any})
Returns configuration details about all the experiments in the specified project.
# Arguments
- `project`: The name or ARN of the project to return the experiment list from.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: The maximum number of results to include in the response.
- `"nextToken"`: The token to use when requesting the next set of results. You received
this token from a previous ListExperiments operation.
- `"status"`: Use this optional parameter to limit the returned results to only the
experiments with the status that you specify here.
"""
function list_experiments(project; aws_config::AbstractAWSConfig=global_aws_config())
return evidently(
"GET",
"/projects/$(project)/experiments";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function list_experiments(
project, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
return evidently(
"GET",
"/projects/$(project)/experiments",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
list_features(project)
list_features(project, params::Dict{String,<:Any})
Returns configuration details about all the features in the specified project.
# Arguments
- `project`: The name or ARN of the project to return the feature list from.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: The maximum number of results to include in the response.
- `"nextToken"`: The token to use when requesting the next set of results. You received
this token from a previous ListFeatures operation.
"""
function list_features(project; aws_config::AbstractAWSConfig=global_aws_config())
return evidently(
"GET",
"/projects/$(project)/features";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function list_features(
project, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
return evidently(
"GET",
"/projects/$(project)/features",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
list_launches(project)
list_launches(project, params::Dict{String,<:Any})
Returns configuration details about all the launches in the specified project.
# Arguments
- `project`: The name or ARN of the project to return the launch list from.
# Optional Parameters
Optional parameters can be passed as a `params::Dict{String,<:Any}`. Valid keys are:
- `"maxResults"`: The maximum number of results to include in the response.
- `"nextToken"`: The token to use when requesting the next set of results. You received
this token from a previous ListLaunches operation.
- `"status"`: Use this optional parameter to limit the returned results to only the
launches with the status that you specify here.
"""
function list_launches(project; aws_config::AbstractAWSConfig=global_aws_config())
return evidently(
"GET",
"/projects/$(project)/launches";
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
function list_launches(
project, params::AbstractDict{String}; aws_config::AbstractAWSConfig=global_aws_config()
)
return evidently(
"GET",
"/projects/$(project)/launches",
params;
aws_config=aws_config,
feature_set=SERVICE_FEATURE_SET,
)
end
"""
list_projects()
list_projects(params::Dict{String,<:Any})
Returns configuration details about all the projects in the current Region in your account.
# Optional Parameters