Skip to content

Commit

Permalink
Fix configuration in Google Colab
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Aug 9, 2024
1 parent 3aa9e27 commit d5d525d
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions example/single_node_with_hydro/main.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,14 @@
"metadata": {},
"outputs": [],
"source": [
"# If you are using Google Colab, uncomment the following lines and run the cell\n",
"# to download the repository and install the necessary packages.\n",
"# If you are using Google Colab, uncomment the following two cells and run them\n",
"# to config the running environment.\n",
"\n",
"# !git clone https://github.com/PREP-NexT/PREP-SHOT.git\n",
"# !pip install -r requirements.txt\n",
"# from IPython.utils import io\n",
"\n",
"# with io.capture_output() as captured:\n",
"# !git clone https://github.com/PREP-NexT/PREP-SHOT.git\n",
"# !pip install -r /content/PREP-SHOT/requirements.txt\n",
"# import os\n",
"# os.chdir('/content/PREP-SHOT/example/single_node_with_hydro/')"
]
Expand All @@ -83,7 +86,7 @@
"metadata": {},
"outputs": [],
"source": [
"# This cell may spend 2-5 minutes depending on the device\n",
"# This cell may take up to 6-7 minutes to execute on Google Colab.\n",
"import subprocess\n",
"# Copy config files to the run directory & Run model\n",
"commands = (\n",
Expand All @@ -93,7 +96,8 @@
" 'python run.py'\n",
")\n",
"log_ = subprocess.run(commands, shell=True, capture_output=True, text=True)\n",
"print(log_.stderr)"
"if log_.returncode != 0:\n",
" print(log_.stderr)"
]
},
{
Expand Down

0 comments on commit d5d525d

Please sign in to comment.