zap-thamm commited on
Commit
95775af
1 Parent(s): f498a4f

Upload of a new agent

Browse files
Files changed (6) hide show
  1. README.md +60 -0
  2. agent.zip +3 -0
  3. agent/policy +0 -0
  4. results.json +1 -0
  5. system.json +1 -0
  6. training_metrics.json +1 -0
README.md ADDED
@@ -0,0 +1,60 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - CartPole-v1
4
+ - reinforcement-learning
5
+ - rl-framework
6
+ model-index:
7
+ - name: Test_Imitation_CartPole
8
+ results:
9
+ - task:
10
+ type: reinforcement-learning
11
+ name: reinforcement-learning
12
+ dataset:
13
+ name: CartPole-v1
14
+ type: CartPole-v1
15
+ metrics:
16
+ - type: mean_reward
17
+ value: 87.85 +/- 34.05
18
+ name: mean_reward
19
+ verified: false
20
+ ---
21
+
22
+
23
+ # Custom implemented PPO agent playing on *CartPole-v1*
24
+
25
+ This is a trained model of an agent playing on the environment *CartPole-v1*.
26
+ The agent was trained with a PPO algorithm.
27
+ See further agent and evaluation metadata in the according README section.
28
+
29
+
30
+ ## Import
31
+ The Python module used for training and uploading/downloading is [rl-framework](https://github.com/alexander-zap/rl-framework).
32
+ It is an easy-to-read, plug-and-use Reinforcement Learning framework and provides standardized interfaces
33
+ and implementations to various Reinforcement Learning methods and environments.
34
+
35
+ Also it provides connectors for the upload and download to popular model version control systems,
36
+ including the HuggingFace Hub.
37
+
38
+ ## Usage
39
+ ```python
40
+
41
+ from rl-framework import ImitationAgent, ImitationAlgorithm
42
+
43
+ # Create new agent instance
44
+ agent = ImitationAgent(
45
+ algorithm=ImitationAlgorithm.PPO
46
+ algorithm_parameters={
47
+ ...
48
+ },
49
+ )
50
+
51
+ # Download existing agent from HF Hub
52
+ repository_id = "zap-thamm/Test_Imitation_CartPole"
53
+ file_name = "agent.zip"
54
+ agent.download(repository_id=repository_id, filename=file_name)
55
+
56
+ ```
57
+
58
+ Further examples can be found in the [exploration section of the rl-framework repository](https://github.com/alexander-zap/rl-framework/tree/main/exploration).
59
+
60
+
agent.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:55c6e0014e895432261942c4cf11c2a66edbf344c2541d313d4e1c4e5415b8b9
3
+ size 14099
agent/policy ADDED
Binary file (20.8 kB). View file
 
results.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"env_id": "CartPole-v1", "datetime": "2024-12-02T20:01:32.239839", "mean_reward": 87.85, "std_reward": 34.054772059140255}
system.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"OS": "Windows-10-10.0.19045-SP0 10.0.19045", "Python": "3.10.8", "Stable-Baselines3": "2.4.0", "PyTorch": "2.5.1+cpu", "GPU Enabled": "False", "Numpy": "1.26.4", "Cloudpickle": "3.1.0", "Gymnasium": "0.29.1", "OpenAI Gym": "0.26.2"}
training_metrics.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {}