Skip to content

Commit

Permalink
be robust wrt absent rewards in archive
Browse files Browse the repository at this point in the history
  • Loading branch information
ehneilsen committed Jan 5, 2024
1 parent 05c0ae7 commit bf9afed
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions rubin_scheduler/sim_archive/sim_archive.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import socket
import sys
from contextlib import redirect_stdout
from numbers import Number, Real, Integral
from numbers import Number, Integral
from pathlib import Path
from tempfile import TemporaryDirectory

Expand Down Expand Up @@ -404,12 +404,14 @@ def make_sim_archive_cli(*args):
parser.add_argument(
"--script", type=str, default=None, help="The file name of the script run to create the simulation."
)

notebook_help = "The file name of the notebook run to create the simulation."
notebook_help = notebook_help + " This can be produced using the %%notebook magic."
parser.add_argument(
"--notebook",
type=str,
default=None,
help="""The file name of the notebook run to create the simulation.
This can be produced using the %notebook magic.""",
help=notebook_help,
)
parser.add_argument(
"--current_env",
Expand Down Expand Up @@ -437,6 +439,9 @@ def make_sim_archive_cli(*args):
obs_rewards = pd.read_hdf(arg_values.rewards, "obs_rewards")
except KeyError:
obs_rewards = None
else:
reward_df = None
obs_rewards = None

filename_args = ["scheduler", "script", "notebook"]
in_files = {}
Expand Down

0 comments on commit bf9afed

Please sign in to comment.