Reinforcement Learning
stable-baselines3
deep-reinforcement-learning
agricultural-ai
weather-modelling
curriculum-learning
edge-ai
Instructions to use DHDRL/monsoon-rl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- stable-baselines3
How to use DHDRL/monsoon-rl with stable-baselines3:
from huggingface_sb3 import load_from_hub checkpoint = load_from_hub( repo_id="DHDRL/monsoon-rl", filename="{MODEL FILENAME}.zip", ) - Notebooks
- Google Colab
- Kaggle
Update evaluate_checkpoint.py
Browse files- evaluate_checkpoint.py +21 -1
evaluate_checkpoint.py
CHANGED
|
@@ -56,7 +56,6 @@ def _episode_is_risky(
|
|
| 56 |
clean_ratio: float,
|
| 57 |
spatial_corr: float,
|
| 58 |
) -> bool:
|
| 59 |
-
"""Match training: regional event plan, not independent per-zone draws."""
|
| 60 |
plan = _episode_event_plan(
|
| 61 |
n_zones, effective_seed, clean_ratio, spatial_corr
|
| 62 |
)
|
|
@@ -474,6 +473,24 @@ def main() -> None:
|
|
| 474 |
default=0.85,
|
| 475 |
help="Must match train",
|
| 476 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 477 |
args = p.parse_args()
|
| 478 |
|
| 479 |
if args.policy == "checkpoint" and not args.checkpoint:
|
|
@@ -485,6 +502,9 @@ def main() -> None:
|
|
| 485 |
soft_reset=True,
|
| 486 |
clean_episode_ratio=args.clean_episode_ratio,
|
| 487 |
event_spatial_correlation=args.event_spatial_correlation,
|
|
|
|
|
|
|
|
|
|
| 488 |
)
|
| 489 |
|
| 490 |
model = None
|
|
|
|
| 56 |
clean_ratio: float,
|
| 57 |
spatial_corr: float,
|
| 58 |
) -> bool:
|
|
|
|
| 59 |
plan = _episode_event_plan(
|
| 60 |
n_zones, effective_seed, clean_ratio, spatial_corr
|
| 61 |
)
|
|
|
|
| 473 |
default=0.85,
|
| 474 |
help="Must match train",
|
| 475 |
)
|
| 476 |
+
p.add_argument(
|
| 477 |
+
"--alert-value",
|
| 478 |
+
type=float,
|
| 479 |
+
default=100.0,
|
| 480 |
+
help="Must match train (default 100.0)",
|
| 481 |
+
)
|
| 482 |
+
p.add_argument(
|
| 483 |
+
"--false-alert-penalty",
|
| 484 |
+
type=float,
|
| 485 |
+
default=20.0,
|
| 486 |
+
help="Must match train (default 20.0)",
|
| 487 |
+
)
|
| 488 |
+
p.add_argument(
|
| 489 |
+
"--miss-penalty",
|
| 490 |
+
type=float,
|
| 491 |
+
default=50.0,
|
| 492 |
+
help="Must match train (default 50.0)",
|
| 493 |
+
)
|
| 494 |
args = p.parse_args()
|
| 495 |
|
| 496 |
if args.policy == "checkpoint" and not args.checkpoint:
|
|
|
|
| 502 |
soft_reset=True,
|
| 503 |
clean_episode_ratio=args.clean_episode_ratio,
|
| 504 |
event_spatial_correlation=args.event_spatial_correlation,
|
| 505 |
+
alert_value=args.alert_value,
|
| 506 |
+
false_alert_penalty=args.false_alert_penalty,
|
| 507 |
+
miss_penalty=args.miss_penalty,
|
| 508 |
)
|
| 509 |
|
| 510 |
model = None
|