GFiaMon commited on
Commit
689788f
·
1 Parent(s): ce49379

Updated: requirement.txt some deppendencies needed newer versions

Browse files
Files changed (3) hide show
  1. REQUIREMENTS_FIX.md +68 -0
  2. requirements.txt +47 -14
  3. requirements_comparison.md +77 -0
REQUIREMENTS_FIX.md ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Requirements.txt Fix Summary
2
+
3
+ ## The Bug
4
+ **Error**: `ModuleNotFoundError: No module named 'langchain_core.messages.content'`
5
+
6
+ **Root Cause**: Version incompatibility between `langchain-mcp-adapters>=0.1.0` and `langchain-core>=0.3.0`. The older versions of langchain-core don't have the `messages.content` module that the MCP adapters require.
7
+
8
+ ## Critical Changes Made
9
+
10
+ ### 1. Fixed LangChain Version Constraints (CRITICAL FIX)
11
+ ```diff
12
+ - langchain-core>=0.3.0
13
+ + langchain-core>=0.3.80,<0.4.0
14
+
15
+ - langchain-mcp-adapters>=0.1.0
16
+ + langchain-mcp-adapters>=0.1.14,<0.2.0
17
+
18
+ - openai>=1.50.0
19
+ + openai>=2.0.0,<3.0.0
20
+
21
+ - pinecone-client>=5.0.0
22
+ + pinecone-client>=6.0.0
23
+
24
+ - tiktoken>=0.8.0
25
+ + tiktoken>=0.10.0,<1.0.0
26
+ ```
27
+
28
+ ### 2. Added Pyannote Specific Versions
29
+ ```python
30
+ pyannote.audio==3.4.0
31
+ pyannote.core==5.0.0
32
+ pyannote.database==5.1.3
33
+ pyannote.metrics==3.2.1
34
+ pyannote.pipeline==3.0.1
35
+ pyannoteai-sdk==0.3.0
36
+ ```
37
+
38
+ ### 3. Added PyTorch Audio Processing
39
+ ```python
40
+ torch-audiomentations>=0.11.0
41
+ torch_pitch_shift>=1.2.0
42
+ torchmetrics>=1.0.0
43
+ av>=10.0.0
44
+ pydub>=0.25.0
45
+ ```
46
+
47
+ ### 4. Added ML/NLP Dependencies (Required by pyannote/whisperx)
48
+ ```python
49
+ transformers>=4.30.0
50
+ tokenizers>=0.13.0
51
+ sentencepiece>=0.1.99
52
+ speechbrain>=0.5.0
53
+ pytorch-lightning>=2.0.0
54
+ pytorch-metric-learning>=2.0.0
55
+ einops>=0.6.0
56
+ omegaconf>=2.3.0
57
+ HyperPyYAML>=1.2.0
58
+ asteroid-filterbanks>=0.4.0
59
+ julius>=0.2.0
60
+ onnxruntime>=1.15.0
61
+ protobuf>=4.0.0
62
+ ```
63
+
64
+ ## Testing
65
+ After deploying with the updated requirements.txt, the error should be resolved and MCP tools should load successfully.
66
+
67
+ ## Why This Happened
68
+ The original requirements.txt used loose version constraints (e.g., `>=0.3.0` without upper bounds) which allowed pip to install incompatible combinations of packages. The fixed version pins minimum versions that are known to work together from your local environment.
requirements.txt CHANGED
@@ -14,33 +14,66 @@ websockets>=12.0
14
  # =================================================================
15
  whisperx>=3.1.1
16
  faster-whisper>=1.0.0
17
- pyannote.audio>=3.1.1
 
 
 
 
 
 
 
 
 
18
  torch>=2.0.0
19
  torchaudio>=2.0.0
 
 
 
 
 
20
  soundfile>=0.12.0
21
  ffmpeg-python>=0.2.0
 
 
22
 
23
  # =================================================================
24
  # AGENT & LOGIC (LangChain / LangGraph)
25
  # =================================================================
