-
Notifications
You must be signed in to change notification settings - Fork 519
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
manbearshark
wants to merge
45
commits into
aws-samples:master
Choose a base branch
from
manbearshark:amplitude-recommend-personalize-workshop
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Amplitude recommend personalize workshop #395
manbearshark
wants to merge
45
commits into
aws-samples:master
from
manbearshark:amplitude-recommend-personalize-workshop
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.