zap-thamm commited on
Commit
ea2080d
1 Parent(s): a5707c6

Upload of a new agent

Browse files
Files changed (7) hide show
  1. README.md +60 -0
  2. agent.zip +3 -0
  3. agent/policy +0 -0
  4. replay.mp4 +0 -0
  5. results.json +1 -0
  6. system.json +1 -0
  7. 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_Again_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: 84.42 +/- 35.58
18
+ name: mean_reward
19
+ verified: false
20
+ ---
21
+
22
+
23
+ # Custom implemented BC 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 BC 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.BC
46
+ algorithm_parameters={
47
+ ...
48
+ },
49
+ )
50
+
51
+ # Download existing agent from HF Hub
52
+ repository_id = "zap-thamm/Test_Imitation_Again_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:c8cda9edcb96d7c8c40d7479d4ea0778ab36eb3c52e548e9de079e9ae6703ad5
3
+ size 14122
agent/policy ADDED
Binary file (20.8 kB). View file
 
replay.mp4 ADDED
Binary file (157 kB). View file
 
results.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"env_id": "CartPole-v1", "datetime": "2024-12-04T11:34:14.385202", "mean_reward": 84.42, "std_reward": 35.57757158660495}
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
+ {}