Upload of a new agent
Browse files- README.md +60 -0
- agent.pkl +3 -0
- replay.mp4 +0 -0
- results.json +1 -0
- system.json +1 -0
- 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: Imitation-BC-CartPole-v1
|
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: not evaluated
|
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/Imitation-BC-CartPole-v1"
|
53 |
+
file_name = "agent.pkl"
|
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.pkl
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:93adc2fb1d0e81df522c4a228190c3a589f256a3d4115a66949e82ceabec383a
|
3 |
+
size 1473543
|
replay.mp4
ADDED
Binary file (123 kB). View file
|
|
results.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"env_id": "CartPole-v1", "datetime": "2024-11-14T14:33:23.999973", "mean_reward": 500.0, "std_reward": 0.0}
|
system.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"OS": "Windows-10-10.0.19045-SP0 10.0.19045", "Python": "3.10.8", "Stable-Baselines3": "2.3.2", "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 |
+
{}
|