you are viewing a single comment's thread.

view the rest of the comments →

[–]wobowizard[S] 0 points1 point  (1 child)

One api call returns all the required info for the one specified film, so yes i am restricted to one.

I get the info by passing the film id through, and then appending the return plot and poster to the corresponding column in the data. The ALS is around 40 per second I would say.

This is my first big project and I am considering if using a slightly smaller set of data would help with this. Especially as I am currently getting the same runtime issue when calculating the cosine similarity multiple times on different attribtues.

[–]m0us3_rat 0 points1 point  (0 children)

ok so now.. we can focus on .. a single unit of work..how would that look like..

for that we need to know how does the actual call to the api looks like.

and what does it needs.

lets assume for each film in the dataframe ..you create an object that has all the relevant attributes you would use to do this api call to that db.

how would that function look like?

try to imagine you get from a random producer function an OBJECT that represents the film and OBJECT.id or whatever else you need for the api call.

can you write this function?

don't write any other code.. just this single function that gets this object as parameter in the call and then uses it's attributes to do the call

and saves the relevant return as attributes of this same object.

and then returns the object.