Skip to content

Commit 121b6d9

Browse files
authored
feat: add entry for rdagent. (#187)
* Add entries * update entry for rdagent * lint * fix typo
1 parent 18c0501 commit 121b6d9

File tree

12 files changed

+56
-14
lines changed

12 files changed

+56
-14
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,4 +202,4 @@ Making contributions is not a hard thing. Solving an issue(maybe just answering
202202
<a href="https://github.com/microsoft/RD-Agent/graphs/contributors"><img src="https://contrib.rocks/image?repo=microsoft/RD-Agent&max=240&columns=18" /></a>
203203

204204
# Disclaimer
205-
**The RD-agent is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. The RD-agent is aimed to facilitate research and development process in the financial industry and not ready-to-use for any financial investment or advice. Users shall independently assess and test the risks of the RD-agent in a specific use scenario, ensure the responsible use of AI technology, including but not limited to developing and integrating risk mitigation measures, and comply with all applicable laws and regulations in all applicable jurisdictions. The RD-agent does not provide financial opinions or reflect the opinions of Microsoft, nor is it designed to replace the role of qualified financial professionals in formulating, assessing, and approving finance products. The inputs and outputs of the RD-agent belong to the users and users shall assume all liability under any theory of liability, whether in contract, torts, regulatory, negligence, products liability, or otherwise, associated with use of the RD-agent and any inputs and outputs thereof.**
205+
The RD-agent is provided “as is”, without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and noninfringement. The RD-agent is aimed to facilitate research and development process in the financial industry and not ready-to-use for any financial investment or advice. Users shall independently assess and test the risks of the RD-agent in a specific use scenario, ensure the responsible use of AI technology, including but not limited to developing and integrating risk mitigation measures, and comply with all applicable laws and regulations in all applicable jurisdictions. The RD-agent does not provide financial opinions or reflect the opinions of Microsoft, nor is it designed to replace the role of qualified financial professionals in formulating, assessing, and approving finance products. The inputs and outputs of the RD-agent belong to the users and users shall assume all liability under any theory of liability, whether in contract, torts, regulatory, negligence, products liability, or otherwise, associated with use of the RD-agent and any inputs and outputs thereof.

docs/scens/data_agent_fin.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ You can try our demo by running the following command:
121121
- 🚀 Run the Application
122122
.. code-block:: sh
123123
124-
python rdagent/app/qlib_rd_loop/factor_w_sc.py
124+
rdagent fin_factor
125125
126126
127127
🛠️ Usage of modules

docs/scens/data_copilot_fin.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ You can try our demo by running the following command:
121121
- 🚀 Run the Application
122122
.. code-block:: sh
123123
124-
python rdagent/app/qlib_rd_loop/factor_from_report_w_sc.py
124+
rdagent fin_factor_report
125125
126126
127127

docs/scens/model_agent_fin.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ You can try our demo by running the following command:
112112
- 🚀 Run the Application
113113
.. code-block:: sh
114114
115-
python rdagent/app/qlib_rd_loop/model_w_sc.py
115+
rdagent fin_model
116116
117117
🛠️ Usage of modules
118118
~~~~~~~~~~~~~~~~~~~~~

pyproject.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ name = "rdagent"
3131
readme = "README.md"
3232
requires-python = ">=3.10"
3333

34+
[project.scripts]
35+
rdagent = "rdagent.app.cli:app"
36+
3437
[project.urls]
3538
homepage = "https://github.com/microsoft/RD-Agent/"
3639
issue = "https://github.com/microsoft/RD-Agent/issues"

rdagent/app/cli.py

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
"""
2+
CLI entrance for all rdagent application.
3+
4+
This will
5+
- make rdagent a nice entry and
6+
- autoamtically load dotenv
7+
"""
8+
import fire
9+
from dotenv import load_dotenv
10+
11+
from rdagent.app.data_mining.model import main as med_model
12+
from rdagent.app.general_model.general_model import (
13+
extract_models_and_implement as general_model,
14+
)
15+
from rdagent.app.qlib_rd_loop.factor import main as fin_factor
16+
from rdagent.app.qlib_rd_loop.factor_from_report import main as fin_factor_report
17+
from rdagent.app.qlib_rd_loop.model import main as fin_model
18+
19+
load_dotenv()
20+
21+
22+
def app():
23+
fire.Fire(
24+
{
25+
"fin_factor": fin_factor,
26+
"fin_factor_report": fin_factor_report,
27+
"fin_model": fin_model,
28+
"med_model": med_model,
29+
"general_model": general_model,
30+
}
31+
)

rdagent/app/data_mining/model.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ class ModelRDLoop(RDLoop):
1111

1212
def main(path=None, step_n=None):
1313
"""
14+
Auto R&D Evolving loop for models in a medical scenario.
15+
1416
You can continue running session by
1517
1618
.. code-block:: python

rdagent/app/general_model/general_model.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
# %%
21
from dotenv import load_dotenv
32

43
from rdagent.scenarios.general_model.scenario import GeneralModelScenario
@@ -17,11 +16,11 @@
1716
from rdagent.scenarios.qlib.developer.model_coder import QlibModelCoSTEER
1817

1918

20-
def extract_models_and_implement(
21-
report_file_path: str,
22-
) -> None:
19+
def extract_models_and_implement(report_file_path: str) -> None:
2320
"""
24-
Extracts models from a given PDF report file and implements the necessary operations.
21+
This is a research copilot to automatically implement models from a report file or paper.
22+
23+
It extracts models from a given PDF report file and implements the necessary operations.
2524
2625
Parameters:
2726
report_file_path (str): The path to the report file. The file must be a PDF file.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,13 @@ def running(self, prev_out: dict[str, Any]):
2727

2828
def main(path=None, step_n=None):
2929
"""
30+
Auto R&D Evolving loop for fintech factors.
31+
3032
You can continue running session by
3133
3234
.. code-block:: python
3335
34-
dotenv run -- python rdagent/app/qlib_rd_loop/factor_w_sc.py $LOG_PATH/__session__/1/0_propose --step_n 1 # `step_n` is a optional paramter
36+
dotenv run -- python rdagent/app/qlib_rd_loop/factor.py $LOG_PATH/__session__/1/0_propose --step_n 1 # `step_n` is a optional paramter
3537
3638
"""
3739
if path is None:

rdagent/app/qlib_rd_loop/factor_from_report_w_sc.py renamed to rdagent/app/qlib_rd_loop/factor_from_report.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from jinja2 import Environment, StrictUndefined
77

88
from rdagent.app.qlib_rd_loop.conf import FACTOR_FROM_REPORT_PROP_SETTING
9-
from rdagent.app.qlib_rd_loop.factor_w_sc import FactorRDLoop
9+
from rdagent.app.qlib_rd_loop.factor import FactorRDLoop
1010
from rdagent.components.document_reader.document_reader import (
1111
extract_first_page_screenshot_from_pdf,
1212
load_and_process_pdfs_by_langchain,
@@ -142,11 +142,13 @@ def exp_gen(self, prev_out: dict[str, Any]):
142142

143143
def main(path=None, step_n=None):
144144
"""
145+
Auto R&D Evolving loop for fintech factors (the factors are extracted from finance report).
146+
145147
You can continue running session by
146148
147149
.. code-block:: python
148150
149-
dotenv run -- python rdagent/app/qlib_rd_loop/factor_from_report_w_sc.py $LOG_PATH/__session__/1/0_propose --step_n 1 # `step_n` is a optional parameter
151+
dotenv run -- python rdagent/app/qlib_rd_loop/factor_from_report.py $LOG_PATH/__session__/1/0_propose --step_n 1 # `step_n` is a optional parameter
150152
151153
"""
152154
if path is None:

0 commit comments

Comments
 (0)