Skip to content

Commit

Permalink
Clear notebook 02 outputs
Browse files Browse the repository at this point in the history
  • Loading branch information
mlojek committed Feb 27, 2025
1 parent 646cbe9 commit 977bd07
Showing 1 changed file with 12 additions and 62 deletions.
74 changes: 12 additions & 62 deletions demo/02_creating_an_optimizer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"id": "bc90b9c6-8955-4c6f-a672-9611db01de77",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -61,21 +61,10 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"id": "dcae81fc-4ca7-42fb-9de8-0fca37cafe99",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"FunctionMetadata(name='custom_function', dim=10, hyperparameters={})"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"func = SimpleObjectiveFunction(10)\n",
"func.get_metadata()"
Expand All @@ -91,18 +80,10 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"id": "76e26cee-e216-49d7-84d6-3d00385f5f78",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Point(x=[2.3, 2.3, 2.3, 2.3, 2.3, 2.3, 2.3, 2.3, 2.3, 2.3], y=3185.885477972998, is_evaluated=True)\n"
]
}
],
"outputs": [],
"source": [
"my_point = Point([2.3] * 10)\n",
"print(func(my_point))"
Expand All @@ -118,7 +99,7 @@
},
{
"cell_type": "code",
"execution_count": 14,
"execution_count": null,
"id": "8106e806-b3b6-4efb-b0f7-e00c7ccecfc0",
"metadata": {},
"outputs": [],
Expand Down Expand Up @@ -160,21 +141,10 @@
},
{
"cell_type": "code",
"execution_count": 16,
"execution_count": null,
"id": "ca48ed5f-03c9-43b0-a0f5-decf18b11683",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Point(x=[2.3, 2.3, 2.3, 2.3, 2.3, 2.3, 2.3, 2.3, 2.3, 2.3], y=121.66999999999999, is_evaluated=True)"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"comp = ComplexObjectiveFunction(10, 3)\n",
"comp(my_point)"
Expand All @@ -190,21 +160,10 @@
},
{
"cell_type": "code",
"execution_count": 17,
"execution_count": null,
"id": "3b20f2e2-e77f-4538-82f8-4769910b1f7a",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"FunctionMetadata(name='custom_function', dim=10, hyperparameters={'exponent': 3})"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"comp.get_metadata()"
]
Expand All @@ -220,19 +179,10 @@
},
{
"cell_type": "code",
"execution_count": 19,
"execution_count": null,
"id": "383e752d-7f08-4914-9213-79e92659f9a2",
"metadata": {},
"outputs": [
{
"ename": "SyntaxError",
"evalue": "expected ':' (1313679344.py, line 3)",
"output_type": "error",
"traceback": [
"\u001b[0;36m Cell \u001b[0;32mIn[19], line 3\u001b[0;36m\u001b[0m\n\u001b[0;31m class CustomOptimizer\u001b[0m\n\u001b[0m ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m expected ':'\n"
]
}
],
"outputs": [],
"source": [
"from optilab.optimizers import Optimizer\n",
"\n",
Expand Down

0 comments on commit 977bd07

Please sign in to comment.