rnow 0.2.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- rnow/__init__.py +5 -0
- rnow/__main__.py +7 -0
- rnow/cli/__init__.py +6 -0
- rnow/cli/auth.py +67 -0
- rnow/cli/blob.py +98 -0
- rnow/cli/commands.py +2311 -0
- rnow/cli/common.py +28 -0
- rnow/cli/cube.py +255 -0
- rnow/cli/main.py +49 -0
- rnow/cli/test.py +728 -0
- rnow/cli/token_count.py +295 -0
- rnow/core/__init__.py +33 -0
- rnow/core/reward.py +333 -0
- rnow/core/tool.py +494 -0
- rnow/models.py +295 -0
- rnow/templates/deepseek-aha/config.yml +26 -0
- rnow/templates/deepseek-aha/rewards.py +36 -0
- rnow/templates/deepseek-aha/train.jsonl +1000 -0
- rnow/templates/mcp-tavily/config.yml +29 -0
- rnow/templates/mcp-tavily/requirements.txt +1 -0
- rnow/templates/mcp-tavily/rewards.py +25 -0
- rnow/templates/mcp-tavily/train.jsonl +500 -0
- rnow/templates/new/config.yml +26 -0
- rnow/templates/new/requirements.txt +1 -0
- rnow/templates/new/rewards.py +0 -0
- rnow/templates/new/train.jsonl +0 -0
- rnow/templates/rl-nextjs/config.yml +27 -0
- rnow/templates/rl-nextjs/requirements.txt +2 -0
- rnow/templates/rl-nextjs/rewards.py +446 -0
- rnow/templates/rl-nextjs/train.jsonl +1000 -0
- rnow/templates/rl-single/config.yml +27 -0
- rnow/templates/rl-single/requirements.txt +1 -0
- rnow/templates/rl-single/rewards.py +14 -0
- rnow/templates/rl-single/train.jsonl +1000 -0
- rnow/templates/rl-tools/config.yml +27 -0
- rnow/templates/rl-tools/env.py +38 -0
- rnow/templates/rl-tools/requirements.txt +3 -0
- rnow/templates/rl-tools/rewards.py +25 -0
- rnow/templates/rl-tools/train.jsonl +500 -0
- rnow/templates/sft/config.yml +20 -0
- rnow/templates/sft/train.jsonl +100 -0
- rnow/templates/tutorial-reward/config.yml +27 -0
- rnow/templates/tutorial-reward/requirements.txt +1 -0
- rnow/templates/tutorial-reward/rewards.py +15 -0
- rnow/templates/tutorial-reward/train.jsonl +1000 -0
- rnow/templates/tutorial-tool/config.yml +27 -0
- rnow/templates/tutorial-tool/env.py +7 -0
- rnow/templates/tutorial-tool/requirements.txt +3 -0
- rnow/templates/tutorial-tool/rewards.py +7 -0
- rnow/templates/tutorial-tool/train.jsonl +1266 -0
- rnow-0.2.4.dist-info/METADATA +135 -0
- rnow-0.2.4.dist-info/RECORD +56 -0
- rnow-0.2.4.dist-info/WHEEL +5 -0
- rnow-0.2.4.dist-info/entry_points.txt +2 -0
- rnow-0.2.4.dist-info/licenses/LICENSE +21 -0
- rnow-0.2.4.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: rnow
|
|
3
|
+
Version: 0.2.4
|
|
4
|
+
Summary: ReinforceNow CLI - Reinforcement Learning platform command-line interface
|
|
5
|
+
Requires-Python: >=3.10
|
|
6
|
+
Description-Content-Type: text/markdown
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Requires-Dist: click>=8.0.0
|
|
9
|
+
Requires-Dist: requests>=2.25.0
|
|
10
|
+
Requires-Dist: httpx>=0.24.0
|
|
11
|
+
Requires-Dist: pydantic>=2.0.0
|
|
12
|
+
Requires-Dist: pyyaml>=5.4.0
|
|
13
|
+
Requires-Dist: packaging>=21.0
|
|
14
|
+
Requires-Dist: prompt_toolkit>=3.0.0
|
|
15
|
+
Requires-Dist: tokenizers>=0.15.0
|
|
16
|
+
Requires-Dist: openai-harmony>=0.0.8
|
|
17
|
+
Provides-Extra: test
|
|
18
|
+
Requires-Dist: tinker-cookbook>=0.1.0; extra == "test"
|
|
19
|
+
Provides-Extra: api
|
|
20
|
+
Requires-Dist: fastapi>=0.68.0; extra == "api"
|
|
21
|
+
Requires-Dist: uvicorn>=0.15.0; extra == "api"
|
|
22
|
+
Provides-Extra: mcp
|
|
23
|
+
Requires-Dist: fastmcp>=0.1.0; extra == "mcp"
|
|
24
|
+
Provides-Extra: all
|
|
25
|
+
Requires-Dist: tinker-cookbook>=0.1.0; extra == "all"
|
|
26
|
+
Requires-Dist: fastapi>=0.68.0; extra == "all"
|
|
27
|
+
Requires-Dist: uvicorn>=0.15.0; extra == "all"
|
|
28
|
+
Requires-Dist: fastmcp>=0.1.0; extra == "all"
|
|
29
|
+
Dynamic: license-file
|
|
30
|
+
|
|
31
|
+
<div align="center">
|
|
32
|
+
<img
|
|
33
|
+
alt="ReinforceNow CLI"
|
|
34
|
+
src="./assets/header.png"
|
|
35
|
+
width="100%"
|
|
36
|
+
>
|
|
37
|
+
<br><br>
|
|
38
|
+
|
|
39
|
+
[](https://pypi.org/project/rnow/)
|
|
40
|
+
[](https://reinforcenow.ai/docs)
|
|
41
|
+
[](https://x.com/reinforcenowai)
|
|
42
|
+
[](./LICENSE)
|
|
43
|
+
|
|
44
|
+
</div>
|
|
45
|
+
|
|
46
|
+
# Documentation
|
|
47
|
+
|
|
48
|
+
See the [documentation](https://www.reinforcenow.ai/docs/getting-started/quickstart) for a technical overview of the platform and [train your first agent](https://www.reinforcenow.ai/docs/getting-started/first-agent)
|
|
49
|
+
|
|
50
|
+
# Quick Start
|
|
51
|
+
|
|
52
|
+
### 1. Install
|
|
53
|
+
|
|
54
|
+
```bash
|
|
55
|
+
pip install rnow
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### 2. Authenticate
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
rnow login
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### 3. Create & Run Your First Project
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
rnow init --template rl-single
|
|
68
|
+
rnow run
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
That's it! Your training run will start on ReinforceNow's infrastructure. Monitor progress in the [dashboard](https://reinforcenow.ai/home).
|
|
72
|
+
|
|
73
|
+

|
|
74
|
+
|
|
75
|
+
# Core Concepts
|
|
76
|
+
|
|
77
|
+
Go from raw data to a reliable AI agent in production. ReinforceNow gives you the flexibility to define:
|
|
78
|
+
|
|
79
|
+
### 1. Reward Functions
|
|
80
|
+
|
|
81
|
+
Define how your model should be evaluated using the `@reward` decorator:
|
|
82
|
+
|
|
83
|
+
```python
|
|
84
|
+
from rnow.core import reward, RewardArgs
|
|
85
|
+
|
|
86
|
+
@reward
|
|
87
|
+
async def accuracy(args: RewardArgs, messages: list) -> float:
|
|
88
|
+
"""Check if the model's answer matches ground truth."""
|
|
89
|
+
response = messages[-1]["content"]
|
|
90
|
+
expected = args.metadata["answer"]
|
|
91
|
+
return 1.0 if expected in response else 0.0
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
→ [Write your first reward function](https://www.reinforcenow.ai/docs/getting-started/first-reward)
|
|
95
|
+
|
|
96
|
+
### 2. Tools (for Agents)
|
|
97
|
+
|
|
98
|
+
Give your model the ability to call functions during training:
|
|
99
|
+
|
|
100
|
+
```python
|
|
101
|
+
from rnow.core import tool
|
|
102
|
+
|
|
103
|
+
@tool
|
|
104
|
+
def search(query: str, max_results: int = 5) -> dict:
|
|
105
|
+
"""Search the web for information."""
|
|
106
|
+
# Your implementation here
|
|
107
|
+
return {"results": [...]}
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
→ [Train an agent with custom tools](https://www.reinforcenow.ai/docs/getting-started/first-agent)
|
|
111
|
+
|
|
112
|
+
### 3. Training Data
|
|
113
|
+
|
|
114
|
+
Create a `train.jsonl` file with your prompts and reward assignments:
|
|
115
|
+
|
|
116
|
+
```json
|
|
117
|
+
{"messages": [{"role": "user", "content": "Balance the equation: Fe + O2 → Fe2O3"}], "rewards": ["accuracy"], "metadata": {"answer": "4Fe + 3O2 → 2Fe2O3"}}
|
|
118
|
+
{"messages": [{"role": "user", "content": "Balance the equation: H2 + O2 → H2O"}], "rewards": ["accuracy"], "metadata": {"answer": "2H2 + O2 → 2H2O"}}
|
|
119
|
+
{"messages": [{"role": "user", "content": "Balance the equation: N2 + H2 → NH3"}], "rewards": ["accuracy"], "metadata": {"answer": "N2 + 3H2 → 2NH3"}}
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
→ [Learn about training data format](https://www.reinforcenow.ai/docs/cli-reference/train-data)
|
|
123
|
+
|
|
124
|
+
# Contributing
|
|
125
|
+
|
|
126
|
+
We welcome contributions! ❤️ Please open an issue to discuss your ideas before submitting a PR.
|
|
127
|
+
|
|
128
|
+
<br>
|
|
129
|
+
<div align="center">
|
|
130
|
+
<img
|
|
131
|
+
alt="ReinforceNow"
|
|
132
|
+
src="./assets/footer.png"
|
|
133
|
+
width="100%"
|
|
134
|
+
>
|
|
135
|
+
</div>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
rnow/__init__.py,sha256=eZZ4ojxcXfvZy6DKVUCnABXwaa6qJG2i9Jaw0UG4UNk,105
|
|
2
|
+
rnow/__main__.py,sha256=I7C-8zwJh2X48frHLIp256g9wNyIvs6EJbxrGg70lmQ,141
|
|
3
|
+
rnow/models.py,sha256=DP2s8QTmXyPlzukWIvQPLkfuyKPmyszdnAcBPBOHGY0,9194
|
|
4
|
+
rnow/cli/__init__.py,sha256=9jch1FcYtWwO3xa239DQkoJDo07xna4qL9m_IS_kHR8,103
|
|
5
|
+
rnow/cli/auth.py,sha256=M12S4pzocOlRqUM5LLGJDrPfRREh4_wqEyIiLs65Wr4,1797
|
|
6
|
+
rnow/cli/blob.py,sha256=ZdGNoeT_q--K60qbzNRllP9ejYcbHAf5_PrHmQcu43o,2739
|
|
7
|
+
rnow/cli/commands.py,sha256=2kOIw3fi68gR5C19ALFeCb_0GysB7CYkUFWBHX5klWQ,84411
|
|
8
|
+
rnow/cli/common.py,sha256=ayRStKviHMFatb1nJg6zrUzl_hfdmyoKNTXLFLQrmCA,679
|
|
9
|
+
rnow/cli/cube.py,sha256=oZzhKQia58DPsp78QtWntDX4OZmQHSNyRxWfw4kMzgk,8614
|
|
10
|
+
rnow/cli/main.py,sha256=EpF3XUxEVIwwgO3tblKAdxWf0WW3lntHGkTeK5nwsQE,1169
|
|
11
|
+
rnow/cli/test.py,sha256=ATnnnrfLcyJm7RFFC6J61st-9-dbIlG-3ZiuqAvY-Cs,24854
|
|
12
|
+
rnow/cli/token_count.py,sha256=2F22yeg9R-Ai9TmTZsloi9RHDlVsQ9YJ9oX-zN2TUIY,9930
|
|
13
|
+
rnow/core/__init__.py,sha256=uGQliIeuxFxdswtob6Jmkw8gu3FHpN24DWtIQQSMRLA,737
|
|
14
|
+
rnow/core/reward.py,sha256=DVTKeTtYgSZXxVqglW-KMEozSnyrt0ZpxupjPyn9r_8,11529
|
|
15
|
+
rnow/core/tool.py,sha256=x0F_1PyGdzV8S-D67KcVX6ZrXD2oTkiZDTQUy0L4vIY,15927
|
|
16
|
+
rnow/templates/deepseek-aha/config.yml,sha256=MhbpfjJa3DF6jGy5puSsLQxYcptr-lDa1DRN9_v9f18,578
|
|
17
|
+
rnow/templates/deepseek-aha/rewards.py,sha256=Wawuu5wU8j3h4ggvFd6tmhSUOOjNuw7p_UZvIFt5Usw,1018
|
|
18
|
+
rnow/templates/deepseek-aha/train.jsonl,sha256=TvX96zObfGxYc5KLQNV9rlwrqaYSx_08iHyTb3VqybU,321106
|
|
19
|
+
rnow/templates/mcp-tavily/config.yml,sha256=3mwy5fN8S7-q7uXgZN_Xg7JXYCDePJFy0WVWmojYX7s,683
|
|
20
|
+
rnow/templates/mcp-tavily/requirements.txt,sha256=1ZpQJZiqb5W7yO6tXGAqVUSWMilSTadxqVmwsRhmgz4,17
|
|
21
|
+
rnow/templates/mcp-tavily/rewards.py,sha256=5z6dI2AO9WeSIIVfhx9LOBMgVGR23rP8Cis4Xyndq4M,776
|
|
22
|
+
rnow/templates/mcp-tavily/train.jsonl,sha256=YjfEErhtfuJko3ZvzHFsNXTEmxNnSNMMTWZHgwg4d9g,225204
|
|
23
|
+
rnow/templates/new/config.yml,sha256=qTkNq2XBJ4IhcdpjVYZDb9WFaoBj70a1ePbP_vMaW3k,491
|
|
24
|
+
rnow/templates/new/requirements.txt,sha256=8MGbxM7f1_Rv5FzDLIpGQIWbuRc2VeiJ2Pl4dbKVOvE,37
|
|
25
|
+
rnow/templates/new/rewards.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
26
|
+
rnow/templates/new/train.jsonl,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
27
|
+
rnow/templates/rl-nextjs/config.yml,sha256=5b9Gs7thcqjUXJ6bv0chlxQdvsdTARyRduWESmWVQHg,555
|
|
28
|
+
rnow/templates/rl-nextjs/requirements.txt,sha256=Ul1DVTJGLJBXgqujOiyIDLKXgkvl6XlpjNexy4fGoMc,36
|
|
29
|
+
rnow/templates/rl-nextjs/rewards.py,sha256=IAHhWIJY9ah3YksoHkimQaC1folP-FO9Bgae27xhmvA,14625
|
|
30
|
+
rnow/templates/rl-nextjs/train.jsonl,sha256=98mb5S81p6a6lgG4uP35IEIcP_cir0CfJ7BYx0rHMp0,522550
|
|
31
|
+
rnow/templates/rl-single/config.yml,sha256=K6kMCDzSsUc9yRvacJrdb7bZjMzUmhNX5j7DqBOhOw4,541
|
|
32
|
+
rnow/templates/rl-single/requirements.txt,sha256=yJceROMgmW4o1Vb4oOo7cMPK597rUw-GxcRkYDWnjrk,19
|
|
33
|
+
rnow/templates/rl-single/rewards.py,sha256=gk4ZYEF8RyH1zcMg_K1Fp23gmDq4JmppN9_vR8L3nUM,426
|
|
34
|
+
rnow/templates/rl-single/train.jsonl,sha256=hBq4VVIdEsWfG4GrwSW5AotbNrN7Z9bTDmbobwsLcHk,477718
|
|
35
|
+
rnow/templates/rl-tools/config.yml,sha256=NpZZPVGIV7OQHNaiKSFHSs3bcyduDtPKaRzhFekOZXE,574
|
|
36
|
+
rnow/templates/rl-tools/env.py,sha256=mPzuYS6cNia9Q-sxn3h8a_uyYsXAHOrxk9oYfeIg4gA,1151
|
|
37
|
+
rnow/templates/rl-tools/requirements.txt,sha256=WonZpO2bsLj-HWyU9B5BzQ0qagcgF2zNcnjRvmOFrik,57
|
|
38
|
+
rnow/templates/rl-tools/rewards.py,sha256=5z6dI2AO9WeSIIVfhx9LOBMgVGR23rP8Cis4Xyndq4M,776
|
|
39
|
+
rnow/templates/rl-tools/train.jsonl,sha256=YjfEErhtfuJko3ZvzHFsNXTEmxNnSNMMTWZHgwg4d9g,225204
|
|
40
|
+
rnow/templates/sft/config.yml,sha256=2o65W43zSEOp63Y0t_sOSeyBBI_5UpLUj3LrH_FHhRw,393
|
|
41
|
+
rnow/templates/sft/train.jsonl,sha256=e3IlKIHj7x2neTTnpOnbc5hNsdT8gwEBBSalKwWHErU,508674
|
|
42
|
+
rnow/templates/tutorial-reward/config.yml,sha256=K6kMCDzSsUc9yRvacJrdb7bZjMzUmhNX5j7DqBOhOw4,541
|
|
43
|
+
rnow/templates/tutorial-reward/requirements.txt,sha256=yJceROMgmW4o1Vb4oOo7cMPK597rUw-GxcRkYDWnjrk,19
|
|
44
|
+
rnow/templates/tutorial-reward/rewards.py,sha256=ue6tzd7wDjogKwE28inQZjwjfK_F0Y_mYZvVP1PnzVY,440
|
|
45
|
+
rnow/templates/tutorial-reward/train.jsonl,sha256=hBq4VVIdEsWfG4GrwSW5AotbNrN7Z9bTDmbobwsLcHk,477718
|
|
46
|
+
rnow/templates/tutorial-tool/config.yml,sha256=vcxEImXofTveXl4jKPL2t-2oXkj6rGN1luAjucjH-0Y,573
|
|
47
|
+
rnow/templates/tutorial-tool/env.py,sha256=2ziGzkDLOzrCGEcYPgk7-bQi80EL4-hiJLG0MMxNIS0,166
|
|
48
|
+
rnow/templates/tutorial-tool/requirements.txt,sha256=WonZpO2bsLj-HWyU9B5BzQ0qagcgF2zNcnjRvmOFrik,57
|
|
49
|
+
rnow/templates/tutorial-tool/rewards.py,sha256=jxik_6dZh3gTlMsmgbIYz7xQVn9EAqR_mXpWfd4rPe0,182
|
|
50
|
+
rnow/templates/tutorial-tool/train.jsonl,sha256=wUkObyXyR2k7nn89CCscE3eS-IOwBvn_ar-LGEw8LJE,1216463
|
|
51
|
+
rnow-0.2.4.dist-info/licenses/LICENSE,sha256=zp3v0kxFKoto-UBNj-yWfZv5LuLWI3QRLt3EFKrMkDw,1069
|
|
52
|
+
rnow-0.2.4.dist-info/METADATA,sha256=c2_y9CrIoDTRtrl3AR-bMnhP3IFro42Y0SM4inDi1hw,4096
|
|
53
|
+
rnow-0.2.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
54
|
+
rnow-0.2.4.dist-info/entry_points.txt,sha256=UDq6s3IvmtJPGQskgZyvoFmSI6sUExM9VS0sGep4Eik,44
|
|
55
|
+
rnow-0.2.4.dist-info/top_level.txt,sha256=7UzwktxX6U3A5mExEBPKZB2TlxDAYEBywZeJ4uwNPyY,5
|
|
56
|
+
rnow-0.2.4.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 ReinforceNow
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
rnow
|