Skip to content

Commit b71ae52

Browse files
authored
Added small code for generating 5000 sample events
1 parent 0186fa7 commit b71ae52

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

articles/cognitive-services/personalizer/includes/quickstart-sdk-python.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,4 +350,27 @@ Once all the above code is included in your Python file, you can run it from you
350350
python personalizer_quickstart.py
351351
```
352352

353+
## Generate sample events for analysis
354+
355+
You can easily generate enough events from this quickstart demo scenario, which can be used to get experience with using Apprentice mode, Online mode, running offline evaluations, and creating feature evaluations. Simply replace this code from above:
356+
357+
```python
358+
continue_loop = True
359+
while continue_loop:
360+
run_personalizer_cycle()
361+
362+
br = input("Press Q to exit, or any other key to run another loop: ")
363+
if(br.lower()=='q'):
364+
continue_loop = False
365+
```
366+
367+
with the following:
368+
369+
```python
370+
for i in range(0,1000):
371+
run_personalizer_cycle()
372+
```
373+
374+
then run the program.
375+
353376
![The quickstart program asks a couple of questions to gather user preferences, known as features, then provides the top action.](../media/quickstart/quickstart-program-feedback-cycle-example.png)

0 commit comments

Comments
 (0)