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

Could not enable GPU for Bert based model #8

Closed
senthurRam33 opened this issue Jul 21, 2020 · 14 comments
Closed

Could not enable GPU for Bert based model #8

senthurRam33 opened this issue Jul 21, 2020 · 14 comments

Comments

@senthurRam33
Copy link

senthurRam33 commented Jul 21, 2020

I am training the Bert based RATSQL model in Google colab pro. It takes roughly around 55 minutes for 10 steps. After started training, a warning pops up in the colab notebook. "WARNING: you are connected to a GPU runtime but not utilizing the GPU". After debugging the code, it shows that GPU is not enabled for Bert training. What can be done to enable CUDA? And please tell me what is the good environmental setup for training Bert based model?

@senthurRam33
Copy link
Author

After updating the CUDA package, this issue has been resolved. We can train the BERT in P100 but it may take upto a week

@mellahysf
Copy link

Hi @senthurRam33

Can you tel me please how to run RATSQL in Google colab? Precisely how to set up the environment based on docker ?

Thank you very much.

@senthurRam33
Copy link
Author

I didn't implement docker on colab as it is nearly impossible to run docker in that. I installed all the packages by mounting google drive on colab and started training. If the training stops, then I started retraining from the previously saved model using checkpoints

@mellahysf
Copy link

Thank you @senthurRam33 four your replay.

you said 'I installed all the packages by mounting google drive on colab'
How did you do that?
I have the problem of setting up the environment !!

@senthurRam33
Copy link
Author

Can you precisely tell me what's the problem??

@mellahysf
Copy link

Since it is impossible to use docker in colab, I want to set up manually the environment (installing packages and dependencies) in order to run RATSQL.

How to do that in colab?

@senthurRam33
Copy link
Author

--> First clone the repo in the google drive
--> Then install all the packages required to run the repo
--> Then upload the datasets in the drive
--> Then run the commands given in the repo to start the training
I would recommend you to use colab pro for faster training

@mellahysf
Copy link

I have the problem just in the second step.
How to install all the packages required to run the repo ?
By simply running 'pip install -r requirements.txt' ?

sorry for the perturbation

@senthurRam33
Copy link
Author

Yes. But in colab you run terminal commands like this "!pip install -r requirements.txt".
But there are some packages that needs to be installed separetely. In my case, jsonnet and attr packages

@mellahysf
Copy link

it requires only:
!pip install -r requirements.txt
!pip install jsonnet
!pip install attr
for setting up the environment?

@senthurRam33
Copy link
Author

For me those are the ones that required.
Just try to run the repo using the command. It will tell you what are the packages that you are missing

@mellahysf
Copy link

Thank you very much @senthurRam33
Just one more remark, I think it requires also running Stanford corenlp server, is it true ? if yes how?

@senthurRam33
Copy link
Author

Yes it requires that package too. Try installing with !pip install corenlp command

@mellahysf
Copy link

And I think also it requires python>=3.7 instead of the default python in colab which is 3.6.9

Thank you very much for all your help.

I will try to run it in colab.

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