diff --git a/README.md b/README.md index 4ac5e647..8b1afe05 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,9 @@ +

+ RA-Agent logo + + πŸ–₯️ Live Demo | πŸŽ₯ Demo Video | πŸ“– Documentation +

+ [![CI](https://github.com/microsoft/RD-Agent/actions/workflows/ci.yml/badge.svg)](https://github.com/microsoft/RD-Agent/actions/workflows/ci.yml) [![CodeQL](https://github.com/microsoft/RD-Agent/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/microsoft/RD-Agent/actions/workflows/github-code-scanning/codeql) [![Dependabot Updates](https://github.com/microsoft/RD-Agent/actions/workflows/dependabot/dependabot-updates/badge.svg)](https://github.com/microsoft/RD-Agent/actions/workflows/dependabot/dependabot-updates) @@ -19,8 +25,9 @@ # 🌟 Introduction - -![Our focused scenario](docs/_static/scen.jpg) +
+ Our focused scenario +
RDAgent aims to automate the most critical and valuable aspects of the industrial R&D process, and we begin with focusing on the data-driven scenarios to streamline the development of models and data. Methodologically, we have identified a framework with two key components: 'R' for proposing new ideas and 'D' for implementing them. @@ -29,23 +36,21 @@ We believe that the automatic evolution of R&D will lead to solutions of signifi R&D is a very general scenario. The advent of RDAgent can be your -- 🏭 Automatic Quant Factory [(πŸŽ₯demo)](https://rdagent.azurewebsites.net/factor_loop) -- πŸ€– Data Mining Agent: iteratively proposing data [(πŸŽ₯demo)](https://rdagent.azurewebsites.net/dmm) & models [(πŸŽ₯demo)](https://rdagent.azurewebsites.net/model_loop) and implementing them by gaining knowledge from data. -- 🦾 Research Copilot: Auto read research papers [(πŸŽ₯demo)](https://rdagent.azurewebsites.net/report_model) / financial reports [(πŸŽ₯demo)](https://rdagent.azurewebsites.net/report_factor) and implement model structures or building datasets. +- πŸ’° **Automatic Quant Factory** [(πŸŽ₯Demo Video)](https://rdagent.azurewebsites.net/factor_loop) +- πŸ€– **Data Mining Agent:** Iteratively proposing data [(πŸŽ₯Demo Video)](https://rdagent.azurewebsites.net/dmm) & models [(πŸŽ₯Demo Video)](https://rdagent.azurewebsites.net/model_loop) and implementing them by gaining knowledge from data. +- 🦾 **Research Copilot:** Auto read research papers [(πŸŽ₯Demo Video)](https://rdagent.azurewebsites.net/report_model) / financial reports [(πŸŽ₯Demo Video)](https://rdagent.azurewebsites.net/report_factor) and implement model structures or building datasets. - ... -You can click the πŸŽ₯ [link](https://rdagent.azurewebsites.net) above to view the demo. More methods and scenarios are being added to the project to empower your R&D processes and boost productivity. - - - [![Watch the video](https://img.freepik.com/premium-vector/video-streaming-media-player-template-mockup-live-stream-window-player-online-broadcasting_659151-73.jpg)](https://rdagent.azurewebsites.net/) - +You can click the links above to view the demo. We're continuously adding more methods and scenarios to the project to enhance your R&D processes and boost productivity. + +Additionally, you can take a closer look at the examples in our **[πŸ–₯️ Live Demo](https://rdagent.azurewebsites.net/)**. + +
+ + Watch the demo + +
+ # ⚑ Quick start @@ -71,18 +76,18 @@ Users must ensure Docker is installed before attempting most scenarios. Please r ``` ### βš™οΈ Configuration -You have to config your GPT model in the `.env` -```bash -cat << EOF > .env -OPENAI_API_KEY= -# EMBEDDING_MODEL=text-embedding-3-small -CHAT_MODEL=gpt-4-turbo -EOF -``` +- You have to config your GPT model in the `.env` + ```bash + cat << EOF > .env + OPENAI_API_KEY= + # EMBEDDING_MODEL=text-embedding-3-small + CHAT_MODEL=gpt-4-turbo + EOF + ``` ### πŸš€ Run the Application -The πŸŽ₯ [demo](https://rdagent.azurewebsites.net) is implemented by the following commands(each item represents one demo, you can select the one you prefer): +The **[πŸ–₯️ Live Demo](https://rdagent.azurewebsites.net/)** is implemented by the following commands(each item represents one demo, you can select the one you prefer): - Run the **Automated Quantitative Trading & Iterative Factors Evolution**: Qlib self-loop factor proposal and implementation application ```sh @@ -94,21 +99,29 @@ The πŸŽ₯ [demo](https://rdagent.azurewebsites.net) is implemented by the followi rdagent fin_model ``` -- Run the **Automated Medical Predtion Model Evolution**: medical self-loop model proposal and implementation application +- Run the **Automated Medical Prediction Model Evolution**: Medical self-loop model proposal and implementation application ```sh rdagent med_model ``` - Run the **Automated Quantitative Trading & Factors Extraction from Financial Reports**: Run the Qlib factor extraction and implementation application based on financial reports ```sh - rdagent fin_factor_report + # 1. Generally, you can run this scenario using the following command: + rdagent fin_factor_report --report_folder= + + # 2. Specifically, you need to prepare some financial reports first. You can follow this concrete example: + wget https://github.com/SunsetWolf/rdagent_resource/releases/download/reports/all_reports.zip + unzip all_reports.zip -d git_ignore_folder/reports + rdagent fin_factor_report --report_folder=git_ignore_folder/reports ``` - Run the **Automated Model Research & Development Copilot**: model extraction and implementation application ```sh - rdagent general_model - # e.g. rdagent general_model "https://arxiv.org/pdf/2210.09789" - # You can get more details (more paper examples) by `rdagent general_model -h` + # 1. Generally, you can run your own papers/reports with the following command: + rdagent general_model + + # 2. Specifically, you can do it like this. For more details and additional paper examples, use `rdagent general_model -h`: + rdagent general_model "https://arxiv.org/pdf/2210.09789" ``` ### πŸ–₯️ Monitor the Application Results @@ -142,9 +155,9 @@ The supported scenarios are listed below: | Scenario/Target | Model Implementation | Data Building | | -- | -- | -- | -| πŸ’Ή Finance | πŸ€– [Iteratively Proposing Ideas & Evolving](https://rdagent.azurewebsites.net/model_loop) | πŸ€– [Iteratively Proposing Ideas & Evolving](https://rdagent.azurewebsites.net/factor_loop)
🦾 [Auto reports reading & implementation](https://rdagent.azurewebsites.net/report_factor) | -| 🩺 Medical | πŸ€– [Iteratively Proposing Ideas & Evolving](https://rdagent.azurewebsites.net/dmm) | - | -| 🏭 General | 🦾 [Auto paper reading & implementation](https://rdagent.azurewebsites.net/report_model) | - | +| **πŸ’Ή Finance** | πŸ€– [Iteratively Proposing Ideas & Evolving](https://rdagent.azurewebsites.net/model_loop) | πŸ€– [Iteratively Proposing Ideas & Evolving](https://rdagent.azurewebsites.net/factor_loop)
🦾 [Auto reports reading & implementation](https://rdagent.azurewebsites.net/report_factor) | +| **🩺 Medical** | πŸ€– [Iteratively Proposing Ideas & Evolving](https://rdagent.azurewebsites.net/dmm) | - | +| **🏭 General** | 🦾 [Auto paper reading & implementation](https://rdagent.azurewebsites.net/report_model) | - | Different scenarios vary in entrance and configuration. Please check the detailed setup tutorial in the scenarios documents. @@ -154,11 +167,13 @@ Here is a gallery of successful explorations. You can download the source code a rdagent ui --port 80 --log_dir gallary/ ``` -Please refer to [πŸ“šreadthedocs_scen](https://rdagent.readthedocs.io/en/latest/scens/catalog.html) for more details of the scenarios. +Please refer to **[πŸ“–readthedocs_scen](https://rdagent.readthedocs.io/en/latest/scens/catalog.html)** for more details of the scenarios. # βš™οΈ Framework -![image](https://github.com/user-attachments/assets/98fce923-77ab-4982-93c8-a7a01aece766) +
+ Framework-RDAgent +
Automating the R&D process in data science is a highly valuable yet underexplored area in industry. We propose a framework to push the boundaries of this important research field. @@ -166,18 +181,18 @@ Automating the R&D process in data science is a highly valuable yet underexplore The research questions within this framework can be divided into three main categories: | Research Area | Paper/Work List | |--------------------|-----------------| -| Benchmark the R&D abilities | [Benchmark](#benchmark) | -| Idea proposal: Explore new ideas or refine existing ones | [Research](#research) | -| Ability to realize ideas: Implement and execute ideas | [Development](#development) | +| **Benchmark the R&D abilities** | [Benchmark](#benchmark) | +| **Idea proposal:** Explore new ideas or refine existing ones | [Research](#research) | +| **Ability to realize ideas:** Implement and execute ideas | [Development](#development) | We believe that the key to delivering high-quality solutions lies in the ability to evolve R&D capabilities. Agents should learn like human experts, continuously improving their R&D skills. -More documents can be found in the [πŸ“šreadthedocs](https://rdagent.readthedocs.io/). +More documents can be found in the **[πŸ“– readthedocs](https://rdagent.readthedocs.io/)**. # πŸ“ƒ Paper/Work list ## πŸ“Š Benchmark -- [Towards Data-Centric Automatic R&D](https://arxiv.org/abs/2404.11276); +- [Towards Data-Centric Automatic R&D](https://arxiv.org/abs/2404.11276) ```BibTeX @misc{chen2024datacentric, title={Towards Data-Centric Automatic R&D}, @@ -196,7 +211,7 @@ In a data mining expert's daily research and development process, they propose a Based on the principles above, we have established a basic method framework that continuously proposes hypotheses, verifies them, and gets feedback from the real-world practice. This is the first scientific research automation framework that supports linking with real-world verification. -For more detail, please refer to our [Demos page](https://rdagent.azurewebsites.net). +For more detail, please refer to our **[πŸ–₯️ Live Demo page](https://rdagent.azurewebsites.net)**. ## πŸ› οΈ Development diff --git a/docs/_static/Framework-RDAgent.png b/docs/_static/Framework-RDAgent.png new file mode 100644 index 00000000..10a20f22 Binary files /dev/null and b/docs/_static/Framework-RDAgent.png differ diff --git a/docs/_static/demo.png b/docs/_static/demo.png new file mode 100644 index 00000000..54a9e0e4 Binary files /dev/null and b/docs/_static/demo.png differ diff --git a/docs/_static/favicon.ico b/docs/_static/favicon.ico new file mode 100644 index 00000000..99688ed8 Binary files /dev/null and b/docs/_static/favicon.ico differ diff --git a/docs/_static/logo.png b/docs/_static/logo.png new file mode 100644 index 00000000..ec1b644f Binary files /dev/null and b/docs/_static/logo.png differ diff --git a/docs/_static/scen.png b/docs/_static/scen.png new file mode 100644 index 00000000..4c438ebb Binary files /dev/null and b/docs/_static/scen.png differ diff --git a/docs/conf.py b/docs/conf.py index 4e8e069e..a1fea424 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -61,7 +61,9 @@ try: except ImportError: html_theme = "default" +html_logo = "_static/logo.png" html_static_path = ["_static"] +html_favicon = "_static/favicon.ico" html_theme_options = { "source_repository": "https://github.com/microsoft/RD-Agent", diff --git a/docs/index.rst b/docs/index.rst index 69f6d00d..850cd57f 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -6,6 +6,9 @@ Welcome to RDAgent's documentation! =================================== +.. image:: _static/logo.png + :alt: RD-Agent Logo + .. toctree:: :maxdepth: 3 :caption: Doctree: diff --git a/docs/introduction.rst b/docs/introduction.rst index 22adbf66..9cb2172a 100644 --- a/docs/introduction.rst +++ b/docs/introduction.rst @@ -6,7 +6,7 @@ Introduction In modern industry, research and development (R&D) is crucial for the enhancement of industrial productivity, especially in the AI era, where the core aspects of R&D are mainly focused on data and models. We are committed to automate these high-value generic R&D processes through our open source R&D automation tool RDAgent, which let AI drive data-driven AI. -.. image:: _static/scen.jpg +.. image:: _static/scen.png :alt: Our focused scenario diff --git a/docs/project_framework_introduction.rst b/docs/project_framework_introduction.rst index bfe7052d..e3b78ec9 100644 --- a/docs/project_framework_introduction.rst +++ b/docs/project_framework_introduction.rst @@ -7,7 +7,7 @@ Framework & Components .. NOTE: This depends on the correctness of `c-v` of github. -.. image:: https://github.com/user-attachments/assets/98fce923-77ab-4982-93c8-a7a01aece766 +.. image:: _static/Framework-RDAgent.png :alt: Components & Feature Level The image above shows the overall framework of RDAgent. diff --git a/docs/scens/data_agent_fin.rst b/docs/scens/data_agent_fin.rst index 1c957c16..30e807aa 100644 --- a/docs/scens/data_agent_fin.rst +++ b/docs/scens/data_agent_fin.rst @@ -20,14 +20,14 @@ And this is where the **Finance Model Agent** comes into play. πŸŽ₯ `Demo `_ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -.. https://rdagent.azurewebsites.net:443/media/54d59c2bf85211de6a7cd2bd3c57d3b56c36cf9795a31111a9111ddb.mp4 - .. raw:: html - +
+ +
🌟 Introduction @@ -88,26 +88,31 @@ Please refer to the installation part in :doc:`../installation_and_configuration You can try our demo by running the following command: - 🐍 Create a Conda Environment - - Create a new conda environment with Python (3.10 and 3.11 are well tested in our CI): - - .. code-block:: sh + + - Create a new conda environment with Python (3.10 and 3.11 are well tested in our CI): + + .. code-block:: sh conda create -n rdagent python=3.10 - - Activate the environment: + - Activate the environment: - .. code-block:: sh + .. code-block:: sh - conda activate rdagent + conda activate rdagent - πŸ“¦ Install the RDAgent - - You can directly install the RDAgent package from PyPI: + + - You can install the RDAgent package from PyPI: - .. code-block:: sh + .. code-block:: sh - pip install rdagent + pip install rdagent - πŸš€ Run the Application + + - You can directly run the application by using the following command: + .. code-block:: sh rdagent fin_factor diff --git a/docs/scens/data_copilot_fin.rst b/docs/scens/data_copilot_fin.rst index 88c4e852..9d5bfc43 100644 --- a/docs/scens/data_copilot_fin.rst +++ b/docs/scens/data_copilot_fin.rst @@ -25,11 +25,12 @@ And this is where the **Finance Data Copilot** steps in. .. raw:: html - - +
+ +
🌟 Introduction @@ -88,41 +89,59 @@ Please refer to the installation part in :doc:`../installation_and_configuration You can try our demo by running the following command: - 🐍 Create a Conda Environment - - Create a new conda environment with Python (3.10 and 3.11 are well tested in our CI): - .. code-block:: sh - - conda create -n rdagent python=3.10 + - Create a new conda environment with Python (3.10 and 3.11 are well tested in our CI): + + .. code-block:: sh + + conda create -n rdagent python=3.10 - - Activate the environment: + - Activate the environment: - .. code-block:: sh + .. code-block:: sh - conda activate rdagent + conda activate rdagent - πŸ“¦ Install the RDAgent - - You can directly install the RDAgent package from PyPI: + + - You can install the RDAgent package from PyPI: - .. code-block:: sh + .. code-block:: sh - pip install rdagent + pip install rdagent - πŸš€ Run the Application - - Store the factors you want to extract from the financial reports in your desired folder. Then, save the paths of the reports in the `report_result_json_file_path`. The format should be as follows: - - .. code-block:: json - - [ - "git_ignore_folder/report/fin_report1.pdf", - "git_ignore_folder/report/fin_report2.pdf", - "git_ignore_folder/report/fin_report3.pdf" - ] - - - Run the application using the following command: - .. code-block:: sh + - Download the financial reports you wish to extract factors from and store them in your preferred folder. - rdagent fin_factor_report + - Specifically, you can follow this example, or use your own method: + + .. code-block:: sh + + wget https://github.com/SunsetWolf/rdagent_resource/releases/download/reports/all_reports.zip + unzip all_reports.zip -d git_ignore_folder/reports + + - Run the application with the following command: + + .. code-block:: sh + + rdagent fin_factor_report --report_folder=git_ignore_folder/reports + + - Alternatively, you can store the paths of the reports in `report_result_json_file_path`. The format should be: + + .. code-block:: json + + [ + "git_ignore_folder/report/fin_report1.pdf", + "git_ignore_folder/report/fin_report2.pdf", + "git_ignore_folder/report/fin_report3.pdf" + ] + + - Then, run the application using the following command: + + .. code-block:: sh + + rdagent fin_factor_report πŸ› οΈ Usage of modules ~~~~~~~~~~~~~~~~~~~~~ diff --git a/docs/scens/model_agent_fin.rst b/docs/scens/model_agent_fin.rst index 43e9262b..e9ffaef6 100644 --- a/docs/scens/model_agent_fin.rst +++ b/docs/scens/model_agent_fin.rst @@ -22,14 +22,12 @@ And this is where the **Finance Model Agent** steps in. .. raw:: html - - - - - +
+ +
🌟 Introduction @@ -90,26 +88,31 @@ Please refer to the installation part in :doc:`../installation_and_configuration You can try our demo by running the following command: - 🐍 Create a Conda Environment - - Create a new conda environment with Python (3.10 and 3.11 are well tested in our CI): + + - Create a new conda environment with Python (3.10 and 3.11 are well tested in our CI): + + .. code-block:: sh - .. code-block:: sh - - conda create -n rdagent python=3.10 + conda create -n rdagent python=3.10 - - Activate the environment: + - Activate the environment: - .. code-block:: sh + .. code-block:: sh - conda activate rdagent + conda activate rdagent - πŸ“¦ Install the RDAgent - - You can directly install the RDAgent package from PyPI: + + - You can install the RDAgent package from PyPI: - .. code-block:: sh + .. code-block:: sh - pip install rdagent + pip install rdagent - πŸš€ Run the Application + + - You can directly run the application by using the following command: + .. code-block:: sh rdagent fin_model diff --git a/docs/scens/model_agent_med.rst b/docs/scens/model_agent_med.rst index 25f000da..0f4bc839 100644 --- a/docs/scens/model_agent_med.rst +++ b/docs/scens/model_agent_med.rst @@ -17,10 +17,12 @@ In this task, we aim at predicting the whether the patients will suffer from Acu .. raw:: html - +
+ +
🌟 Introduction @@ -69,32 +71,38 @@ Please refer to the installation part in :doc:`../installation_and_configuration You can try our demo by running the following command: - 🐍 Create a Conda Environment - - Create a new conda environment with Python (3.10 and 3.11 are well tested in our CI): + + - Create a new conda environment with Python (3.10 and 3.11 are well tested in our CI): + + .. code-block:: sh - .. code-block:: sh - - conda create -n rdagent python=3.10 + conda create -n rdagent python=3.10 - - Activate the environment: + - Activate the environment: - .. code-block:: sh + .. code-block:: sh - conda activate rdagent + conda activate rdagent - πŸ“¦ Install the RDAgent - - You can directly install the RDAgent package from PyPI: + + - You can install the RDAgent package from PyPI: - .. code-block:: sh + .. code-block:: sh - pip install rdagent + pip install rdagent - πŸ“¦ Request PhysioNet Account - - Apply for an account at `PhysioNet `_. - - Request access to FIDDLE preprocessed data: `FIDDLE Dataset `_. - - Place your username and password in `.rdagent.app.data_mining.conf`. + + - Apply for an account at `PhysioNet `_. + - Request access to FIDDLE preprocessed data: `FIDDLE Dataset `_. + - Place your username and password in `.rdagent.app.data_mining.conf`. - πŸš€ Run the Application + + - You can directly run the application by using the following command: + .. code-block:: sh rdagent med_model diff --git a/docs/scens/model_copilot_general.rst b/docs/scens/model_copilot_general.rst index 11160252..bafdf11f 100644 --- a/docs/scens/model_copilot_general.rst +++ b/docs/scens/model_copilot_general.rst @@ -20,10 +20,12 @@ And this is where the **General Model Copilot** steps in. .. raw:: html - +
+ +
🌟 Introduction ~~~~~~~~~~~~~~~~ @@ -60,35 +62,38 @@ Please refer to the installation part in :doc:`../installation_and_configuration You can try our demo by running the following command: - 🐍 Create a Conda Environment - - Create a new conda environment with Python (3.10 and 3.11 are well tested in our CI): + + - Create a new conda environment with Python (3.10 and 3.11 are well tested in our CI): + + .. code-block:: sh - .. code-block:: sh - - conda create -n rdagent python=3.10 + conda create -n rdagent python=3.10 - - Activate the environment: + - Activate the environment: - .. code-block:: sh + .. code-block:: sh - conda activate rdagent + conda activate rdagent - πŸ“¦ Install the RDAgent - - You can directly install the RDAgent package from PyPI: + + - You can install the RDAgent package from PyPI: - .. code-block:: sh + .. code-block:: sh - pip install rdagent + pip install rdagent - πŸš€ Run the Application - - Prepare relevant files (in pdf format) by uploading papers to the directory below and copy the path as report_file_path. + + - Prepare relevant files (in pdf format) by uploading papers to the directory below and copy the path as report_file_path. - .. code-block:: sh + .. code-block:: sh - rdagent/scenarios/general_model + rdagent/scenarios/general_model - - Run the following command in your terminal within the same virtual environment: - - .. code-block:: sh + - Run the following command in your terminal within the same virtual environment: + + .. code-block:: sh - rdagent general_model --report_file_path= + rdagent general_model --report_file_path= diff --git a/rdagent/app/qlib_rd_loop/factor_from_report.py b/rdagent/app/qlib_rd_loop/factor_from_report.py index 81fa8998..cff11408 100644 --- a/rdagent/app/qlib_rd_loop/factor_from_report.py +++ b/rdagent/app/qlib_rd_loop/factor_from_report.py @@ -110,7 +110,7 @@ class FactorReportLoop(FactorRDLoop, metaclass=LoopMeta): open(FACTOR_FROM_REPORT_PROP_SETTING.report_result_json_file_path, "r") ) else: - self.judge_pdf_data_items = Path(report_folder).rglob("*.pdf") + self.judge_pdf_data_items = [i for i in Path(report_folder).rglob("*.pdf")] self.pdf_file_index = 0 self.valid_pdf_file_count = 0 @@ -146,21 +146,22 @@ class FactorReportLoop(FactorRDLoop, metaclass=LoopMeta): return self.current_loop_exp -def main(path=None, step_n=None): +def main(report_folder=None, path=None, step_n=None): """ - Auto R&D Evolving loop for fintech factors (the factors are extracted from finance report). - - You can continue running session by - - .. code-block:: python - - 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 + Auto R&D Evolving loop for fintech factors (the factors are extracted from finance reports). + Args: + report_folder (str, optional): The folder contains the report PDF files. Reports will be loaded from this folder. + path (str, optional): The path for loading a session. If provided, the session will be loaded. + step_n (int, optional): Step number to continue running a session. """ - if path is None: - model_loop = FactorReportLoop(FACTOR_FROM_REPORT_PROP_SETTING) - else: + if path is None and report_folder is None: + model_loop = FactorReportLoop() + elif path is not None: model_loop = FactorReportLoop.load(path) + else: + model_loop = FactorReportLoop(report_folder=report_folder) + model_loop.run(step_n=step_n) diff --git a/rdagent/log/ui/web.py b/rdagent/log/ui/web.py index 99a2f755..f9cff7b5 100644 --- a/rdagent/log/ui/web.py +++ b/rdagent/log/ui/web.py @@ -586,7 +586,7 @@ class TraceWindow(StWindow): self.show_llm = show_llm self.show_common_logs = show_common_logs image_c, scen_c = container.columns([2, 3], vertical_alignment="center") - image_c.image("scen.jpg") + image_c.image("scen.png") scen_c.container(border=True).markdown(QlibModelScenario().rich_style_description) top_container = container.container() col1, col2 = top_container.columns([2, 3])