(logdir, fname, plot_p, main_color, mean_color, rows, cols, dataset, seed=None)
| 342 | return os.path.join(logdir, runs[-1]) |
| 343 | |
| 344 | def plot_from_logdir(logdir, fname, plot_p, main_color, mean_color, rows, cols, dataset, seed=None): |
| 345 | |
| 346 | # Load the data from pickle files |
| 347 | try: |
| 348 | with open(f"{logdir}/context_points.pkl", "rb") as f: |
| 349 | context_points = pickle.load(f) |
| 350 | except: |
| 351 | print(f"No context_points.pkl found in {logdir}") |
| 352 | logdir = None |
| 353 | return |
| 354 | |
| 355 | try: |
| 356 | with open(f"{logdir}/forecast_length.pkl", "rb") as f: |
| 357 | prediction_length = pickle.load(f) |
| 358 | except: |
| 359 | print(f"No forecast_length.pkl found in {logdir}") |
| 360 | logdir = None |
| 361 | return |
| 362 | |
| 363 | try: |
| 364 | with open(f"{logdir}/target_df.pkl", "rb") as f: |
| 365 | target_df = pickle.load(f) |
| 366 | except: |
| 367 | print(f"No target_df.pkl found in {logdir}") |
| 368 | logdir = None |
| 369 | return |
| 370 | |
| 371 | try: |
| 372 | with open(f"{logdir}/hypothesis_forecasts.pkl", "rb") as f: |
| 373 | hypothesis_forecasts = pickle.load(f) |
| 374 | except: |
| 375 | print(f"No hypothesis_forecasts.pkl found in {logdir}") |
| 376 | logdir = None |
| 377 | return |
| 378 | |
| 379 | try: |
| 380 | with open(f"{logdir}/forecast_length.pkl", "rb") as f: |
| 381 | forecast_length = pickle.load(f) |
| 382 | except: |
| 383 | print(f"No forecast_length.pkl found in {logdir}") |
| 384 | logdir = None |
| 385 | return |
| 386 | |
| 387 | try: |
| 388 | with open(f"{logdir}/freq_type.pkl", "rb") as f: |
| 389 | freq_type = pickle.load(f) |
| 390 | except: |
| 391 | print(f"No freq_type.pkl found in {logdir}") |
| 392 | logdir = None |
| 393 | return |
| 394 | |
| 395 | try: |
| 396 | with open(f"{logdir}/is_mcl.pkl", "rb") as f: |
| 397 | is_mcl = pickle.load(f) |
| 398 | except: |
| 399 | print(f"No is_mcl.pkl found in {logdir}") |
| 400 | logdir = None |
| 401 | return |
nothing calls this directly
no test coverage detected