rdagent 0.0.1__tar.gz

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.
Files changed (204) hide show
  1. rdagent-0.0.1/.bumpversion.cfg +6 -0
  2. rdagent-0.0.1/.env.example +30 -0
  3. rdagent-0.0.1/.github/FUNDING.yml +2 -0
  4. rdagent-0.0.1/.github/PULL_REQUEST_TEMPLATE.md +36 -0
  5. rdagent-0.0.1/.github/dependabot.yml +19 -0
  6. rdagent-0.0.1/.github/workflows/ci.yml +70 -0
  7. rdagent-0.0.1/.github/workflows/pr.yml +22 -0
  8. rdagent-0.0.1/.github/workflows/readthedocs-preview.yml +17 -0
  9. rdagent-0.0.1/.github/workflows/release.yml +50 -0
  10. rdagent-0.0.1/.gitignore +172 -0
  11. rdagent-0.0.1/CHANGELOG.md +33 -0
  12. rdagent-0.0.1/CODE_OF_CONDUCT.md +9 -0
  13. rdagent-0.0.1/LICENSE +21 -0
  14. rdagent-0.0.1/Makefile +209 -0
  15. rdagent-0.0.1/PKG-INFO +293 -0
  16. rdagent-0.0.1/README.md +205 -0
  17. rdagent-0.0.1/SECURITY.md +41 -0
  18. rdagent-0.0.1/SUPPORT.md +25 -0
  19. rdagent-0.0.1/TODO.md +10 -0
  20. rdagent-0.0.1/constraints/3.10.txt +266 -0
  21. rdagent-0.0.1/constraints/3.11.txt +263 -0
  22. rdagent-0.0.1/docs/Makefile +20 -0
  23. rdagent-0.0.1/docs/_static/benchmark.png +0 -0
  24. rdagent-0.0.1/docs/_static/flow.png +0 -0
  25. rdagent-0.0.1/docs/_static/overview.png +0 -0
  26. rdagent-0.0.1/docs/_static/scen.jpg +0 -0
  27. rdagent-0.0.1/docs/api_reference.rst +15 -0
  28. rdagent-0.0.1/docs/changelog.md +4 -0
  29. rdagent-0.0.1/docs/conf.py +62 -0
  30. rdagent-0.0.1/docs/development.rst +76 -0
  31. rdagent-0.0.1/docs/index.rst +29 -0
  32. rdagent-0.0.1/docs/installation_and_configuration.rst +145 -0
  33. rdagent-0.0.1/docs/introduction.rst +18 -0
  34. rdagent-0.0.1/docs/make.bat +35 -0
  35. rdagent-0.0.1/docs/policy.rst +24 -0
  36. rdagent-0.0.1/docs/project_framework_introduction.rst +41 -0
  37. rdagent-0.0.1/docs/requirements.txt +4 -0
  38. rdagent-0.0.1/docs/research/benchmark.rst +118 -0
  39. rdagent-0.0.1/docs/research/catalog.rst +34 -0
  40. rdagent-0.0.1/docs/research/dev.rst +25 -0
  41. rdagent-0.0.1/docs/scens/catalog.rst +46 -0
  42. rdagent-0.0.1/docs/scens/data_agent_fin.rst +164 -0
  43. rdagent-0.0.1/docs/scens/data_copilot_fin.rst +164 -0
  44. rdagent-0.0.1/docs/scens/model_agent_fin.rst +119 -0
  45. rdagent-0.0.1/docs/scens/model_agent_med.rst +5 -0
  46. rdagent-0.0.1/docs/scens/model_copilot_general.rst +123 -0
  47. rdagent-0.0.1/docs/ui.rst +45 -0
  48. rdagent-0.0.1/pyproject.toml +116 -0
  49. rdagent-0.0.1/rdagent/app/CI/README.md +38 -0
  50. rdagent-0.0.1/rdagent/app/CI/ci.ipynb +24 -0
  51. rdagent-0.0.1/rdagent/app/CI/prompts.yaml +117 -0
  52. rdagent-0.0.1/rdagent/app/CI/run.py +817 -0
  53. rdagent-0.0.1/rdagent/app/benchmark/factor/analysis.py +183 -0
  54. rdagent-0.0.1/rdagent/app/benchmark/factor/eval.py +41 -0
  55. rdagent-0.0.1/rdagent/app/benchmark/model/README.md +44 -0
  56. rdagent-0.0.1/rdagent/app/benchmark/model/eval.py +41 -0
  57. rdagent-0.0.1/rdagent/app/data_mining/conf.py +28 -0
  58. rdagent-0.0.1/rdagent/app/data_mining/model.py +29 -0
  59. rdagent-0.0.1/rdagent/app/general_model/general_model.py +39 -0
  60. rdagent-0.0.1/rdagent/app/qlib_rd_loop/RDAgent.py +112 -0
  61. rdagent-0.0.1/rdagent/app/qlib_rd_loop/conf.py +47 -0
  62. rdagent-0.0.1/rdagent/app/qlib_rd_loop/factor_from_report_w_sc.py +160 -0
  63. rdagent-0.0.1/rdagent/app/qlib_rd_loop/factor_w_sc.py +45 -0
  64. rdagent-0.0.1/rdagent/app/qlib_rd_loop/model_w_sc.py +33 -0
  65. rdagent-0.0.1/rdagent/app/qlib_rd_loop/prompts.yaml +19 -0
  66. rdagent-0.0.1/rdagent/components/benchmark/conf.py +41 -0
  67. rdagent-0.0.1/rdagent/components/benchmark/eval_method.py +198 -0
  68. rdagent-0.0.1/rdagent/components/benchmark/example.json +36 -0
  69. rdagent-0.0.1/rdagent/components/coder/factor_coder/CoSTEER/__init__.py +113 -0
  70. rdagent-0.0.1/rdagent/components/coder/factor_coder/CoSTEER/evaluators.py +688 -0
  71. rdagent-0.0.1/rdagent/components/coder/factor_coder/CoSTEER/evolvable_subjects.py +30 -0
  72. rdagent-0.0.1/rdagent/components/coder/factor_coder/CoSTEER/evolving_agent.py +19 -0
  73. rdagent-0.0.1/rdagent/components/coder/factor_coder/CoSTEER/evolving_strategy.py +322 -0
  74. rdagent-0.0.1/rdagent/components/coder/factor_coder/CoSTEER/knowledge_management.py +915 -0
  75. rdagent-0.0.1/rdagent/components/coder/factor_coder/CoSTEER/scheduler.py +88 -0
  76. rdagent-0.0.1/rdagent/components/coder/factor_coder/config.py +52 -0
  77. rdagent-0.0.1/rdagent/components/coder/factor_coder/factor.py +220 -0
  78. rdagent-0.0.1/rdagent/components/coder/factor_coder/prompts.yaml +231 -0
  79. rdagent-0.0.1/rdagent/components/coder/model_coder/CoSTEER/__init__.py +94 -0
  80. rdagent-0.0.1/rdagent/components/coder/model_coder/CoSTEER/evaluators.py +330 -0
  81. rdagent-0.0.1/rdagent/components/coder/model_coder/CoSTEER/evolvable_subjects.py +29 -0
  82. rdagent-0.0.1/rdagent/components/coder/model_coder/CoSTEER/evolving_agent.py +19 -0
  83. rdagent-0.0.1/rdagent/components/coder/model_coder/CoSTEER/evolving_strategy.py +135 -0
  84. rdagent-0.0.1/rdagent/components/coder/model_coder/CoSTEER/knowledge_management.py +169 -0
  85. rdagent-0.0.1/rdagent/components/coder/model_coder/benchmark/eval.py +71 -0
  86. rdagent-0.0.1/rdagent/components/coder/model_coder/benchmark/gt_code/A-DGN.py +134 -0
  87. rdagent-0.0.1/rdagent/components/coder/model_coder/benchmark/gt_code/dirgnn.py +89 -0
  88. rdagent-0.0.1/rdagent/components/coder/model_coder/benchmark/gt_code/gpsconv.py +198 -0
  89. rdagent-0.0.1/rdagent/components/coder/model_coder/benchmark/gt_code/linkx.py +187 -0
  90. rdagent-0.0.1/rdagent/components/coder/model_coder/benchmark/gt_code/pmlp.py +118 -0
  91. rdagent-0.0.1/rdagent/components/coder/model_coder/benchmark/gt_code/visnet.py +1191 -0
  92. rdagent-0.0.1/rdagent/components/coder/model_coder/benchmark/model_dict.json +80 -0
  93. rdagent-0.0.1/rdagent/components/coder/model_coder/conf.py +29 -0
  94. rdagent-0.0.1/rdagent/components/coder/model_coder/gt_code.py +136 -0
  95. rdagent-0.0.1/rdagent/components/coder/model_coder/main.py +92 -0
  96. rdagent-0.0.1/rdagent/components/coder/model_coder/model.py +147 -0
  97. rdagent-0.0.1/rdagent/components/coder/model_coder/one_shot/__init__.py +41 -0
  98. rdagent-0.0.1/rdagent/components/coder/model_coder/one_shot/prompt.yaml +27 -0
  99. rdagent-0.0.1/rdagent/components/coder/model_coder/prompts.yaml +156 -0
  100. rdagent-0.0.1/rdagent/components/coder/model_coder/task_loader.py +137 -0
  101. rdagent-0.0.1/rdagent/components/document_reader/document_reader.py +110 -0
  102. rdagent-0.0.1/rdagent/components/knowledge_management/graph.py +505 -0
  103. rdagent-0.0.1/rdagent/components/knowledge_management/vector_base.py +205 -0
  104. rdagent-0.0.1/rdagent/components/loader/experiment_loader.py +10 -0
  105. rdagent-0.0.1/rdagent/components/loader/task_loader.py +94 -0
  106. rdagent-0.0.1/rdagent/components/proposal/factor_proposal.py +101 -0
  107. rdagent-0.0.1/rdagent/components/proposal/model_proposal.py +104 -0
  108. rdagent-0.0.1/rdagent/components/proposal/prompts.yaml +43 -0
  109. rdagent-0.0.1/rdagent/components/runner/__init__.py +33 -0
  110. rdagent-0.0.1/rdagent/components/runner/conf.py +22 -0
  111. rdagent-0.0.1/rdagent/components/workflow/conf.py +23 -0
  112. rdagent-0.0.1/rdagent/components/workflow/rd_loop.py +72 -0
  113. rdagent-0.0.1/rdagent/core/conf.py +109 -0
  114. rdagent-0.0.1/rdagent/core/developer.py +26 -0
  115. rdagent-0.0.1/rdagent/core/evaluation.py +26 -0
  116. rdagent-0.0.1/rdagent/core/evolving_agent.py +100 -0
  117. rdagent-0.0.1/rdagent/core/evolving_framework.py +105 -0
  118. rdagent-0.0.1/rdagent/core/exception.py +44 -0
  119. rdagent-0.0.1/rdagent/core/experiment.py +184 -0
  120. rdagent-0.0.1/rdagent/core/prompts.py +20 -0
  121. rdagent-0.0.1/rdagent/core/proposal.py +156 -0
  122. rdagent-0.0.1/rdagent/core/scenario.py +42 -0
  123. rdagent-0.0.1/rdagent/core/utils.py +105 -0
  124. rdagent-0.0.1/rdagent/log/__init__.py +4 -0
  125. rdagent-0.0.1/rdagent/log/base.py +98 -0
  126. rdagent-0.0.1/rdagent/log/logger.py +166 -0
  127. rdagent-0.0.1/rdagent/log/storage.py +148 -0
  128. rdagent-0.0.1/rdagent/log/ui/__init__.py +7 -0
  129. rdagent-0.0.1/rdagent/log/ui/app.py +698 -0
  130. rdagent-0.0.1/rdagent/log/ui/qlib_report_figure.py +445 -0
  131. rdagent-0.0.1/rdagent/log/ui/st_fixed_container.py +126 -0
  132. rdagent-0.0.1/rdagent/log/ui/web.py +641 -0
  133. rdagent-0.0.1/rdagent/log/utils.py +77 -0
  134. rdagent-0.0.1/rdagent/oai/llm_utils.py +750 -0
  135. rdagent-0.0.1/rdagent/scenarios/data_mining/developer/feedback.py +71 -0
  136. rdagent-0.0.1/rdagent/scenarios/data_mining/developer/model_coder.py +3 -0
  137. rdagent-0.0.1/rdagent/scenarios/data_mining/developer/model_runner.py +38 -0
  138. rdagent-0.0.1/rdagent/scenarios/data_mining/docker/Dockerfile +25 -0
  139. rdagent-0.0.1/rdagent/scenarios/data_mining/experiment/model_experiment.py +74 -0
  140. rdagent-0.0.1/rdagent/scenarios/data_mining/experiment/model_template/README.md +3 -0
  141. rdagent-0.0.1/rdagent/scenarios/data_mining/experiment/model_template/train.py +116 -0
  142. rdagent-0.0.1/rdagent/scenarios/data_mining/experiment/prompts.yaml +54 -0
  143. rdagent-0.0.1/rdagent/scenarios/data_mining/experiment/workspace.py +31 -0
  144. rdagent-0.0.1/rdagent/scenarios/data_mining/proposal/model_proposal.py +105 -0
  145. rdagent-0.0.1/rdagent/scenarios/general_model/prompts.yaml +89 -0
  146. rdagent-0.0.1/rdagent/scenarios/general_model/scenario.py +52 -0
  147. rdagent-0.0.1/rdagent/scenarios/general_model/test_doc1.pdf +0 -0
  148. rdagent-0.0.1/rdagent/scenarios/general_model/test_doc2.pdf +0 -0
  149. rdagent-0.0.1/rdagent/scenarios/general_model/test_doc3.pdf +0 -0
  150. rdagent-0.0.1/rdagent/scenarios/general_model/test_doc4.pdf +0 -0
  151. rdagent-0.0.1/rdagent/scenarios/general_model/test_doc5.pdf +0 -0
  152. rdagent-0.0.1/rdagent/scenarios/qlib/developer/factor_coder.py +4 -0
  153. rdagent-0.0.1/rdagent/scenarios/qlib/developer/factor_runner.py +160 -0
  154. rdagent-0.0.1/rdagent/scenarios/qlib/developer/feedback.py +171 -0
  155. rdagent-0.0.1/rdagent/scenarios/qlib/developer/model_coder.py +3 -0
  156. rdagent-0.0.1/rdagent/scenarios/qlib/developer/model_runner.py +55 -0
  157. rdagent-0.0.1/rdagent/scenarios/qlib/docker/Dockerfile +23 -0
  158. rdagent-0.0.1/rdagent/scenarios/qlib/experiment/factor_data_template/README.md +24 -0
  159. rdagent-0.0.1/rdagent/scenarios/qlib/experiment/factor_data_template/generate.py +27 -0
  160. rdagent-0.0.1/rdagent/scenarios/qlib/experiment/factor_experiment.py +73 -0
  161. rdagent-0.0.1/rdagent/scenarios/qlib/experiment/factor_from_report_experiment.py +24 -0
  162. rdagent-0.0.1/rdagent/scenarios/qlib/experiment/factor_template/conf.yaml +73 -0
  163. rdagent-0.0.1/rdagent/scenarios/qlib/experiment/factor_template/conf_combined.yaml +92 -0
  164. rdagent-0.0.1/rdagent/scenarios/qlib/experiment/factor_template/read_exp_res.py +48 -0
  165. rdagent-0.0.1/rdagent/scenarios/qlib/experiment/model_experiment.py +69 -0
  166. rdagent-0.0.1/rdagent/scenarios/qlib/experiment/model_template/README.md +3 -0
  167. rdagent-0.0.1/rdagent/scenarios/qlib/experiment/model_template/conf.yaml +109 -0
  168. rdagent-0.0.1/rdagent/scenarios/qlib/experiment/model_template/read_exp_res.py +48 -0
  169. rdagent-0.0.1/rdagent/scenarios/qlib/experiment/prompts.yaml +198 -0
  170. rdagent-0.0.1/rdagent/scenarios/qlib/experiment/utils.py +98 -0
  171. rdagent-0.0.1/rdagent/scenarios/qlib/experiment/workspace.py +42 -0
  172. rdagent-0.0.1/rdagent/scenarios/qlib/factor_experiment_loader/json_loader.py +65 -0
  173. rdagent-0.0.1/rdagent/scenarios/qlib/factor_experiment_loader/pdf_loader.py +533 -0
  174. rdagent-0.0.1/rdagent/scenarios/qlib/factor_experiment_loader/prompts.yaml +187 -0
  175. rdagent-0.0.1/rdagent/scenarios/qlib/prompts.yaml +266 -0
  176. rdagent-0.0.1/rdagent/scenarios/qlib/proposal/factor_proposal.py +107 -0
  177. rdagent-0.0.1/rdagent/scenarios/qlib/proposal/model_proposal.py +94 -0
  178. rdagent-0.0.1/rdagent/utils/__init__.py +55 -0
  179. rdagent-0.0.1/rdagent/utils/agent/__init__.py +0 -0
  180. rdagent-0.0.1/rdagent/utils/agent/ret.py +33 -0
  181. rdagent-0.0.1/rdagent/utils/agent/tpl.py +63 -0
  182. rdagent-0.0.1/rdagent/utils/agent/tpl.yaml +6 -0
  183. rdagent-0.0.1/rdagent/utils/env.py +286 -0
  184. rdagent-0.0.1/rdagent/utils/workflow.py +150 -0
  185. rdagent-0.0.1/rdagent.egg-info/PKG-INFO +293 -0
  186. rdagent-0.0.1/rdagent.egg-info/SOURCES.txt +202 -0
  187. rdagent-0.0.1/rdagent.egg-info/dependency_links.txt +1 -0
  188. rdagent-0.0.1/rdagent.egg-info/requires.txt +75 -0
  189. rdagent-0.0.1/rdagent.egg-info/top_level.txt +1 -0
  190. rdagent-0.0.1/requirements/docs.txt +12 -0
  191. rdagent-0.0.1/requirements/lint.txt +9 -0
  192. rdagent-0.0.1/requirements/package.txt +5 -0
  193. rdagent-0.0.1/requirements/test.txt +3 -0
  194. rdagent-0.0.1/requirements.txt +67 -0
  195. rdagent-0.0.1/setup.cfg +4 -0
  196. rdagent-0.0.1/test/oai/test_completion.py +50 -0
  197. rdagent-0.0.1/test/oai/test_embedding_and_similarity.py +25 -0
  198. rdagent-0.0.1/test/utils/README.md +116 -0
  199. rdagent-0.0.1/test/utils/env_tpl/README.md +4 -0
  200. rdagent-0.0.1/test/utils/env_tpl/conf.yaml +71 -0
  201. rdagent-0.0.1/test/utils/env_tpl/read_exp.py +55 -0
  202. rdagent-0.0.1/test/utils/test_agent_infra.py +29 -0
  203. rdagent-0.0.1/test/utils/test_env.py +59 -0
  204. rdagent-0.0.1/test/utils/test_misc.py +71 -0
