euagendas / m3inference

A deep learning system for demographic inference (gender, age, and individual/person) that was trained on massive Twitter dataset using profile images, screen names, names, and biographies
http://www.euagendas.org
GNU Affero General Public License v3.0
145 stars 57 forks source link

ValueError: semaphore or lock released too many times #38

Open vijayalakshm1996 opened 1 year ago

vijayalakshm1996 commented 1 year ago

Hi, I am working with Professor Przemek and Mattia on a project. I am using m3 inference to run predictions. But I am encountering a value error which says "semaphore or lock released too many times" while running the infer method of M3Inference module. This has something to do with multiprocessing. But I am unable to fix this error. Attaching screenshot for your reference. image

computermacgyver commented 1 year ago

Could you please let us know what versions of Python and pytorch you are using? Thanks!

vijayalakshm1996 commented 1 year ago

Hi Scott, Thanks for the reply! Torch version that I am using is 2.0.1. Python version is 3.11.4. I am running into this problem when I infer for each user individually. When I send the json file consisting of all users at once to infer method, it works fine. I am trying to understand why.

Thanks Vijayalakshmi Vasudevan

On Thu, Aug 31, 2023 at 11:13 PM Scott Hale @.***> wrote:

Could you please let us know what versions of Python and pytorch you are using? Thanks!

— Reply to this email directly, view it on GitHub https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feuagendas%2Fm3inference%2Fissues%2F38%23issuecomment-1702093901&data=05%7C01%7Cvijayalakshm%40umass.edu%7C718664870c2e437bb05508dbaa996e52%7C7bd08b0b33954dc194bbd0b2e56a497f%7C0%7C0%7C638291348176124611%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=lWJi1MVbLe%2FqcKJgW%2FL2Kq17VxITnmAxrR7ZDYXE2iQ%3D&reserved=0, or unsubscribe https://nam10.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FA4GR3QL3XASXMM4S3GO5JULXYFHF7ANCNFSM6AAAAAA4G2ENHE&data=05%7C01%7Cvijayalakshm%40umass.edu%7C718664870c2e437bb05508dbaa996e52%7C7bd08b0b33954dc194bbd0b2e56a497f%7C0%7C0%7C638291348176281256%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=zgFPgz2FNs%2B3VqHvatPGSKu26S%2B6CXa2oMBadFjfAmI%3D&reserved=0 . You are receiving this because you authored the thread.Message ID: @.***>