diff --git a/example_hard_model.ipynb b/example_hard_model.ipynb index 4c4f3ad8..0b2df2e0 100644 --- a/example_hard_model.ipynb +++ b/example_hard_model.ipynb @@ -18,15 +18,6 @@ "First let's make sure we have the necessary packages installed. Be sure to create a virtual environment, then install the required packages for this project in it." ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [ - "%pip install -e ." - ] - }, { "cell_type": "code", "execution_count": null, @@ -44,7 +35,14 @@ "from engiopt import metrics\n", "from engiopt.diffusion_2d_cond.diffusion_2d_cond import beta_schedule\n", "from engiopt.diffusion_2d_cond.diffusion_2d_cond import DiffusionSampler\n", - "import wandb" + "import wandb\n", + "\n", + "if \"google.colab\" in str(get_ipython()):\n", + " if not os.path.exists(\"EngiOpt\"):\n", + " !git clone https://github.com/IDEALLab/EngiOpt.git\n", + " %cd EngiOpt\n", + "\n", + "%pip install -e ." ] }, { @@ -6432,7 +6430,7 @@ "source": [ "### Qualitative evaluation\n", "\n", - "Now we can also use metrics to get a quantitative idea of how good the generated designs are. Here we compute optimality gaps between the generated designs and optimized designs in terms of objective values (thermal compliance for heatconduction)" + "Now we can also use metrics to get a quantitative idea of how good the generated designs are. Here we compute optimality gaps between the generated designs and optimized designs in terms of objective values (thermal compliance for heatconduction). We have other metrics available, see the [metrics.py](https://github.com/IDEALLab/EngiOpt/blob/main/engiopt/metrics.py) file for more details." ] }, {