Skip to content

Commit

Permalink
fix: Update all APIs to pyhf v0.7.0 (#34)
Browse files Browse the repository at this point in the history
* Update all APIs to be consistent with v0.7.0.
   - Remove comment about making measurement on the fly with
     `workspace.get_measurement` as no longer relevant.
   - Remove all use of `workspace.parameters`, now
     `workspace.model().config.parameters`, as the notebooks
      are focusing on workspace attributes, not model config
      attributes.
* Amends PR #29
  • Loading branch information
matthewfeickert authored Mar 6, 2023
1 parent 1e45c7e commit 9f90971
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
1 change: 0 additions & 1 deletion book/Combinations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,6 @@
"print(f\" nbins: {combined_workspace.channel_nbins}\")\n",
"print(f\" samples: {combined_workspace.samples}\")\n",
"print(f\" modifiers: {combined_workspace.modifiers}\")\n",
"print(f\" parameters: {combined_workspace.parameters}\")\n",
"print(f\"measurements: {combined_workspace.measurement_names}\")"
]
},
Expand Down
20 changes: 2 additions & 18 deletions book/SimpleWorkspace.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -136,22 +136,6 @@
"workspace.get_measurement(measurement_index=0)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Or create a new measurement on the fly by specifying the name for the parameter of interest:"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"workspace.get_measurement(poi_name=\"mu\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down Expand Up @@ -241,7 +225,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand All @@ -255,7 +239,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.7"
"version": "3.10.4"
}
},
"nbformat": 4,
Expand Down
1 change: 0 additions & 1 deletion book/WorkspaceManipulations.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,6 @@
"print(f\" nbins: {ws.channel_nbins}\")\n",
"print(f\" samples: {ws.samples}\")\n",
"print(f\" modifiers: {ws.modifiers}\")\n",
"print(f\" parameters: {ws.parameters}\")\n",
"print(f\"observations: {ws.observations}\")"
]
},
Expand Down

0 comments on commit 9f90971

Please sign in to comment.