feat: 데이터 저장 경로를 model_Dev/data로 업데이트

This commit is contained in:
2025-08-28 10:26:29 +09:00
parent fdf330143f
commit bed6ce22f5
3 changed files with 28 additions and 10 deletions

View File

@@ -13,6 +13,6 @@
"data_storage": {
"local_storage_path": "./collected_data",
"file_format": "json",
"drive_mount_path": "/content/drive/MyDrive/AI_Data"
"drive_mount_path": "/content/drive/MyDrive/model_Dev/data"
}
}

View File

@@ -9,6 +9,7 @@ def main():
parser.add_argument('--topics', nargs='+', help='수집할 주제 목록', default=None)
parser.add_argument('--config', default='./config.json', help='설정 파일 경로')
parser.add_argument('--auto-topics', action='store_true', help='AI가 스스로 주제를 선정하여 조사')
parser.add_argument('--save-path', help='데이터 저장 경로 (예: /content/drive/MyDrive/MyFolder)', default=None)
args = parser.parse_args()
@@ -22,7 +23,18 @@ def main():
print("모델 다운로드 실패. 프로그램을 종료합니다.")
sys.exit(1)
# 2. AI 에이전트 초기화
# 2. 설정 파일 로드 및 수정
with open(args.config, 'r') as f:
config = json.load(f)
if args.save_path:
config['data_storage']['drive_mount_path'] = args.save_path
# 수정된 config 저장
with open(args.config, 'w') as f:
json.dump(config, f, indent=2)
print(f"저장 경로 설정됨: {args.save_path}")
# 3. AI 에이전트 초기화
print("AI 에이전트 초기화 중...")
agent = AIAgent(args.config)

View File

@@ -50,18 +50,18 @@ drive.mount('/content/drive')
!pip install -r requirements.txt
```
### 2.2 설정 파일 수정
`config.json` 파일을 열어서 다음 항목들을 수정:
### 2.2 설정 파일 수정 (선택사항)
기본적으로 데이터는 `/content/drive/MyDrive/AI_Data`에 저장됩니다. 다른 경로를 원하시면 `config.json``drive_mount_path`를 수정하세요:
```json
{
"google_drive_folder_id": "YOUR_ACTUAL_FOLDER_ID",
"google_credentials_path": "./credentials.json"
"data_storage": {
"drive_mount_path": "/content/drive/MyDrive/MyCustomFolder"
}
}
```
### 2.3 인증 파일 업로드
- `credentials.json` 파일을 Colab에 업로드
- Google Drive 인증 시 브라우저 팝업이 나타나면 허용
또는 실행 시 `--save-path` 옵션으로 지정할 수 있습니다.
## 3. 시스템 실행
@@ -86,12 +86,18 @@ python main.py --topics "인공지능" "머신러닝" "딥러닝"
python main.py --config ./custom_config.json
```
### 3.5 저장 경로 지정
```bash
python main.py --save-path "/content/drive/MyDrive/MyCustomFolder"
```
이렇게 하면 데이터를 지정한 폴더에 저장합니다.
## 4. 실행 과정 설명
1. **모델 다운로드**: Hugging Face에서 `jxm/gpt-oss-20b-base` 모델을 다운로드
2. **AI 에이전트 초기화**: 모델을 로드하고 도구들을 설정
3. **정보 수집**: 각 주제에 대해 AI가 스스로 웹을 탐색하며 정보 수집
4. **데이터 저장**: 수집된 데이터를 마운트된 Google Drive의 `/content/drive/MyDrive/AI_Data` 폴더에 자동 저장
4. **데이터 저장**: 수집된 데이터를 마운트된 Google Drive의 지정된 폴더에 자동 저장
## 5. 모니터링 및 디버깅