Skip to content

Commit

Permalink
add single echelon notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
Jinyu Wang authored and Jinyu Wang committed Feb 23, 2024
1 parent a2d03db commit cd60880
Show file tree
Hide file tree
Showing 3 changed files with 345 additions and 3 deletions.
4 changes: 2 additions & 2 deletions examples/rl/sc_single_echelon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ scenario_path: "examples/supply_chain/single_echelon"
log_path: "examples/supply_chain/logs/rl_job/supply_chain.txt"
main:
# Number of episodes to run. Each episode is one cycle of roll-out and training.
num_episodes: 100
num_episodes: 50
# Number of environment steps to collect environment samples over. If null, samples are collected until the
# environments reach the terminal state, i.e., for a full episode. Otherwise, samples are collected until the
# specified number of steps or the terminal state is reached, whichever comes first.
num_steps: null
# This can be an integer or a list of integers. An integer indicates the interval at which policies are evaluated.
# A list indicates the episodes at the end of which policies are to be evaluated. Note that episode indexes are
# 1-based.
eval_schedule: 5
eval_schedule: 10
# Log levels for the main loop. Could be: DEBUG, INFO, WARN, ERROR, CRITICAL, PROGRESS
logging:
stdout: INFO
Expand Down
1 change: 0 additions & 1 deletion examples/supply_chain/single_echelon/env_sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -761,7 +761,6 @@ def _post_update_product_metric_track(self) -> None:
self.product_metric_track.pop(key)

def _post_eval_step(self, cache_element: CacheElement) -> None:
self._logger.info(f"Step: {self._step_idx}")
if self._tracker.eval_period[0] <= cache_element.tick < self._tracker.eval_period[1]:
self._eval_reward += np.sum(
[
Expand Down
Loading

0 comments on commit cd60880

Please sign in to comment.