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

fixes for cudf_pandas_opencellid_demo.ipynb #39

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

raybellwaves
Copy link
Contributor

@raybellwaves raybellwaves commented Aug 29, 2024

! pip install -q hvplot pydeck panel holoviews=1.18.3 gives
ERROR: Invalid requirement: 'holoviews=1.18.3': Expected end or semicolon (after name and no valid version specifier)
holoviews=1.18.3
^
Hint: = is not a valid operator. Did you mean == ?

Screenshot 2024-08-29 at 9 57 49 AM

Added jupyter_bokeh in install to avoid

<ipython-input-3-c7cf4cf21953>:7: UserWarning: Using Panel interactively in Colab notebooks requires the jupyter_bokeh package to be installed. Install it with:

    !pip install jupyter_bokeh

and try again.
  pn.extension("deckgl", loading_indicator=True, template='material')

Screenshot 2024-08-29 at 10 10 32 AM

I also adjusted the part to check if the script exists before downloading

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

@raybellwaves raybellwaves changed the title fix version pin: cudf_pandas_opencellid_demo.ipynb fixs for cudf_pandas_opencellid_demo.ipynb Aug 29, 2024
@raybellwaves raybellwaves changed the title fixs for cudf_pandas_opencellid_demo.ipynb fixes for cudf_pandas_opencellid_demo.ipynb Aug 29, 2024
@AjayThorve
Copy link
Contributor

@raybellwaves thanks for creating this PR, just left a couple of comments!

@raybellwaves
Copy link
Contributor Author

@raybellwaves thanks for creating this PR, just left a couple of comments!

Can't see your comments

Copy link
Contributor

@AjayThorve AjayThorve left a comment

Choose a reason for hiding this comment

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

left a couple of comments

Comment on lines +103 to +119
"import os\n",
"import subprocess\n",
"\n",
"file_name = \"opencellid_downloader.py\"\n",
"file_url = f\"https://raw.githubusercontent.com/rapidsai-community/showcase/main/getting_started_tutorials/{file_name}\"\n",
"\n",
"if os.path.exists(file_name):\n",
" print(f\"The file '{file_name}' exists in the current directory.\")\n",
"else:\n",
" print(f\"The file '{file_name}' does not exist in the current directory. Downloading it now...\")\n",
" try:\n",
" subprocess.run([\"wget\", file_url], check=True)\n",
" print(f\"Successfully downloaded '{file_name}'.\")\n",
" except subprocess.CalledProcessError as e:\n",
" print(f\"Failed to download the file. Error: {e}\")\n",
" except FileNotFoundError:\n",
" print(\"The 'wget' command is not found. Please ensure it's installed and in your system PATH.\")"
Copy link
Contributor

Choose a reason for hiding this comment

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

I like the idea of checking if the file exists before downloading, can be done in an inline way as well to keep the cell size small:

!test -f opencellid_downloader.py || wget https://raw.githubusercontent.com/rapidsai-community/showcase/main/getting_started_tutorials/opencellid_downloader.py

@AjayThorve
Copy link
Contributor

AjayThorve commented Aug 30, 2024

@raybellwaves thanks for creating this PR, just left a couple of comments!

Can't see your comments

Apologies, can you see them now, @raybellwaves ?

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.

2 participants