[Feature] Install necessary packages#2
[Feature] Install necessary packages#2shangeth wants to merge 8 commits intoabhishekkrthakur:masterfrom
Conversation
colabcode/code.py
Outdated
|
|
||
| def _install_packages(self): | ||
| for package in self.packages: | ||
| print(f'Installing {package}...') |
There was a problem hiding this comment.
use logger.info instead of print here please
| self._install_packages() | ||
| self._run_code() | ||
|
|
||
There was a problem hiding this comment.
some extra space? would be nice to get rid of this
colabcode/code.py
Outdated
| import subprocess | ||
| from pyngrok import ngrok | ||
|
|
||
| import subprocess |
There was a problem hiding this comment.
subprocess is already imported
|
Please let me know when this is ready. There is a conflict too now :) |
|
|
Is there anything else to change? |
|
conflicts. update readme please. |
|
README.md conflicts resolved. |
mmphego
left a comment
There was a problem hiding this comment.
Perhaps run the code through flake8 and black to iron out some pep8 violations.
|
@mmphego flake8 and black works good. |
Borda
left a comment
There was a problem hiding this comment.
I guess that after installing the packages you need to restart the session...
| if self.packages: | ||
| self._install_packages() |
There was a problem hiding this comment.
| if self.packages: | |
| self._install_packages() | |
| self._install_packages() |
| print(line, end="") | ||
|
|
||
| def _install_packages(self): | ||
| for package in self.packages: |
There was a problem hiding this comment.
| for package in self.packages: | |
| if not self.packages: | |
| return | |
| for package in self.packages: |
Install necessary packages with
ColabCode(port=10000, packages=['torchaudio', 'pytorch_lightning'])