Compare commits

...

7 Commits

Author SHA1 Message Date
you-n-g ce72d30139 chore(main): release 0.2.1 (#249)
Release-As: 0.2.1
2024-09-10 19:43:54 +08:00
Linlang 92c46a66b6 fix: fix_dotenv_error (#257)
* fix_dotenv_error

* format with isort

* Update rdagent/app/cli.py

---------

Co-authored-by: you-n-g <you-n-g@users.noreply.github.com>
2024-09-10 19:38:35 +08:00
you-n-g df1f5e9390 fix: default model value in config (#256)
* fix: git default model value

* Update README.md
2024-09-10 12:49:06 +08:00
you-n-g 144d0f13b8 docs: Update Link to Papers & Qlib (#253)
* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md

* Update README.md
2024-09-10 12:33:37 +08:00
XianBW d90ad532dc docs: links update (#251)
* add trace download link in README

* update video links in doc
2024-09-09 15:34:26 +08:00
Suhan Cui 3b15bca356 fix: readme (#248)
* Update README.md

* Update model_agent_med.rst
2024-09-08 07:31:39 +08:00
Suhan Cui c6424e5250 Update README.md (#246) 2024-09-07 05:50:13 -04:00
11 changed files with 47 additions and 40 deletions
+9
View File
@@ -1,5 +1,14 @@
# Changelog # Changelog
## [0.2.1](https://github.com/microsoft/RD-Agent/compare/v0.2.0...v0.2.1) (2024-09-10)
### Bug Fixes
* default model value in config ([#256](https://github.com/microsoft/RD-Agent/issues/256)) ([c097585](https://github.com/microsoft/RD-Agent/commit/c097585f631f401c2c0966f6ad4c17286924f011))
* fix_dotenv_error ([#257](https://github.com/microsoft/RD-Agent/issues/257)) ([923063c](https://github.com/microsoft/RD-Agent/commit/923063c1fd957c4ed42e97272c72b5e9545451dc))
* readme ([#248](https://github.com/microsoft/RD-Agent/issues/248)) ([8cede22](https://github.com/microsoft/RD-Agent/commit/8cede2209922876490148459e1134da828e1fda0))
## [0.2.0](https://github.com/microsoft/RD-Agent/compare/v0.1.0...v0.2.0) (2024-09-07) ## [0.2.0](https://github.com/microsoft/RD-Agent/compare/v0.1.0...v0.2.0) (2024-09-07)
+18 -10
View File
@@ -1,14 +1,13 @@
<h2 align="center"> <h3 align="center">
<img src="docs/_static/logo.png" alt="RA-Agent logo" style="width:70%; "> <img src="docs/_static/logo.png" alt="RA-Agent logo" style="width:70%; ">
<a href="https://rdagent.azurewebsites.net">🖥️ Live Demo</a> | <a href="https://rdagent.azurewebsites.net/factor_loop">🎥 Demo Video</a> | <a href="https://rdagent.readthedocs.io/en/latest/index.html">📖 Documentation</a> <a href="https://rdagent.azurewebsites.net" target="_blank">🖥️ Live Demo</a> | <a href="https://rdagent.azurewebsites.net/factor_loop" target="_blank">🎥 Demo Video</a> | <a href="https://rdagent.readthedocs.io/en/latest/index.html" target="_blank">📖 Documentation</a> | <a href="#-paperwork-list"> 📃 Papers </a>
</h2> </h3>
[![CI](https://github.com/microsoft/RD-Agent/actions/workflows/ci.yml/badge.svg)](https://github.com/microsoft/RD-Agent/actions/workflows/ci.yml) [![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) [![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) [![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)
[![Lint PR Title](https://github.com/microsoft/RD-Agent/actions/workflows/pr.yml/badge.svg)](https://github.com/microsoft/RD-Agent/actions/workflows/pr.yml) [![Lint PR Title](https://github.com/microsoft/RD-Agent/actions/workflows/pr.yml/badge.svg)](https://github.com/microsoft/RD-Agent/actions/workflows/pr.yml)
[![Readthedocs Preview](https://github.com/microsoft/RD-Agent/actions/workflows/readthedocs-preview.yml/badge.svg)](https://github.com/microsoft/RD-Agent/actions/workflows/readthedocs-preview.yml)
[![Release.yml](https://github.com/microsoft/RD-Agent/actions/workflows/release.yml/badge.svg)](https://github.com/microsoft/RD-Agent/actions/workflows/release.yml) [![Release.yml](https://github.com/microsoft/RD-Agent/actions/workflows/release.yml/badge.svg)](https://github.com/microsoft/RD-Agent/actions/workflows/release.yml)
[![Platform](https://img.shields.io/badge/platform-Linux-blue)](https://pypi.org/project/rdagent/#files) [![Platform](https://img.shields.io/badge/platform-Linux-blue)](https://pypi.org/project/rdagent/#files)
[![PyPI](https://img.shields.io/pypi/v/rdagent)](https://pypi.org/project/rdagent/) [![PyPI](https://img.shields.io/pypi/v/rdagent)](https://pypi.org/project/rdagent/)
@@ -18,6 +17,7 @@
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit) [![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
[![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/) [![Checked with mypy](https://www.mypy-lang.org/static/mypy_badge.svg)](http://mypy-lang.org/)
[![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff) [![Ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/astral-sh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![Readthedocs Preview](https://github.com/microsoft/RD-Agent/actions/workflows/readthedocs-preview.yml/badge.svg)](https://github.com/microsoft/RD-Agent/actions/workflows/readthedocs-preview.yml) <!-- this badge is too long, please place it in the last one to make it pretty -->
# 📰 News # 📰 News
| 🗞️ News | 📝 Description | | 🗞️ News | 📝 Description |
@@ -90,22 +90,30 @@ Users must ensure Docker is installed before attempting most scenarios. Please r
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): 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 - Run the **Automated Quantitative Trading & Iterative Factors Evolution**: [Qlib](http://github.com/microsoft/qlib) self-loop factor proposal and implementation application
```sh ```sh
rdagent fin_factor rdagent fin_factor
``` ```
- Run the **Automated Quantitative Trading & Iterative Model Evolution**: Qlib self-loop model proposal and implementation application - Run the **Automated Quantitative Trading & Iterative Model Evolution**: [Qlib](http://github.com/microsoft/qlib) self-loop model proposal and implementation application
```sh ```sh
rdagent fin_model rdagent fin_model
``` ```
- Run the **Automated Medical Prediction 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
>(1) Apply for an account at [PhysioNet](https://physionet.org/). <br /> (2) Request access to FIDDLE preprocessed data: [FIDDLE Dataset](https://physionet.org/content/mimic-eicu-fiddle-feature/1.0.0/). <br />
(3) Place your username and password in `.env`.
```bash
cat << EOF >> .env
DM_USERNAME=<your_username>
DM_PASSWORD=<your_password>
EOF
```
```sh ```sh
rdagent med_model 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 - Run the **Automated Quantitative Trading & Factors Extraction from Financial Reports**: Run the [Qlib](http://github.com/microsoft/qlib) factor extraction and implementation application based on financial reports
```sh ```sh
# 1. Generally, you can run this scenario using the following command: # 1. Generally, you can run this scenario using the following command:
rdagent fin_factor_report --report_folder=<Your financial reports folder path> rdagent fin_factor_report --report_folder=<Your financial reports folder path>
@@ -162,10 +170,10 @@ The supported scenarios are listed below:
Different scenarios vary in entrance and configuration. Please check the detailed setup tutorial in the scenarios documents. Different scenarios vary in entrance and configuration. Please check the detailed setup tutorial in the scenarios documents.
Here is a gallery of successful explorations. You can download the source code and view the execution trace using the command below: Here is a gallery of [successful explorations](https://github.com/SunsetWolf/rdagent_resource/releases/download/demo_traces/demo_traces.zip) (5 traces showed in **[🖥️ Live Demo](https://rdagent.azurewebsites.net/)**). You can download and view the execution trace using the command below:
```bash ```bash
rdagent ui --port 80 --log_dir gallary/ rdagent ui --port 80 --log_dir ./demo_traces
``` ```
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.
+1 -1
View File
@@ -27,7 +27,7 @@ And this is where the **Finance Data Copilot** steps in.
<div style="display: flex; justify-content: center; align-items: center;"> <div style="display: flex; justify-content: center; align-items: center;">
<video width="600" controls> <video width="600" controls>
<source src="https://rdagent.azurewebsites.net/media/65bb598f1372c1857ccbf09b2acf5d55830911625048c03102291098.mp4" type="video/mp4"> <source src="https://rdagent.azurewebsites.net/media/7b14b2bd3d8771da9cf7eb799b6d96729cec3d35c8d4f68060f3e2fd.mp4" type="video/mp4">
Your browser does not support the video tag. Your browser does not support the video tag.
</video> </video>
</div> </div>
+1 -1
View File
@@ -24,7 +24,7 @@ And this is where the **Finance Model Agent** steps in.
<div style="display: flex; justify-content: center; align-items: center;"> <div style="display: flex; justify-content: center; align-items: center;">
<video width="600" controls> <video width="600" controls>
<source src="https://rdagent.azurewebsites.net/media/65bb598f1372c1857ccbf09b2acf5d55830911625048c03102291098.mp4" type="video/mp4"> <source src="https://rdagent.azurewebsites.net/media/d85e8cab1da1cd3501d69ce837452f53a971a24911eae7bfa9237137.mp4" type="video/mp4">
Your browser does not support the video tag. Your browser does not support the video tag.
</video> </video>
</div> </div>
+9 -2
View File
@@ -19,7 +19,7 @@ In this task, we aim at predicting the whether the patients will suffer from Acu
<div style="display: flex; justify-content: center; align-items: center;"> <div style="display: flex; justify-content: center; align-items: center;">
<video width="600" controls> <video width="600" controls>
<source src="https://rdagent.azurewebsites.net/media/65bb598f1372c1857ccbf09b2acf5d55830911625048c03102291098.mp4" type="video/mp4"> <source src="https://rdagent.azurewebsites.net/media/1653542fc1b9fa14a306c35c1b1fc48288f980793f38abe82b023af9.mp4" type="video/mp4">
Your browser does not support the video tag. Your browser does not support the video tag.
</video> </video>
</div> </div>
@@ -96,7 +96,14 @@ You can try our demo by running the following command:
- Apply for an account at `PhysioNet <https://physionet.org/>`_. - Apply for an account at `PhysioNet <https://physionet.org/>`_.
- Request access to FIDDLE preprocessed data: `FIDDLE Dataset <https://physionet.org/content/mimic-eicu-fiddle-feature/1.0.0/>`_. - Request access to FIDDLE preprocessed data: `FIDDLE Dataset <https://physionet.org/content/mimic-eicu-fiddle-feature/1.0.0/>`_.
- Place your username and password in `.rdagent.app.data_mining.conf`. - Place your username and password in `.env`.
.. code-block:: bash
cat << EOF >> .env
DM_USERNAME=<your_username>
DM_PASSWORD=<your_password>
EOF
- 🚀 Run the Application - 🚀 Run the Application
+1 -1
View File
@@ -22,7 +22,7 @@ And this is where the **General Model Copilot** steps in.
<div style="display: flex; justify-content: center; align-items: center;"> <div style="display: flex; justify-content: center; align-items: center;">
<video width="600" controls> <video width="600" controls>
<source src="https://rdagent.azurewebsites.net/media/65bb598f1372c1857ccbf09b2acf5d55830911625048c03102291098.mp4" type="video/mp4"> <source src="https://rdagent.azurewebsites.net/media/b35f904765b05099b0fcddbebe041a04f4d7bde239657e5fc24bf0cc.mp4" type="video/mp4">
Your browser does not support the video tag. Your browser does not support the video tag.
</video> </video>
</div> </div>
+6 -3
View File
@@ -5,11 +5,16 @@ This will
- make rdagent a nice entry and - make rdagent a nice entry and
- autoamtically load dotenv - autoamtically load dotenv
""" """
from dotenv import load_dotenv
load_dotenv(".env")
# 1) Make sure it is at the beginning of the script so that it will load dotenv before initializing BaseSettings.
# 2) The ".env" argument is necessary to make sure it loads `.env` from the current directory.
import subprocess import subprocess
from importlib.resources import path as rpath from importlib.resources import path as rpath
import fire import fire
from dotenv import load_dotenv
from rdagent.app.data_mining.model import main as med_model from rdagent.app.data_mining.model import main as med_model
from rdagent.app.general_model.general_model import ( from rdagent.app.general_model.general_model import (
@@ -20,8 +25,6 @@ from rdagent.app.qlib_rd_loop.factor_from_report import main as fin_factor_repor
from rdagent.app.qlib_rd_loop.model import main as fin_model from rdagent.app.qlib_rd_loop.model import main as fin_model
from rdagent.app.utils.info import collect_info from rdagent.app.utils.info import collect_info
load_dotenv()
def ui(port=80, log_dir="", debug=False): def ui(port=80, log_dir="", debug=False):
""" """
+1 -6
View File
@@ -1,9 +1,3 @@
from dotenv import load_dotenv
from rdagent.scenarios.general_model.scenario import GeneralModelScenario
load_dotenv(override=True)
import fire import fire
from rdagent.components.coder.model_coder.task_loader import ( from rdagent.components.coder.model_coder.task_loader import (
@@ -13,6 +7,7 @@ from rdagent.components.document_reader.document_reader import (
extract_first_page_screenshot_from_pdf, extract_first_page_screenshot_from_pdf,
) )
from rdagent.log import rdagent_logger as logger from rdagent.log import rdagent_logger as logger
from rdagent.scenarios.general_model.scenario import GeneralModelScenario
from rdagent.scenarios.qlib.developer.model_coder import QlibModelCoSTEER from rdagent.scenarios.qlib.developer.model_coder import QlibModelCoSTEER
-5
View File
@@ -2,13 +2,8 @@ from dataclasses import field
from pathlib import Path from pathlib import Path
from typing import Optional from typing import Optional
from dotenv import load_dotenv
from pydantic_settings import BaseSettings from pydantic_settings import BaseSettings
# Load environment variables
load_dotenv(verbose=True, override=True)
DIRNAME = Path("./") DIRNAME = Path("./")
-6
View File
@@ -2,12 +2,6 @@ from __future__ import annotations
from pathlib import Path from pathlib import Path
from dotenv import load_dotenv
from pydantic_settings import BaseSettings
# make sure that env variable is loaded while calling Config()
load_dotenv(verbose=True, override=True)
from pydantic_settings import BaseSettings from pydantic_settings import BaseSettings
+1 -5
View File
@@ -2,15 +2,11 @@ from __future__ import annotations
from pathlib import Path from pathlib import Path
from dotenv import load_dotenv
from pydantic_settings import BaseSettings from pydantic_settings import BaseSettings
# TODO: use pydantic for other modules in Qlib # TODO: use pydantic for other modules in Qlib
# from pydantic_settings import BaseSettings # from pydantic_settings import BaseSettings
# make sure that env variable is loaded while calling Config()
load_dotenv(verbose=True, override=True)
class RDAgentSettings(BaseSettings): class RDAgentSettings(BaseSettings):
# TODO: (xiao) I think LLMSetting may be a better name. # TODO: (xiao) I think LLMSetting may be a better name.
@@ -38,7 +34,7 @@ class RDAgentSettings(BaseSettings):
chat_openai_api_key: str = "" chat_openai_api_key: str = ""
chat_azure_api_base: str = "" chat_azure_api_base: str = ""
chat_azure_api_version: str = "" chat_azure_api_version: str = ""
chat_model: str = "" chat_model: str = "gpt-4-turbo"
chat_max_tokens: int = 3000 chat_max_tokens: int = 3000
chat_temperature: float = 0.5 chat_temperature: float = 0.5
chat_stream: bool = True chat_stream: bool = True