-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathconfig.yaml
More file actions
191 lines (172 loc) · 8.69 KB
/
config.yaml
File metadata and controls
191 lines (172 loc) · 8.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
# config.yaml - MIREX Auto Improver Configuration
# === サーバー設定 ===
server:
# MCPサーバーの動作設定 (環境変数 MCP_* で上書き可能)
poll_interval_seconds: 5 # クライアントがジョブ状態をポーリングする間隔 (秒)
job_timeout_seconds: 600 # ジョブの最大実行時間 (秒)
session_timeout_seconds: 3600 # セッションの有効期限 (秒)
request_timeout_seconds: 60 # クライアントからのリクエストタイムアウト (秒)
log_level: INFO # ログレベル (DEBUG, INFO, WARNING, ERROR, CRITICAL)
# port: 5002 # サーバーポート (uvicorn起動時に指定、環境変数 MCP_PORT)
# === パス設定 ===
# 注意: 各パスはプロジェクトルートからの相対パス、または絶対パスで指定。
# 環境変数 (MIREX_*) で上書き可能。
# ワークスペースパスは環境変数 MIREX_WORKSPACE またはデフォルト (./.mcp_server_data) で決まる。
paths:
# --- Source Code Paths ---
detectors_src: code/src/detectors
templates: code/src/templates # For paper/report generation
# --- Improved Versions Path ---
improved_versions: code/improved_versions
# --- Data Paths ---
# Base directory for all datasets
datasets_base: datasets
# --- Output Base Path ---
output_base: output
# --- Output Subdirectories ---
evaluation_results: output/evaluation_results
grid_search_results: output/grid_search_results
visualizations: output/visualizations
scientific_output: output/scientific_output
# --- Database Path ---
db: db
# === リソース制限 ===
resource_limits: {}
# 環境変数 MCP_* で上書き可能
# 以下のコメントアウトされた項目は core.configure_resource_limits や server 設定で管理されるため削除
# max_concurrent_jobs: auto
# max_jobs_history: 100
# llm_timeout: 180 # llm セクションに移動
# evaluation_timeout: 1200
# grid_search_timeout: 1800
# job_timeout: 600 # server.job_timeout_seconds を使用
# === 戦略と改善ループの設定 ===
strategy:
# サイクル決定の閾値設定
param_opt_stagnation_threshold: 3 # パラメータ最適化を試みるまでの停滞サイクル数
llm_strategy_stagnation_threshold: 5 # LLM戦略提案を試みるまでの停滞サイクル数
use_llm_strategy: true # LLM戦略提案を使用するかどうか
# 仮説生成設定
num_hypotheses: 3 # 生成する仮説の数
poor_performance_threshold: 0.5 # 性能が悪いと判断する閾値(これを下回ると仮説生成を優先)
# LLMコンテキスト設定
history_events_for_summary: 20 # プロンプトに含める履歴イベント数
# === 制限設定 ===
limits:
max_history_events_per_session: 1000 # セッション履歴の最大イベント数
# === クリーンアップ設定 ===
cleanup:
# 古いセッション・ジョブ、ワークスペースファイルの自動削除設定
interval_seconds: 3600 # クリーンアップ実行間隔 (秒)
# セッションクリーンアップ
session_timeout_seconds: 86400 # (1日) 非アクティブセッションのタイムアウト
max_sessions_count: 100 # 最大保持セッション数 (古いものから削除)
# ジョブクリーンアップ
job_stuck_timeout_seconds: 3600 # (1時間) 実行中から進まないジョブのタイムアウト
job_completed_retention_seconds: 604800 # (7日) 完了/失敗ジョブの保持期間
max_jobs_count: 500 # 最大保持ジョブ数 (古いものから削除)
# ワークスペースファイルクリーンアップ
# 注意: ここで指定するのは `output_base` 内のサブディレクトリを識別するためのパターン (glob形式) か、
# あるいは空リストにしておき、`clean_workspace.py` (またはサーバー内のクリーンアップロジック) に
# タイムスタンプベースの削除を任せる。今回は後者を採用する。
workspace:
enabled: true
retention_days: 14 # 指定日数より古いファイルを `output_base` 内から削除
# target_dirs: [] # Removed - Logic targets output_base directly
# === 評価設定 ===
evaluation:
default_dataset: synthesized_v1 # デフォルトで使用するデータセット名
default_metrics: ["note.*", "onset.*"] # デフォルトで計算するメトリック
primary_metric: "note.f_measure" # 改善度判定に使用するプライマリメトリック
save_plots: true
save_results_json: true
# 評価スクリプト固有の設定 (例: mir_eval の許容誤差など)
mir_eval_options:
onset_tolerance: 0.05 # 50ms
pitch_tolerance: 50.0 # 50 cents
# ... 他の mir_eval オプション ...
# === グリッドサーチ設定 ===
grid_search:
default_best_metric: note.f_measure
default_n_jobs: -1 # 利用可能な全コアを使用 (-1), 1でシングルコア
# デフォルトのパラメータ範囲 (アルゴリズムごとに定義可能)
# default_param_grid:
# param_x: [0.1, 0.5, 1.0]
# param_y: [10, 20, 30]
# === LLM 設定 ===
llm:
# クライアント設定 (環境変数での上書きを推奨)
client_type: "ClaudeClient" # 使用するクライアントクラス (ClaudeClient, OpenAIClient)
# API キーはホスト側(CLI/GUI)で管理され、LLM との直接対話に使用されます
# api_key と api_key_openai は MCP サーバー側では不要になりました
# ホスト側では環境変数(ANTHROPIC_API_KEY/OPENAI_API_KEY)または設定ファイルで管理してください
model: "claude-3-opus-20240229" # 使用するモデル名
# --- Claude Specific --- #
api_base: "https://api.anthropic.com"
api_version: "2023-06-01"
# --- OpenAI Specific --- #
# api_base_openai: "https://api.openai.com/v1"
# --- Common --- #
max_tokens: 128000 # 生成最大トークン数
timeout: ${MCP_LLM_TIMEOUT:-180} # API呼び出しタイムアウト(秒、環境変数優先)
# retry_attempts: 3 # リトライ回数 (exception_utils で設定可能)
# retry_delay: 1 # リトライ遅延 (秒, exception_utils で設定可能)
# --- Desktop Mode (Optional, use environment vars) --- #
# desktop_mode: ${CLAUDE_DESKTOP_MODE:-false}
# desktop_url: ${CLAUDE_DESKTOP_URL:-http://localhost:5000}
# === データセット定義 ===
datasets:
synthesized_v1:
description: "基本パターンを含む合成データセット"
# パスは paths.datasets_base からの相対パス、または絶対パス
# path_utils.get_dataset_paths() で処理される
audio_dir: synthesized_v1/audio # 相対パス (datasets_base 基準)
label_dir: synthesized_v1/labels # 相対パス (datasets_base 基準)
audio_pattern: '*.wav'
label_pattern: '*.csv'
# --- 他のデータセット例 --- #
# medleydb_melody:
# description: "MedleyDB メロディサブセット"
# datasets_base: /path/to/your/medleydb # このデータセット固有のベースパス指定も可能
# audio_dir: audio/subset
# label_dir: annotations/melody1
# audio_pattern: '*.wav'
# label_pattern: '*_MELODY1.csv'
# Configuration for evaluation datasets
# dataset_name: Path to audio and reference/label files
synthetic_v1:
audio_dir: "synthetic_v1/audio"
label_dir: "synthetic_v1/labels"
filelist: null # Optional: Path to a file listing specific files to use
synthetic_poly_v1:
audio_dir: "synthetic_poly_v1/audio"
label_dir: "synthetic_poly_v1/labels"
filelist: null
# --- 追加: MedleyDB (v1 or v2) Example --- #
# User needs to set the actual path to their MedleyDB dataset root
medleydb_v1:
audio_dir: "/path/to/your/MedleyDB/V1/Audio"
label_dir: "/path/to/your/MedleyDB/V1/Annotations/Melody_Annotations/MELODY1"
label_format: "melody1" # Special identifier for MedleyDB melody format
filelist: null # Or specify a subset file if needed
medleydb_v2:
audio_dir: "/path/to/your/MedleyDB/V2/Audio"
label_dir: "/path/to/your/MedleyDB/V2/Annotations/Melody_Annotations/MELODY2"
label_format: "melody2" # Special identifier for MedleyDB melody format 2
filelist: null
# --- 追加: MIREX Melody Example --- #
# Assumes audio and ref files are in the same directory, named like <stem>.wav and <stem>.csv/txt
mirex_melody_example:
audio_dir: "/path/to/your/mirex_data"
label_dir: "/path/to/your/mirex_data"
label_format: "mirex_melody" # Special identifier for MIREX melody format (csv/txt)
audio_ext: ".wav"
label_ext: ".csv" # or ".txt"
filelist: null
# Add other standard datasets here as needed...
# === 検出器デフォルトパラメータ (任意) ===
# detectors:
# CriteriaDetector:
# param_a: 0.5
# PZSTDDetector:
# threshold: 0.7