huggingface / knockknock

🚪✊Knock Knock: Get notified when your training ends with only two additional lines of code
MIT License
2.78k stars 234 forks source link

When the function finished, it still need the password? #6

Closed ConanCui closed 5 years ago

ConanCui commented 5 years ago

As the figure below, it needs the password when we start the work, it is ok cause we are on the computer now. But when the work finished, it still needs the password, we want to use this lib for convenient if we can't keep eyes on the computer, but as far, it can't solve the problem? image

VictorSanh commented 5 years ago

That's odd. I cannot reproduce your issue neither in a Jupyter or in a terminal. Can I ask which OS you are using?

VictorSanh commented 5 years ago

(and any other setup information that might be helpful) It's related to the keyring library that is simply requesting the system keyring service for accessing or storing password. For instance, on my Mac, the Keychain app is controlling everything on top of Jupyter (so I don't have the outputs you are showing in cell [16]).

ConanCui commented 5 years ago

Here is my setup, I try it again, and it still needs the password twice. image

ConanCui commented 5 years ago

Is there any setup should be done for lib 'keyring'? I just pip install it, and make no modification about it.

VictorSanh commented 5 years ago

Since you are on Ubuntu, did you have any problems with keyring's backend? See https://pypi.org/project/keyring/#using-keyring-on-ubuntu-16-04 Yagmail recommends using keyrings.alt backend.

VictorSanh commented 5 years ago

Closing this issue since there doesn't seem to be any activity. Feel free to re-open! Victor

g-karthik commented 5 years ago

@VictorSanh I'm facing the exact same issue now on my AWS EC2 instance.

I was initially getting prompted the following when my train job completed: please enter password for encrypted keyring:

This is pretty inconvenient and defeats the purpose of the notifications since I'll only get the start and end notifications if I am logged into the instance and I see this prompt and enter the keyring password.

So I disabled keyring by running keyring --disable and hoped that I won't get prompted the above message again. Now I instead get the following:

(pytorch_p36) [ec2-user@<my ip and dir path>]$ python testing_kk.py 
Password for <myemail@gmail.com>: 
Save username and password in keyring? [y/n]: y
Password for <myemail@gmail.com>: 
Save username and password in keyring? [y/n]: y

After doing the above, I get the email notifications for both train start and finish. I'm guessing the password is prompted twice because it needs to send two emails.

Can you please re-open this issue and help? Thanks!

cpoptic commented 4 years ago

Please re-open this issue. It still persists.