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

[Request]: Auto-restart runtime to update pip installed versions #11

Open
1 task done
aubricot opened this issue May 15, 2023 · 0 comments
Open
1 task done

[Request]: Auto-restart runtime to update pip installed versions #11

aubricot opened this issue May 15, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@aubricot
Copy link
Owner

Contact Details

[email protected]

Is your feature request related to a problem? Please describe.

I'm always frustrated when I have to wait for the Installs & Import code blocks to run, then have to restart the runtime to use the most recently installed package versions and wait for the same code blocks to run a second time before proceeding with the rest of the notebook.

Describe the solution you would like.

I would like the runtime to automatically restart after the first round of package installs. This way, I can click "run" and walk away for a few minutes before running cells the second time and proceeding with the rest of the notebook.

Describe alternatives you have considered.

I tried to automatically restart the Colab Runtime using a try/except solution proposed here in the excerpt below.

# Install requirements.txt
try:
    !pip3 -q install -r requirements.txt
except (ResolutionImpossible, ImportError, KeyError, ModuleNotFoundError):
    print('\n\n\n~~~\nStopping RUNTIME for a manual Colab restart. Run all code blocks again to use newly installed package versions.')
    os.kill(os.getpid(), 9)

However, the error thrown by pip is not getting caught by the try/except block and still prints out below.

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. 

Which type of our computer vision pipelines are you using?

Object detection for image tagging

Which specific task from our computer vision pipelines are you using?

Plant pollinator, Insect life stages, Human present, Flower fruit

Filename

plant_poll_generate_tags_yolov3.ipynb

Version

YOLO v3 in Darknet

What browsers are you using?

Chrome

Any log output or other content that may be useful for developing the requested feature.

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@aubricot aubricot added the enhancement New feature or request label May 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant