Skip to content

Commit

Permalink
More switching to find_rail_file
Browse files Browse the repository at this point in the history
  • Loading branch information
eacharles committed Oct 16, 2023
1 parent 85e499c commit ec69e6d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
6 changes: 3 additions & 3 deletions examples/estimation_examples/CMNN_Demo.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,9 @@
"metadata": {},
"outputs": [],
"source": [
"from rail.core.utils import RAILDIR\n",
"trainFile = os.path.join(RAILDIR, 'rail/examples_data/testdata/test_dc2_training_9816.hdf5')\n",
"testFile = os.path.join(RAILDIR, 'rail/examples_data/testdata/test_dc2_validation_9816.hdf5')\n",
"from rail.core.utils import find_rail_file\n",
"trainFile = find_rail_file('examples_data/testdata/test_dc2_training_9816.hdf5')\n",
"testFile = find_rail_file('examples_data/testdata/test_dc2_validation_9816.hdf5')\n",
"training_data = DS.read_file(\"training_data\", TableHandle, trainFile)\n",
"test_data = DS.read_file(\"test_data\", TableHandle, testFile)"
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@
"metadata": {},
"outputs": [],
"source": [
"from rail.core.utils import RAILDIR\n",
"trainFile = os.path.join(RAILDIR, 'rail/examples_data/testdata/test_dc2_training_9816.hdf5')\n",
"testFile = os.path.join(RAILDIR, 'rail/examples_data/testdata/test_dc2_validation_9816.hdf5')\n",
"from rail.core.utils import find_rail_file\n",
"trainFile = find_rail_file('examples_data/testdata/test_dc2_training_9816.hdf5')\n",
"testFile = find_rail_file('examples_data/testdata/test_dc2_validation_9816.hdf5')\n",
"training_data = DS.read_file(\"training_data\", TableHandle, trainFile)\n",
"test_data = DS.read_file(\"test_data\", TableHandle, testFile)"
]
Expand Down Expand Up @@ -408,11 +408,18 @@
"except FileNotFoundError:\n",
" pass"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "rail",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
Expand Down
8 changes: 4 additions & 4 deletions examples/estimation_examples/GPz_estimation_example.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@
"metadata": {},
"outputs": [],
"source": [
"# RAILDIR is a convenience variable set within RAIL that stores the path to the package as installed on your machine. We have several example data files that are copied with RAIL that we can use for our example run, let's grab those files, one for training/validation, and the other for testing:\n",
"from rail.core.utils import RAILDIR\n",
"trainFile = os.path.join(RAILDIR, 'rail/examples_data/testdata/test_dc2_training_9816.hdf5')\n",
"testFile = os.path.join(RAILDIR, 'rail/examples_data/testdata/test_dc2_validation_9816.hdf5')\n",
"# find_rail_file is a convenience function that finds a file in the RAIL ecosystem We have several example data files that are copied with RAIL that we can use for our example run, let's grab those files, one for training/validation, and the other for testing:\n",
"from rail.core.utils import find_rail_file\n",
"trainFile = find_rail_file('examples_data/testdata/test_dc2_training_9816.hdf5')\n",
"testFile = find_rail_file('examples_data/testdata/test_dc2_validation_9816.hdf5')\n",
"training_data = DS.read_file(\"training_data\", TableHandle, trainFile)\n",
"test_data = DS.read_file(\"test_data\", TableHandle, testFile)"
]
Expand Down

0 comments on commit ec69e6d

Please sign in to comment.