Open AlbertoAGA27 opened 1 year ago
@AlbertoAGA27 How did you pass the user features? I'm not familiar w/ AzureML Designer but it seems score_params accept user features separately via user_features
, while dataset_to_score
is to pass transaction data. You may ask further questions to AzureML Designer.
Description
How to use the ScoreWideAndDeepRecommenderModule() and related score_params to make prediction for "new" userIds?
Now I want to modify the score.py to predict items for "all users" or "new users" so I have the following doubts: I've configured now the score_param as follow:
`def run(data): data = json.loads(data) input_entry = defaultdict(list) for row in data: for key, val in row.items(): input_entry[key].append(decode_nan(val))
Then i modified the _schema.json used to test the endpoint to accept "userId" and 2 other user features
Deploying these settings in an online endpoint and testing it with the appropriate json I always get the same prediction results even if I vary the features passed in, for example:
userId = 99999 (new user, not part of trained model) gender = female job = employed
result predictions = item 1: 123 item 2: 334, item 3: 887
userId = 99998 (new user, not part of trained model) gender = male job = student
result predictions = item 1: 123 item 2: 334, item 3: 887
(in json format...)
Thanks to anyone helping clarifying AGA
Other Comments