Error showing infinite times.

The following code gives me a warning which keeps on printing infinite times. What should I change in my code to prevent this?

lambda_list <- seq(0,10,0.2)
rmses <- sapply(lambda_list, function(l){
b_i <- train %>% group_by(movieId) %>%
summarise(b_i = sum(rating - mu)/(n()+l))
b_y <- train %>% left_join(b_i, by="movieId") %>%
group_by(userId) %>% summarise(b_y = sum(rating - b_i - mu)/(n()+l))
predicted_ratings <- test %>%
left_join(b_i, by = "movieId") %>%
left_join(b_y, by = "userId") %>%
mutate(pred = mu + b_i + b_y) %>% .$pred
return(RMSE(test$rating, predicted_ratings))

The output:

I see no errors, only an informational message.
In https://www.tidyverse.org/blog/2020/05/dplyr-1-0-0-last-minute-additions/ you see how to avoid that :
options(dplyr.summarise.inform = FALSE)
If you another problem please provide a reprex.