26
- langchain>=0.3.0
27
- langchain-community>=0.3.0
28
- langchain-core>=0.3.0
29
- langchain-openai>=0.3.0
30
- langchain-pinecone>=0.2.0
31
- langchain-text-splitters>=0.3.0
32
- langchain-mcp-adapters>=0.1.0
33
- langgraph>=0.2.0
34
- openai>=1.50.0
35
- pinecone-client>=5.0.0
36
- tiktoken>=0.8.0
37
  mcp>=1.0.0
38
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  # =================================================================
40
  # DATA & UTILITIES
41
  # Removed strict pinnings (like numpy==2.3.5) that don't exist on Docker
42
  # =================================================================
43
- numpy>=1.24.0,<2.3.0
44
  pandas>=2.0.0
45
  scipy>=1.10.0
46
  scikit-learn>=1.3.0
@@ -50,4 +83,4 @@ pytz>=2023.3
50
  tqdm>=4.66.0
51
  packaging>=23.0
52
  pyyaml>=6.0
53
- regex>=2023.0.0
 
14
  # =================================================================
15
  whisperx>=3.1.1
16
  faster-whisper>=1.0.0
17
+
18
+ # Pyannote with specific versions (critical for compatibility)
19
+ pyannote.audio==3.4.0
20
+ pyannote.core==5.0.0
21
+ pyannote.database==5.1.3
22
+ pyannote.metrics==3.2.1
23
+ pyannote.pipeline==3.0.1
24
+ pyannoteai-sdk==0.3.0
25
+
26
+ # PyTorch
27
  torch>=2.0.0
28
  torchaudio>=2.0.0
29
+ torch-audiomentations>=0.11.0
30
+ torch_pitch_shift>=1.2.0
31
+ torchmetrics>=1.0.0
32
+
33
+ # Audio processing
34
  soundfile>=0.12.0
35
  ffmpeg-python>=0.2.0
36
+ av>=10.0.0
37
+ pydub>=0.25.0
38
 
39
  # =================================================================
40
  # AGENT & LOGIC (LangChain / LangGraph)
41
  # =================================================================
42
+ langchain>=0.3.0,<0.4.0
43
+ langchain-community>=0.3.0,<0.4.0
44
+ langchain-core>=0.3.80,<0.4.0
45
+ langchain-openai>=0.3.0,<0.4.0
46
+ langchain-pinecone>=0.2.0,<0.3.0
47
+ langchain-text-splitters>=0.3.0,<0.4.0
48
+ langchain-mcp-adapters>=0.1.14,<0.2.0
49
+ langgraph>=0.2.0,<0.3.0
50
+ openai>=2.0.0,<3.0.0
51
+ pinecone-client>=6.0.0
52
+ tiktoken>=0.10.0,<1.0.0
53
  mcp>=1.0.0
54
 
55
+ # =================================================================
56
+ # ML & NLP DEPENDENCIES (Required by pyannote/whisperx)
57
+ # =================================================================
58
+ transformers>=4.30.0
59
+ tokenizers>=0.13.0
60
+ sentencepiece>=0.1.99
61
+ speechbrain>=0.5.0
62
+ pytorch-lightning>=2.0.0
63
+ pytorch-metric-learning>=2.0.0
64
+ einops>=0.6.0
65
+ omegaconf>=2.3.0
66
+ HyperPyYAML>=1.2.0
67
+ asteroid-filterbanks>=0.4.0
68
+ julius>=0.2.0
69
+ onnxruntime>=1.15.0
70
+ protobuf>=4.0.0
71
+
72
  # =================================================================
73
  # DATA & UTILITIES
74
  # Removed strict pinnings (like numpy==2.3.5) that don't exist on Docker
75
  # =================================================================
76
+ numpy>=1.24.0,<2.4.0
77
  pandas>=2.0.0
78
  scipy>=1.10.0
79
  scikit-learn>=1.3.0
 
83
  tqdm>=4.66.0
84
  packaging>=23.0
85
  pyyaml>=6.0
