Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Performance issue on padding function #12

Open
panesher opened this issue May 1, 2023 · 1 comment
Open

Performance issue on padding function #12

panesher opened this issue May 1, 2023 · 1 comment

Comments

@panesher
Copy link

panesher commented May 1, 2023

Recently i discovered that jTransUP paddingItems function has performance issue in mine project at evaluating stage: we should iterate through whole range of items in loop however it could be done with LongTensor without iterating at all if i_map, new_map containing whole range of items without spaces.

In my case there is some difference in function. However, fixing such small thing reduce time for evaluating from 15 minutes to 20 seconds. My padding function.

Also there is TODO to simplify init stage, which possibly can be fixed with my initialisation function for embedding.

@saharvlzd
Copy link

Thank you for pointing out the performance issue in the paddingItems function. I recently encountered a similar issue in my project, where iterating over the entire item range caused significant delays during the evaluation stage. By modifying the function to utilize LongTensor without iterating over the range, I was able to eliminate the performance bottleneck.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants