Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amplitude recommend personalize workshop #395

Draft
wants to merge 45 commits into
base: master
Choose a base branch
from

Conversation

manbearshark
Copy link
Contributor

Issue #, if available:

Getting ready to ship a workshop with Amplitude. This required retail demo store training data to train the Amplitude Recommend Personalize model.

Description of changes:

Modified the personalize interactions generator script to be able to generate events for Personalize and Amplitude. In the process, discovered that the script had a couple issues, one being that the 90 days of data generated is fixed to three months in 2020, the other that the script did not correctly fill events throughout the whole time span specified, rather enede event generation a month early in the generator time span.

The changes made were to create a range 90 days prior to the date / time the script is run, to refactor the event file writer to generate the Personalize interactions file and the Amplitude interactions file simultaneously. I also added a check to the event generation loop to keep the loop running until the script generates the minimum number of interactions but also to keep going until the script reaches the LAST_TIME timestamp for the interactions. A more realistic time spacing between interactions was also added: this_timestamp += random.randint(int(seconds_increment), int(seconds_increment * 2)) rather than a time between 1 second and 11 seconds.

Description of testing performed to validate your changes (required if pull request includes CloudFormation or source code changes):

Testing was done to make sure the new script behaves like the old one in the retail demo store deployment.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@manbearshark
Copy link
Contributor Author

manbearshark commented Sep 20, 2022

Wanted to get this in the review queue because there are some potentially controversial changes in this - I think these changes will make for a more realistic workshop when using an analytics tool, especially WRT the dates / timestamps. I will also need to add an integration to the Amplitude API for the recommendations components in the UI but this should be pretty straightforward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant