Skip to content

Commit 77dbbcf

Browse files
Merge pull request #216473 from jcodella/patch-15
Added small code for generating 5000 sample events
2 parents fd2b01c + 2970b7a commit 77dbbcf

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 5,000 events from this quickstart demo scenario, which is sufficient 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)