mirror of
https://github.com/jcreek/Sarpy.git
synced 2026-07-13 11:13:44 +00:00
refactor(*): Change how model files are set
This commit is contained in:
+2
-2
@@ -1,7 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
from stable_baselines3 import PPO
|
from stable_baselines3 import PPO
|
||||||
|
|
||||||
models_dir = "../../models/PPO-rl"
|
model_zip = "PPO-rl2/280000.zip"
|
||||||
|
|
||||||
|
|
||||||
class Agent:
|
class Agent:
|
||||||
@@ -9,7 +9,7 @@ class Agent:
|
|||||||
# Get the directory of agent.py
|
# Get the directory of agent.py
|
||||||
script_dir = os.path.dirname(os.path.realpath(__file__))
|
script_dir = os.path.dirname(os.path.realpath(__file__))
|
||||||
|
|
||||||
model_path = os.path.join(script_dir, "../../models/PPO-rl/280000.zip")
|
model_path = os.path.join(script_dir, f"../../models/{model_zip}")
|
||||||
self.model = PPO.load(model_path)
|
self.model = PPO.load(model_path)
|
||||||
|
|
||||||
def act(self, obs):
|
def act(self, obs):
|
||||||
|
|||||||
Reference in New Issue
Block a user