Skip to content

Commit c8b5abf

Browse files
authored
Fix similarity datasets message name (#2804)
* Fix similarity datasets message name Spark reader expects the names to start with similarity instead of similar. * Fix similarity datasets message name - 2 Spark reader expects the names to start with similarity instead of similar.
1 parent fdd045d commit c8b5abf

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: listenbrainz_spark/similarity/artist.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -143,21 +143,21 @@ def main(days, session, contribution, threshold, limit, skip, is_production_data
143143

144144
if is_production_dataset:
145145
yield {
146-
"type": "similar_recordings_start",
146+
"type": "similarity_artist_start",
147147
"algorithm": algorithm
148148
}
149149

150150
for entries in chunked(data, RECORDINGS_PER_MESSAGE):
151151
items = [row.asDict() for row in entries]
152152
yield {
153-
"type": "similar_artists",
153+
"type": "similarity_artist",
154154
"algorithm": algorithm,
155155
"data": items,
156156
"is_production_dataset": is_production_dataset
157157
}
158158

159159
if is_production_dataset:
160160
yield {
161-
"type": "similar_recordings_end",
161+
"type": "similarity_artist_end",
162162
"algorithm": algorithm
163163
}

Diff for: listenbrainz_spark/similarity/recording.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -127,21 +127,21 @@ def main(days, session, contribution, threshold, limit, skip, is_production_data
127127

128128
if is_production_dataset:
129129
yield {
130-
"type": "similar_recordings_start",
130+
"type": "similarity_recording_start",
131131
"algorithm": algorithm
132132
}
133133

134134
for entries in chunked(data, RECORDINGS_PER_MESSAGE):
135135
items = [row.asDict() for row in entries]
136136
yield {
137-
"type": "similar_recordings",
137+
"type": "similarity_recording",
138138
"algorithm": algorithm,
139139
"data": items,
140140
"is_production_dataset": is_production_dataset
141141
}
142142

143143
if is_production_dataset:
144144
yield {
145-
"type": "similar_recordings_end",
145+
"type": "similarity_recording_end",
146146
"algorithm": algorithm
147147
}

0 commit comments

Comments
 (0)