You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a dataset of about 8000 comments each comment is around 6 to 8 words (some are shorted with 2 words only)
The problem is that I am unable to get the prediction since I run out of GPU memory during the process. To overcome this I am using a custom loop to loop over comments in batches and append the results to a data frame.
comments_list = comments["text"].to_list()
df = pd.DataFrame()
for i in range(0, len(comments_list), 32):
comms = comments_list[i : i + 32]
results = Detoxify("original", device=device).predict(comms)
results = pd.DataFrame(results)
df = df.append(results, ignore_index=True)
Is there a more efficient way of doing this than writing a for loop?
Currently I have a 16GB Testa T4 as GPU.
Thanks!
The text was updated successfully, but these errors were encountered:
Hello team,
I have a dataset of about 8000 comments each comment is around 6 to 8 words (some are shorted with 2 words only)
The problem is that I am unable to get the prediction since I run out of GPU memory during the process. To overcome this I am using a custom loop to loop over comments in batches and append the results to a data frame.
Is there a more efficient way of doing this than writing a for loop?
Currently I have a 16GB Testa T4 as GPU.
Thanks!
The text was updated successfully, but these errors were encountered: