aws-samples / aws-samples/amazon-sagemaker-feature-store-streaming-aggregation
Last notebook errors fixed below
- Dominant language
- Jupyter Notebook
- Stars
- 46
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
Notebook 4:
`
import time
def simulate_traffic(df, max_wait, num_trans):
for i in range(num_trans):
row = test_df.iloc[i]
cc_num = row['cc_num']
zip_code = '0'
merchant = 'A'
amt = row['amount']
#====> add this line
now = time.time()
#====>
print(f'cc_num: {cc_num}, amt: {amt}')
seconds_to_wait = int(np.random.uniform(0.1, max_wait))
print(f'waiting {seconds_to_wait} seconds to send trans {i}...')
time.sleep(seconds_to_wait)
print(f' putting trans with card: {cc_num}, amt: {amt}, zip: {zip_code}, merchant: {merchant}')
#======> add STREAM_NAME
status = put_to_stream(STREAM_NAME,cc_num, merchant, amt, zip_code, now)
#======>
if (not status):
print('Error found during write to Kinesis Stream')
break
i += 1
if i > (num_trans -1):
break
`
Contributor guide
Research direction
Open Notebook 4 and locate simulate_traffic. Review the shown changes around time.time(), STREAM_NAME, and put_to_stream, then run the notebook to confirm transactions are written without the reported errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- aws, jupyter-notebook, python
- Domain
- data-engineering, stream-processing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100