@@ -0,0 +1,6 @@
1
+ [bumpversion]
2
+ current_version = 0.0.0
3
+ commit = True
4
+ tag = True
5
+
6
+ [bumpversion:file:pyproject.toml]
@@ -0,0 +1,30 @@
1
+ """
2
+ This file is a template for the .env file.
3
+
4
+ Please copy this file to .env and fill in the values.
5
+
6
+ For more information about configuration options, please refer to the documentation
7
+
8
+ """
9
+
10
+ # Global configs:
11
+ USE_AZURE=False
12
+ USE_AZURE_TOKEN_PROVIDER=False
13
+ MAX_RETRY=10
14
+ RETRY_WAIT_SECONDS=20
15
+
16
+ # LLM API Setting:
17
+ OPENAI_API_KEY=<your_api_key>
18
+ CHAT_MODEL=gpt-4-turbo
19
+ CHAT_MAX_TOKENS=3000
20
+ CHAT_TEMPERATURE=0.7
21
+ # CHAT_AZURE_API_BASE=<for_Azure_user>
22
+ # CHAT_AZURE_API_VERSION=<for_Azure_user>
23
+
24
+ EMBEDDING_MODEL=text-embedding-3-small
25
+ # EMBEDDING_AZURE_API_BASE=<for_Azure_user>
26
+ # EMBEDDING_AZURE_API_VERSION=<for_Azure_user>
27
+
28
+ # Cache Setting (Optional):
29
+
30
+ # Senario Configs:
@@ -0,0 +1,2 @@
1
+ github:
2
+ - MIIC-finance
@@ -0,0 +1,36 @@
1
+ <!--- Thank you for submitting a Pull Request! In order to make our work smoother. -->
2
+ <!--- please make sure your Pull Request meets the following requirements: -->
3
+ <!--- 1. Provide a general summary of your changes in the Title above; -->
4
+ <!--- 2. Add appropriate prefixes to titles, such as `build:`, `chore:`, `ci:`, `docs:`, `feat:`, `fix:`, `perf:`, `refactor:`, `revert:`, `style:`, `test:`(Ref: https://www.conventionalcommits.org/). -->
5
+ <!--- Category: -->
6
+ <!--- Patch Updates: `fix:` -->
7
+ <!--- Example: fix(auth): correct login validation issue -->
8
+ <!--- minor update (introduces new functionality): `feat` -->
9
+ <!--- Example: feature(parser): add ability to parse arrays -->
10
+ <!--- major update(destructive update): Include BREAKING CHANGE in the commit message footer, or add `! ` in the commit footer to indicate that there is a destructive update. -->
11
+ <!--- Example: feat(auth)! : remove support for old authentication method -->
12
+ <!--- Other updates: `build:`, `chore:`, `ci:`, `docs:`, `perf:`, `refactor:`, `revert:`, `style:`, `test:`. -->
13
+
14
+ ## Description
15
+ <!--- Describe your changes in detail -->
16
+
17
+ ## Motivation and Context
18
+ <!--- Are there any related issues? If so, please put the link here. -->
19
+ <!--- Why is this change required? What problem does it solve? -->
20
+
21
+ ## How Has This Been Tested?
22
+ <!--- Put an `x` in all the boxes that apply: --->
23
+ - [ ] Pass the test by running: `pytest qlib/tests/test_all_pipeline.py` under upper directory of `qlib`.
24
+ - [ ] If you are adding a new feature, test on your own test scripts.
25
+
26
+ <!--- **ATTENTION**: If you are adding a new feature, please make sure your codes are **correctly tested**. If our test scripts do not cover your cases, please provide your own test scripts under the `tests` folder and test them. More information about test scripts can be found [here](https://docs.python.org/3/library/unittest.html#basic-example), or you could refer to those we provide under the `tests` folder. -->
27
+
28
+ ## Screenshots of Test Results (if appropriate):
29
+ 1. Pipeline test:
30
+ 2. Your own tests:
31
+
32
+ ## Types of changes
33
+ <!--- What types of changes does your code introduce? Put an `x` in all the boxes that apply: -->
34
+ - [ ] Fix bugs
35
+ - [ ] Add new feature
36
+ - [ ] Update documentation
@@ -0,0 +1,19 @@
1
+ updates:
2
+ - commit-message:
3
+ prefix: build(actions)
4
+ directory: /
5
+ package-ecosystem: github-actions
6
+ schedule:
7
+ interval: weekly
8
+ - commit-message:
9
+ prefix: build(requirements)
10
+ directory: /
11
+ groups:
12
+ dev:
13
+ dependency-type: development
14
+ prod:
15
+ dependency-type: production
16
+ package-ecosystem: pip
17
+ schedule:
18
+ interval: weekly
19
+ version: 2
@@ -0,0 +1,70 @@
1
+ concurrency:
2
+ cancel-in-progress: true
3
+ group: ${{ github.workflow }}-${{ github.ref }}
4
+ jobs:
5
+ ci:
6
+ if: ${{ !cancelled() && ! failure() }}
7
+ needs: dependabot
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - name: checkout
11
+ uses: actions/checkout@v4
12
+ with:
13
+ fetch-depth: 0
14
+ submodules: recursive
15
+ - name: Set up Python ${{ matrix.python-version }}
16
+ uses: actions/setup-python@v5
17
+ with:
18
+ cache: pip
19
+ python-version: ${{ matrix.python-version }}
20
+ - run: env | sort
21
+ - run: make dev
22
+ - name: lint test docs and build
23
+ run: make lint docs-gen # test docs build
24
+ strategy:
25
+ matrix:
26
+ python-version:
27
+ - '3.10'
28
+ - '3.11'
29
+ dependabot:
30
+ if: ${{ github.actor == 'dependabot[bot]' && startsWith(github.head_ref, 'dependabot/pip/') }}
31
+ permissions:
32
+ contents: write
33
+ runs-on: ubuntu-latest
34
+ steps:
35
+ - uses: actions/checkout@v4
36
+ with:
37
+ fetch-depth: 0
38
+ ref: ${{ github.head_ref }}
39
+ - name: Set up Git
40
+ run: |
41
+ git config --global user.name github-actions
42
+ git config --global user.email github-actions@github.com
43
+ - name: Set up Python with multiple versions.
44
+ uses: actions/setup-python@v5
45
+ with:
46
+ cache: pip
47
+ python-version: |
48
+ 3.10
49
+ 3.11
50
+ - name: Install pipenv using pipx
51
+ run: pipx install pipenv
52
+ - name: Generate constraints for all supported Python versions
53
+ run: |
54
+ CI= PYTHON_VERSION=3.10 make constraints
55
+ CI= PYTHON_VERSION=3.11 make constraints
56
+ - name: Push changes if applicable
57
+ run: |
58
+ if [[ -n `git status --porcelain` ]]; then
59
+ git commit -a -m "build: Update constraints for dependabot."
60
+ git push
61
+ fi
62
+ name: CI
63
+ on:
64
+ pull_request:
65
+ types:
66
+ - opened
67
+ - synchronize
68
+ push:
69
+ branches:
70
+ - main
@@ -0,0 +1,22 @@
1
+ concurrency:
2
+ cancel-in-progress: true
3
+ group: ${{ github.workflow }}-${{ github.ref }}
4
+ jobs:
5
+ lint-title:
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - name: Check PR Title for Conventional Commit Format
9
+ run: |
10
+ if ! echo "${{ github.event.pull_request.title }}" | grep -Pq '^(build|chore|ci|docs|feat|fix|perf|refactor|revert|style|test|Release-As)(\(\w+\))?!?:\s.*'; then
11
+ echo 'The title does not conform to the Conventional Commit.'
12
+ echo 'Please refer to "https://www.conventionalcommits.org/"'
13
+ exit 1
14
+ fi
15
+ name: Lint pull request title
16
+ on:
17
+ pull_request:
18
+ types:
19
+ - opened
20
+ - synchronize
21
+ - reopened
22
+ - edited
@@ -0,0 +1,17 @@
1
+ concurrency:
2
+ cancel-in-progress: true
3
+ group: ${{ github.workflow }}-${{ github.ref }}
4
+ jobs:
5
+ documentation-links:
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - uses: readthedocs/actions/preview@v1
9
+ with:
10
+ project-slug: RDAgent
11
+ name: Read the Docs Pull Request Preview
12
+ on:
13
+ pull_request_target:
14
+ types:
15
+ - opened
16
+ permissions:
17
+ pull-requests: write
@@ -0,0 +1,50 @@
1
+ name: Release
2
+ on:
3
+ push:
4
+ branches:
5
+ - main
6
+ permissions:
7
+ contents: read
8
+ jobs:
9
+ release_and_publish:
10
+ permissions:
11
+ contents: write
12
+ pull-requests: read
13
+ runs-on: ubuntu-latest
14
+ steps:
15
+ - name: Release please
16
+ id: release_please
17
+ uses: googleapis/release-please-action@v4
18
+ with:
19
+ # The current PAT (personal access token) was created on 2024-08-05,
20
+ # since the maximum validity of PAT is 1 year, you need to change the PAT before 2025-08-05.
21
+ token: ${{ secrets.PAT }}
22
+ release-type: simple
23
+ - uses: actions/checkout@v4
24
+ if: ${{ steps.release_please.outputs.release_created }}
25
+ with:
26
+ fetch-depth: 0
27
+ - name: Set up Python
28
+ if: ${{ steps.release_please.outputs.release_created }}
29
+ uses: actions/setup-python@v5
30
+ with:
31
+ cache: pip
32
+ python-version: '3.10'
33
+ - name: Install dependencies
34
+ if: ${{ steps.release_please.outputs.release_created }}
35
+ run: |
36
+ python -m pip install --upgrade pip
37
+ pip install setuptools wheel twine # better-exceptions(optional for debug)
38
+ - run: env | sort
39
+ if: ${{ steps.release_please.outputs.release_created }}
40
+ - run: make dev
41
+ if: ${{ steps.release_please.outputs.release_created }}
42
+ - run: make build
43
+ if: ${{ steps.release_please.outputs.release_created }}
44
+ - name: upload
45
+ if: ${{ steps.release_please.outputs.release_created }}
46
+ env:
47
+ TWINE_USERNAME: __token__
48
+ TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
49
+ run: |
50
+ make upload
@@ -0,0 +1,172 @@
1
+ # Custom
2
+ *.swp
3
+ .DS_Store
4
+ Pipfile
5
+ public
6
+ release-notes.md
7
+
8
+ # Byte-compiled / optimized / DLL files
9
+ __pycache__/
10
+ *.py[cod]
11
+ *$py.class
12
+
13
+ # C extensions
14
+ *.so
15
+
16
+ # Distribution / packaging
17
+ .Python
18
+ build/
19
+ develop-eggs/
20
+ dist/
21
+ downloads/
22
+ eggs/
23
+ .eggs/
24
+ lib/
25
+ lib64/
26
+ parts/
27
+ sdist/
28
+ var/
29
+ wheels/
30
+ pip-wheel-metadata/
31
+ share/python-wheels/
32
+ *.egg-info/
33
+ .installed.cfg
34
+ *.egg
35
+ MANIFEST
36
+
37
+ # PyInstaller
38
+ # Usually these files are written by a python script from a template
39
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
40
+ *.manifest
41
+ *.spec
42
+
43
+ # Installer logs
44
+ pip-log.txt
45
+ pip-delete-this-directory.txt
46
+
47
+ # Unit test / coverage reports
48
+ htmlcov/
49
+ .tox/
50
+ .nox/
51
+ .coverage
52
+ .coverage.*
53
+ .cache
54
+ nosetests.xml
55
+ coverage.xml
56
+ *.cover
57
+ *.py,cover
58
+ .hypothesis/
59
+ .pytest_cache/
60
+
61
+ # Translations
62
+ *.mo
63
+ *.pot
64
+
65
+ # Django stuff:
66
+ *.log
67
+ /log/
68
+ local_settings.py
69
+ db.sqlite3
70
+ db.sqlite3-journal
71
+
72
+ # Flask stuff:
73
+ instance/
74
+ .webassets-cache
75
+
76
+ # Scrapy stuff:
77
+ .scrapy
78
+
79
+ # Sphinx documentation
80
+ docs/_build/
81
+
82
+ # PyBuilder
83
+ target/
84
+
85
+ # Jupyter Notebook
86
+ .ipynb_checkpoints
87
+
88
+ # IPython
89
+ profile_default/
90
+ ipython_config.py
91
+
92
+ # pyenv
93
+ .python-version
94
+
95
+ # pipenv
96
+ # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
97
+ # However, in case of collaboration, if having platform-specific dependencies or dependencies
98
+ # having no cross-platform support, pipenv may install dependencies that don't work, or not
99
+ # install all needed dependencies.
100
+ #Pipfile.lock
101
+
102
+ # PEP 582; used by e.g. github.com/David-OConnor/pyflow
103
+ __pypackages__/
104
+
105
+ # Celery stuff
106
+ celerybeat-schedule
107
+ celerybeat.pid
108
+
109
+ # SageMath parsed files
110
+ *.sage.py
111
+
112
+ # Environments
113
+ .env
114
+ .venv
115
+ ^env/
116
+ venv/
117
+ ENV/
118
+ env.bak/
119
+ venv.bak/
120
+
121
+ # Spyder project settings
122
+ .spyderproject
123
+ .spyproject
124
+
125
+ # Rope project settings
126
+ .ropeproject
127
+
128
+ # mkdocs documentation
129
+ /site
130
+
131
+ # mypy
132
+ .mypy_cache/
133
+ .dmypy.json
134
+ dmypy.json
135
+
136
+ # Pyre type checker
137
+ .pyre/
138
+
139
+ # all pkl files
140
+ *.pkl
141
+
142
+ # all h5 files
143
+ *.h5
144
+
145
+ # all vs-code files
146
+ .vscode/
147
+
148
+ # reports
149
+ reports/
150
+
151
+ # git_ignore_folder
152
+ git_ignore_folder/
153
+
154
+ #cache
155
+ *cache*/
156
+ *cache.json
157
+
158
+ # DB files
159
+ *.db
160
+
161
+ # Docker
162
+ factor_template/mlruns/
163
+ env_tpl
164
+ mlruns/
165
+
166
+ # possible output from coder or runner
167
+ *.pth
168
+ *qlib_res.csv
169
+
170
+ # shell script
171
+ *.out
172
+ *.sh
@@ -0,0 +1,33 @@
1
+ # Changelog
2
+
3
+ ## 0.0.1 (2024-08-08)
4
+
5
+
6
+ ### Features
7
+
8
+ * Add description for scenario experiments. ([#174](https://github.com/microsoft/RD-Agent/issues/174)) ([fbd8c6d](https://github.com/microsoft/RD-Agent/commit/fbd8c6d87e1424c08997103b8e8fbf264858c4ed))
9
+ * Added QlibFactorFromReportScenario and improved the report-factor loop. ([#161](https://github.com/microsoft/RD-Agent/issues/161)) ([882c79b](https://github.com/microsoft/RD-Agent/commit/882c79bf11583980e646b130f71cfa20201ffc7b))
10
+ * filter feature which is high correlation to former implemented features ([#145](https://github.com/microsoft/RD-Agent/issues/145)) ([e818326](https://github.com/microsoft/RD-Agent/commit/e818326422740e04a4863f7c3c18744dde2ad98f))
11
+ * Remove redundant 'key steps' section in frontend scene display. ([#169](https://github.com/microsoft/RD-Agent/issues/169)) ([e767005](https://github.com/microsoft/RD-Agent/commit/e76700513bee29232c93b97414419df330d9be8d))
12
+ * streamlit webapp demo for different scenarios ([#135](https://github.com/microsoft/RD-Agent/issues/135)) ([d8da7db](https://github.com/microsoft/RD-Agent/commit/d8da7db865e6653fc4740efee9a843b69bd79699))
13
+ * Uploaded Documentation, Updated Prompts & Some Code for model demo ([#144](https://github.com/microsoft/RD-Agent/issues/144)) ([529f935](https://github.com/microsoft/RD-Agent/commit/529f935aa98623f0dc1dda29eecee3ef738dd446))
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * Add framework handling for task coding failure. ([#176](https://github.com/microsoft/RD-Agent/issues/176)) ([5e14fa5](https://github.com/microsoft/RD-Agent/commit/5e14fa54a9dd30a94aebe2643b8c9a3b85517a11))
19
+ * Comprehensive update to factor extraction. ([#143](https://github.com/microsoft/RD-Agent/issues/143)) ([b5ea040](https://github.com/microsoft/RD-Agent/commit/b5ea04019fd5fa15c0f8b9a7e4f18f490f7057d4))
20
+ * first round app folder cleaning ([#166](https://github.com/microsoft/RD-Agent/issues/166)) ([6a5a750](https://github.com/microsoft/RD-Agent/commit/6a5a75021912927deb5e8e4c7ad3ec4b51bfc788))
21
+ * fix pickle problem ([#140](https://github.com/microsoft/RD-Agent/issues/140)) ([7ee4258](https://github.com/microsoft/RD-Agent/commit/7ee42587b60d94417f34332cee395cf210dc8a0e))
22
+ * fix release CI ([#165](https://github.com/microsoft/RD-Agent/issues/165)) ([85d6a5e](https://github.com/microsoft/RD-Agent/commit/85d6a5ed91113fda34ae079b23c89aa24acd2cb2))
23
+ * fix release CI error ([#160](https://github.com/microsoft/RD-Agent/issues/160)) ([1c9f8ef](https://github.com/microsoft/RD-Agent/commit/1c9f8ef287961731944acc9008496b4dddeddca7))
24
+ * fix several bugs in data mining scenario ([#147](https://github.com/microsoft/RD-Agent/issues/147)) ([b233380](https://github.com/microsoft/RD-Agent/commit/b233380e2c66fb030db39424f0f040c86e37f5c4))
25
+ * fix some small bugs in report-factor loop ([#152](https://github.com/microsoft/RD-Agent/issues/152)) ([a79f9f9](https://github.com/microsoft/RD-Agent/commit/a79f9f93406aff6305a76e6a6abd3852642e4c62))
26
+ * fix_release_ci_error ([#150](https://github.com/microsoft/RD-Agent/issues/150)) ([4f82e99](https://github.com/microsoft/RD-Agent/commit/4f82e9960a2638af9d831581185ddd3bac5711fc))
27
+ * Fixed some bugs introduced during refactoring. ([#167](https://github.com/microsoft/RD-Agent/issues/167)) ([f8f1445](https://github.com/microsoft/RD-Agent/commit/f8f1445283fb89aefeb2918243c35a219a51a56c))
28
+ * optimize some prompts in factor loop. ([#158](https://github.com/microsoft/RD-Agent/issues/158)) ([c2c1330](https://github.com/microsoft/RD-Agent/commit/c2c13300b9ad315a663ec2d0eada414e56c6f54f))
29
+
30
+
31
+ ### Miscellaneous Chores
32
+
33
+ * release 0.0.1 ([1feacd3](https://github.com/microsoft/RD-Agent/commit/1feacd39b21193de11e9bbecf880ddf96d7c261c))
@@ -0,0 +1,9 @@
1
+ # Microsoft Open Source Code of Conduct
2
+
3
+ This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
4
+
5
+ Resources:
6
+
7
+ - [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/)
8
+ - [Microsoft Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/)
9
+ - Contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with questions or concerns
rdagent-0.0.1/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) Microsoft Corporation.
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