GSoC 2022: Create a 'Release Radar' plugin for the Troi toolkit

Hi, I’m Sivan from NYC. I’m very interested in working on the trio recommendation playground. It’s my first time in open-source so I’m excited about the challenges ahead!

I’ve been playing with the ListenBrainz server and Troi for a couple of days now and am in the process of writing my proposal for the project. Just hope to get some ideas about the following questions:

  1. I’m trying to come up with the framework of release radar for Troi before going to the details: adding the release radar as one of the patches that calculate the annoy similarity between the user’s listening history and songs in the new release list; then return the top ten songs that are not in the user’s listening history. Could you give me any suggestions about whether this is a good way to start with? Thanks!

  2. When trying the ab-similar-recordings patch, I keep running into "TypeError: init() got multiple values for argument ‘patch_slug’ with the command which I think should be alright… python -m troi.cli playlist ab-similar-recordings 4cc9cec3-1b5b-48d4-8e6e-082fe4fa6d76 mfccs. I’m guessing is it because I didn’t use the right format for similarity type?

  3. The playlist-from-mbids patch requires a filename, I checked the attributes in MusicBrainz and couldn’t find such an attribute to quote. Could you please point me to the right place?

  4. When trying the top-discoveries-for-year patch, I tried different user names with plentiful listens but always runs into “Failed to generate playlist: Cannot fetch recording years from MusicBrainz: HTTP code 404”. I checked the year_lookup.py file and think the problem is with the line
    SERVER_URL = "https://labs.api.listenbrainz.org/year-artist-recording-year-lookup/json"
    because this URL is not available and I can’t find the year-artist-recording-year-lookup hoster on the API page. And I think the hoster on https://bono.metabrainz.org/top-discoveries has already done the job. I’m not sure if it’s the bug of this patch.

Hi, @rob I’ve asked several questions in IRC, but I think it’s better to open a topic to keep track of things:)

Thanks in advance for any help!

Hi!

  1. Best to discuss this with @rob but AFAIK we may not want to use annoy similarity anymore because AB is going away soon.

  2. That appears to be a bug. I’ll open a PR to fix that but I also noticed that if recording does not have similarity data, the endpoint 500s. This issue may need to be fixed AB side, I’ll talk with @alastairp on this.

  3. This patch is for if you already have a list of recording MBIDs and want to turn into a LB playlist. To create a playlist on LB, you need to send a JSPF payload so this patch is handy to generate ad-hoc or random playlists from user’s chosen tracks.

  4. Ah yes, sorry we updated that endpoint last week. Its now merged into another LB endpoint. That patch hasn’t yet been updated to use the new endpoint.

1 Like

Hi!

I’m sorry that troi is in a bit of a sad state currently. I think I will take some time today to do some cleanup there. I’ll be around all week, so it would be good for you to return to IRC and ping me again so we can chat about this proposal.

Thanks!

1 Like

Hi @rob @lucifer , thanks for explaining these things to me! I’ll take a closer look at the cleaned up Troi now, and get back to you soon enough on IRC.

Hi, @rob @lucifer . I’ve found some bugs in the weekly-flashback-jams patch. Basically, I think it’s not working because the year_lookup API doesn’t exist in any hoster. Can I create an issue about this? Should I new issue in the github repo page, or on the tickets website?

Thanks!

1 Like

Everyone can add tickets, and that’s the preferred first step, so please do!

(answering because the others might be asleep, and then potentially away for easter?)

1 Like

@aerozol Got it! Thanks for the prompt reply!

1 Like

Hi! Thanks for the ticket. I have opened a PR to fix it. It’ll probably be merged next week. You can try using the patch from the PR branch meanwhile if you like. LB-1087: Get weekly flashback jams working again by amCap1712 · Pull Request #48 · metabrainz/troi-recommendation-playground · GitHub

Hi, thanks for fixing it! It’s a good demonstration for me to learn how to correctly fix bugs and pull requests. I’m using this branch now.

Hi @rob and @lucifer. Is https://bono.metabrainz.org/ not able to reach anymore or is it just temporary? I think these API are kinda critical to my codes :rofl:

Hi! Sorry for these disruptions. Troi has been a bit out of maintenance but we expect to get all these issues fixed soon, please bear with us for a while. The bono server was recently replaced by wolf server. I have opened a PR to fix the URLs in the project.

Hi, no worries and thanks for helping me get this straight. It’s just a bit hard for me to get the idea of updated APIs or library names within the context. Could you help me confirm that it’s fine to use https://labs.api.listenbrainz.org and http://wolf.metabrainz.org:8000 for new features? And is there any other useful tools I’m missing? Thanks!

Yes, those two APIs are fine to use. I currently don’t recall other useful tools but @rob may know.

Hi @lucifer, I’m kinda confused about the two JSON files you sent earlier.
https://api.listenbrainz.org/1/stats/user/lucifer/releases?range=week
http://musicbrainz.org/ws/2/release/78478991-6484-47ef-811e-d9305df36aa1?inc=recordings&fmt=json

  1. Are they both the expected output of the release API?

  2. I understand that the first JSON takes in a user id, and returns all the release mbid from its top artist releases within a week. The second JSON file seems like a list of recordings in a certain album released at a certain date, then is the query taking in the release title string?

  3. Could you provide the input and output formats for the API, or is it for me to define as well?

Thanks!

The LB endpoint returns a list of release mbids. You can then query the MB endpoint with the release mbid you got from the LB endpoint to get the list of recordings in a release.

Thx, I understand now.

Hi, @rob @lucifer I’ve uploaded my recent version of the proposal on the GSoC platform, would appreciate it a lot if you could take a look and give me some advice. Thanks!

We require the applicants to post the proposal on community forums as well so please post here too.

Thanks, just one more change please separate the proposal into a separate post like the other SoC proposals.

Got it. I just did it here: Proposal for Create a 'Release Radar' plugin for the Troi toolkit - GSoC 2022

1 Like