86
+ regex>=2023.0.0
requirements_comparison.md ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Requirements.txt Comparison Analysis
2
+
3
+ ## Critical Missing Dependencies in HF requirements.txt
4
+
5
+ ### 1. **Pyannote Specific Versions** (CRITICAL)
6
+ The HF requirements.txt has `pyannote.audio>=3.1.1` but the working version uses specific pinned versions:
7
+ ```
8
+ pyannote.audio==3.4.0
9
+ pyannote.core==5.0.0
10
+ pyannote.database==5.1.3
11
+ pyannote.metrics==3.2.1
12
+ pyannote.pipeline==3.0.1
13
+ pyannoteai-sdk==0.3.0
14
+ ```
15
+
16
+ ### 2. **OpenAI Version Mismatch** (CRITICAL)
17
+ - HF: `openai>=1.50.0`
18
+ - Working: `openai>=2.0.0,<3.0.0` (actual: 2.8.1)
19
+
20
+ ### 3. **Pinecone Version Mismatch** (CRITICAL)
21
+ - HF: `pinecone-client>=5.0.0`
22
+ - Working: `pinecone-client>=6.0.0` (actual: 6.0.0)
23
+
24
+ ### 4. **Tiktoken Version Mismatch**
25
+ - HF: `tiktoken>=0.8.0`
26
+ - Working: `tiktoken>=0.10.0,<1.0.0` (actual: 0.12.0)
27
+
28
+ ### 5. **Missing Dependencies** (Not in HF requirements.txt)
29
+ These packages are installed in the working venv but not specified in HF requirements:
30
+ - `lightning==2.5.6`
31
+ - `pytorch-lightning==2.5.6`
32
+ - `pytorch-metric-learning==2.9.0`
33
+ - `speechbrain==1.0.3`
34
+ - `sentencepiece==0.2.1`
35
+ - `transformers==4.57.3`
36
+ - `tokenizers==0.22.1`
37
+ - `tensorboardX==2.6.4`
38
+ - `einops==0.8.1`
39
+ - `omegaconf==2.3.0`
40
+ - `HyperPyYAML==1.2.2`
41
+ - `asteroid-filterbanks==0.4.0`
42
+ - `julius==0.2.7`
43
+ - `onnxruntime==1.23.2`
44
+ - `protobuf==6.33.1`
45
+ - `coloredlogs==15.0.1`
46
+ - `humanfriendly==10.0`
47
+
48
+ ### 6. **Torch Audio Processing Dependencies**
49
+ - `torch-audiomentations==0.12.0`
50
+ - `torch_pitch_shift==1.2.5`
51
+ - `torchcodec==0.7.0`
52
+ - `torchmetrics==1.8.2`
53
+
54
+ ### 7. **Additional Data Processing**
55
+ - `av==15.1.0` (for video processing)
56
+ - `imageio==2.37.2`
57
+ - `imageio-ffmpeg==0.6.0`
58
+ - `moviepy==2.2.1`
59
+ - `pydub==0.25.1`
60
+
61
+ ## Recommendations
62
+
63
+ ### High Priority (MUST FIX)
64
+ 1. Pin pyannote versions exactly as in working environment
65
+ 2. Update OpenAI to 2.x range
66
+ 3. Update Pinecone to 6.x
67
+ 4. Add transformers, tokenizers, sentencepiece (likely needed for model loading)
68
+ 5. Add speechbrain (likely needed by pyannote)
69
+
70
+ ### Medium Priority (SHOULD ADD)
71
+ 1. Add PyTorch ecosystem packages: pytorch-lightning, pytorch-metric-learning, torchmetrics
72
+ 2. Add audio processing: torch-audiomentations, torch_pitch_shift, torchcodec
73
+ 3. Add video processing: av, moviepy, imageio
74
+
75
+ ### Low Priority (OPTIONAL)
76
+ 1. Add logging utilities: coloredlogs, humanfriendly
77
+ 2. Add config management: omegaconf, HyperPyYAML