Skip to content

Commit ea5ede5

Browse files
committed
merge main and fix small bugs
2 parents 08b58b4 + 1503dd6 commit ea5ede5

File tree

82 files changed

+2731
-738
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+2731
-738
lines changed

README.md

Lines changed: 52 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ Additionally, you can take a closer look at the examples in our **[🖥️ Live
114114

115115
# ⚡ Quick start
116116

117+
### RD-Agent currently only supports Linux.
118+
117119
You can try above demos by running the following command:
118120

119121
### 🐳 Docker installation.
@@ -153,7 +155,7 @@ More details can be found in the [development setup](https://rdagent.readthedocs
153155
- whether the docker installation was successful.
154156
- whether the default port used by the [rdagent ui](https://github.com/microsoft/RD-Agent?tab=readme-ov-file#%EF%B8%8F-monitor-the-application-results) is occupied.
155157
```sh
156-
rdagent health_check
158+
rdagent health_check --no-check-env
157159
```
158160

159161

@@ -220,7 +222,15 @@ More details can be found in the [development setup](https://rdagent.readthedocs
220222
REASONING_THINK_RM=True
221223
```
222224
223-
- You can also use a deprecated backend if you only use `OpenAI API` or `Azure OpenAI` directly. For this deprecated setting and more configuration information, please refer to the [documentation](https://rdagent.readthedocs.io/en/latest/installation_and_configuration.html).
225+
You can also use a deprecated backend if you only use `OpenAI API` or `Azure OpenAI` directly. For this deprecated setting and more configuration information, please refer to the [documentation](https://rdagent.readthedocs.io/en/latest/installation_and_configuration.html).
226+
227+
228+
229+
- If your environment configuration is complete, please execute the following commands to check if your configuration is valid. This step is necessary.
230+
231+
```bash
232+
rdagent health_check
233+
```
224234
225235
### 🚀 Run the Application
226236
@@ -261,44 +271,70 @@ The **[🖥️ Live Demo](https://rdagent.azurewebsites.net/)** is implemented b
261271
rdagent general_model "https://arxiv.org/pdf/2210.09789"
262272
```
263273
274+
- Run the **Automated Medical Prediction Model Evolution**: Medical self-loop model proposal and implementation application
275+
276+
```bash
277+
# Generally, you can run the data science program with the following command:
278+
rdagent data_science --competition <your competition name>
279+
280+
# Specifically, you need to create a folder for storing competition files (e.g., competition description file, competition datasets, etc.), and configure the path to the folder in your environment. In addition, you need to use chromedriver when you download the competition descriptors, which you can follow for this specific example:
281+
282+
# 1. Download the dataset, extract it to the target folder.
283+
wget https://github.com/SunsetWolf/rdagent_resource/releases/download/ds_data/arf-12-hours-prediction-task.zip
284+
unzip arf-12-hours-prediction-task.zip -d ./git_ignore_folder/ds_data/
285+
286+
# 2. Configure environment variables in the `.env` file
287+
dotenv set DS_LOCAL_DATA_PATH "$(pwd)/git_ignore_folder/ds_data"
288+
dotenv set DS_CODER_ON_WHOLE_PIPELINE True
289+
dotenv set DS_IF_USING_MLE_DATA False
290+
dotenv set DS_SAMPLE_DATA_BY_LLM False
291+
dotenv set DS_SCEN rdagent.scenarios.data_science.scen.DataScienceScen
292+
293+
# 3. run the application
294+
rdagent data_science --competition arf-12-hours-prediction-task
295+
```
296+
297+
**NOTE:** For more information about the dataset, please refer to the [documentation](https://rdagent.readthedocs.io/en/latest/scens/data_science.html).
298+
264299
- Run the **Automated Kaggle Model Tuning & Feature Engineering**: self-loop model proposal and feature engineering implementation application <br />
265-
> Using **sf-crime** *(San Francisco Crime Classification)* as an example. <br />
300+
> Using **tabular-playground-series-dec-2021** as an example. <br />
266301
> 1. Register and login on the [Kaggle](https://www.kaggle.com/) website. <br />
267302
> 2. Configuring the Kaggle API. <br />
268303
> (1) Click on the avatar (usually in the top right corner of the page) -> `Settings` -> `Create New Token`, A file called `kaggle.json` will be downloaded. <br />
269304
> (2) Move `kaggle.json` to `~/.config/kaggle/` <br />
270305
> (3) Modify the permissions of the kaggle.json file. Reference command: `chmod 600 ~/.config/kaggle/kaggle.json` <br />
271-
> 3. Join the competition: Click `Join the competition` -> `I Understand and Accept` at the bottom of the [competition details page](https://www.kaggle.com/competitions/sf-crime/data).
306+
> 3. Join the competition: Click `Join the competition` -> `I Understand and Accept` at the bottom of the [competition details page](https://www.kaggle.com/competitions/tabular-playground-series-dec-2021/data).
272307
```bash
273308
# Generally, you can run the Kaggle competition program with the following command:
274309
rdagent data_science --competition <your competition name>
275310
276-
# Specifically, you need to create a folder for storing competition files (e.g., competition description file, competition datasets, etc.), and configure the path to the folder in your environment. In addition, you need to use chromedriver when you download the competition descriptors, which you can follow for this specific example:
277-
278-
# 1. Install chromedriver.
279-
280-
# 2. Add the competition description file path to the `.env` file.
281-
mkdir -p ./git_ignore_folder/kaggle_data
282-
dotenv set DS_LOCAL_DATA_PATH "$(pwd)/git_ignore_folder/kaggle_data"
311+
# 1. Configure environment variables in the `.env` file
312+
mkdir -p ./git_ignore_folder/ds_data
313+
dotenv set DS_LOCAL_DATA_PATH "$(pwd)/git_ignore_folder/ds_data"
314+
dotenv set DS_CODER_ON_WHOLE_PIPELINE True
283315
dotenv set DS_IF_USING_MLE_DATA True
316+
dotenv set DS_SAMPLE_DATA_BY_LLM True
317+
dotenv set DS_SCEN rdagent.scenarios.data_science.scen.KaggleScen
284318
285-
# 3. run the application
286-
rdagent data_science --competition sf-crime
319+
# 2. run the application
320+
rdagent data_science --competition tabular-playground-series-dec-2021
287321
```
288322
289323
### 🖥️ Monitor the Application Results
290324
- You can run the following command for our demo program to see the run logs.
291325
292326
```sh
293-
rdagent ui --port 19899 --log_dir <your log folder like "log/">
327+
rdagent ui --port 19899 --log_dir <your log folder like "log/"> --data_science <True or False>
294328
```
295329
296-
**Note:** Although port 19899 is not commonly used, but before you run this demo, you need to check if port 19899 is occupied. If it is, please change it to another port that is not occupied.
330+
- About the `data_science` parameter: If you want to see the logs of the data science scenario, set the `data_science` parameter to `True`; otherwise set it to `False`.
331+
332+
- Although port 19899 is not commonly used, but before you run this demo, you need to check if port 19899 is occupied. If it is, please change it to another port that is not occupied.
297333
298334
You can check if a port is occupied by running the following command.
299335
300336
```sh
301-
rdagent health_check
337+
rdagent health_check --no-check-env --no-check-docker
302338
```
303339
304340
# 🏭 Scenarios

constraints/3.10.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ psutil==6.1.0
55
rich==13.9.2
66
scipy==1.14.1
77
tqdm==4.66.5
8-
litellm==1.72.4

constraints/3.11.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ psutil==6.1.0
55
rich==13.9.2
66
scipy==1.14.1
77
tqdm==4.66.5
8-
litellm==1.72.4

docs/installation_and_configuration.rst

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,46 @@ Besides, when you are using reasoning models, the response might include the tho
107107
108108
For more details on LiteLLM requirements, refer to the `official LiteLLM documentation <https://docs.litellm.ai/docs>`_.
109109

110+
Configuration Example 2: Azure OpenAI Setup
111+
-------------------------------------------
112+
Here’s a sample configuration specifically for Azure OpenAI, based on the `official LiteLLM documentation <https://docs.litellm.ai/docs>`_:
113+
114+
If you're using Azure OpenAI, below is a working example using the Python SDK, following the `LiteLLM Azure OpenAI documentation <https://docs.litellm.ai/docs/providers/azure/>`_:
115+
116+
.. code-block:: Properties
117+
118+
from litellm import completion
119+
import os
120+
121+
# Set Azure OpenAI environment variables
122+
os.environ["AZURE_API_KEY"] = "<your_azure_api_key>"
123+
os.environ["AZURE_API_BASE"] = "<your_azure_api_base>"
124+
os.environ["AZURE_API_VERSION"] = "<version>"
125+
126+
# Make a request to your Azure deployment
127+
response = completion(
128+
"azure/<your_deployment_name>",
129+
messages = [{ "content": "Hello, how are you?", "role": "user" }]
130+
)
131+
132+
To align with the Python SDK example above, you can configure the `CHAT_MODEL` based on the `response` model setting and use the corresponding `os.environ` variables by writing them into your local `.env` file as follows:
133+
134+
.. code-block:: Properties
135+
136+
cat << EOF > .env
137+
# CHAT MODEL: Azure OpenAI via LiteLLM
138+
CHAT_MODEL=azure/<your_deployment_name>
139+
AZURE_API_BASE=https://<your_azure_base>.openai.azure.com/
140+
AZURE_API_KEY=<your_azure_api_key>
141+
AZURE_API_VERSION=<version>
142+
143+
# EMBEDDING MODEL: Using SiliconFlow via litellm_proxy
144+
EMBEDDING_MODEL=litellm_proxy/BAAI/bge-large-en-v1.5
145+
LITELLM_PROXY_API_KEY=<your_siliconflow_api_key>
146+
LITELLM_PROXY_API_BASE=https://api.siliconflow.cn/v1
147+
EOF
148+
149+
This configuration allows you to call Azure OpenAI through LiteLLM while using an external provider (e.g., SiliconFlow) for embeddings.
110150

111151
Configuration(deprecated)
112152
=========================

0 commit comments

Comments
 (0)