Skip to content

Conversation

shangeth
Copy link

@shangeth shangeth commented Sep 9, 2020

Install necessary packages with ColabCode(port=10000, packages=['torchaudio', 'pytorch_lightning'])


def _install_packages(self):
for package in self.packages:
print(f'Installing {package}...')
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use logger.info instead of print here please

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes adding it

self._install_packages()
self._run_code()

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some extra space? would be nice to get rid of this

import subprocess
from pyngrok import ngrok

import subprocess
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

subprocess is already imported

@abhishekkrthakur
Copy link
Owner

Please let me know when this is ready. There is a conflict too now :)

@shangeth
Copy link
Author

shangeth commented Sep 9, 2020

  • conflict is resolved
  • added logger
  • removed unwanted import(repeated subprocess)

@shangeth
Copy link
Author

Is there anything else to change?

Copy link

@mmphego mmphego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I love this.... Ship it

@abhishekkrthakur
Copy link
Owner

conflicts. update readme please.

@shangeth
Copy link
Author

README.md conflicts resolved.

Copy link

@mmphego mmphego left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps run the code through flake8 and black to iron out some pep8 violations.

@shangeth
Copy link
Author

@mmphego flake8 and black works good.

Copy link

@Borda Borda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess that after installing the packages you need to restart the session...

Comment on lines +28 to +29
if self.packages:
self._install_packages()
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if self.packages:
self._install_packages()
self._install_packages()

print(line, end="")

def _install_packages(self):
for package in self.packages:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for package in self.packages:
if not self.packages:
return
for package in self.packages:

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

Successfully merging this pull request may close these issues.

4 participants