ADAPT-Chase commited on
Commit
6a6070f
Β·
verified Β·
1 Parent(s): 2c929b1

Upload documentation/README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. documentation/README.md +203 -0
documentation/README.md ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Corpus Data Directory
2
+
3
+ ## Location
4
+ `/data/adaptai/corpus-data`
5
+
6
+ ## Purpose
7
+ This directory serves as the central storage location for all corpus data pulled from Nebius S3 and other sources. It is the primary input directory for the bleeding-edge ETL pipeline.
8
+
9
+ ## Data Organization
10
+
11
+ ### Directory Structure
12
+ ```
13
+ /data/adaptai/corpus-data/
14
+ β”œβ”€β”€ nebius-oscar/ # OSCAR corpus from Nebius S3
15
+ β”‚ β”œβ”€β”€ unsharded/ # Unsharded multilingual data
16
+ β”‚ β”œβ”€β”€ wikipedia/ # Wikipedia dumps
17
+ β”‚ └── commoncrawl/ # Common Crawl data
18
+ β”œβ”€β”€ mounted-s3/ # Symlinks to mounted S3 buckets
19
+ β”‚ β”œβ”€β”€ oscar-corpus -> /mnt/s3/oscar-corpus
20
+ β”‚ └── other-buckets/ # Additional S3 buckets
21
+ β”œβ”€β”€ processed/ # Processed data ready for analysis
22
+ β”‚ β”œβ”€β”€ flowetl-transformed/ # FlowETL processed files
23
+ β”‚ └── cleaned/ # Cleaned and normalized data
24
+ └── backups/ # Corpus data backups
25
+ └── YYYY-MM-DD/ # Date-based backup folders
26
+ ```
27
+
28
+ ## Data Sources
29
+
30
+ ### Primary Sources
31
+ 1. **Nebius S3 - OSCAR Corpus**
32
+ - Open Super-large Crawled Aggregated coRpus
33
+ - 100+ languages
34
+ - Petabyte-scale multilingual data
35
+ - Real-time streaming capability
36
+
37
+ 2. **Wikipedia Dumps**
38
+ - Multilingual Wikipedia articles
39
+ - Structured text data
40
+ - Regular updates
41
+
42
+ 3. **Common Crawl**
43
+ - Web crawl data
44
+ - Diverse content types
45
+ - Massive scale
46
+
47
+ ### Integration Methods
48
+
49
+ #### Direct Mount (Recommended)
50
+ ```bash
51
+ # Mount Nebius S3 buckets
52
+ s3fs oscar-corpus /mnt/s3/oscar-corpus -o url=https://storage.yandexcloud.net
53
+
54
+ # Access data through symlinks
55
+ ls -la /data/adaptai/corpus-data/mounted-s3/
56
+ ```
57
+
58
+ #### Automated Pull Script
59
+ ```bash
60
+ # Use the automated puller
61
+ python3 /data/adaptai/bleeding-edge-etl/nebius_s3_mount.py
62
+
63
+ # Environment variables required:
64
+ export Nebius_ACCESS_KEY=your_access_key
65
+ export Nebius_SECRET_KEY=your_secret_key
66
+ ```
67
+
68
+ #### Manual Download
69
+ ```bash
70
+ # For specific file downloads
71
+ aws s3 sync s3://oscar-corpus/unsharded/ /data/adaptai/corpus-data/nebius-oscar/unsharded/
72
+ ```
73
+
74
+ ## Processing Pipeline
75
+
76
+ ### FlowETL Integration
77
+ Corpus data in this directory is automatically processed by:
78
+ 1. **FlowETL** - Autonomous transformations
79
+ 2. **Apache NiFi** - Orchestration and flow management
80
+ 3. **Apache Drill** - Schema-free querying
81
+ 4. **CWB/ANNIS** - Linguistic analysis
82
+
83
+ ### Data Flow
84
+ ```
85
+ Nebius S3 β†’ /data/adaptai/corpus-data/ β†’ FlowETL β†’ Processed Data β†’ Analysis
86
+ ```
87
+
88
+ ## Storage Requirements
89
+
90
+ ### Capacity
91
+ - **Initial**: 10TB+ for sample datasets
92
+ - **Production**: 100TB+ for full corpus processing
93
+ - **Scalable**: Designed for petabyte-scale growth
94
+
95
+ ### Performance
96
+ - **SSD Storage**: /data partition optimized for high I/O
97
+ - **Memory Caching**: DragonFly/Redis for frequent access
98
+ - **Network**: High-throughput connectivity to Nebius S3
99
+
100
+ ## Access Patterns
101
+
102
+ ### Read Access
103
+ - FlowETL transformation engine
104
+ - Apache Drill for SQL queries
105
+ - CWB/ANNIS for linguistic analysis
106
+ - Research and development tools
107
+
108
+ ### Write Access
109
+ - Automated S3 sync processes
110
+ - Manual data ingestion
111
+ - Processing pipeline outputs
112
+ - Backup and archival systems
113
+
114
+ ## Backup Strategy
115
+
116
+ ### Automated Backups
117
+ ```bash
118
+ # Daily incremental backups
119
+ rsync -av --delete /data/adaptai/corpus-data/ /backup/corpus-data/daily/
120
+
121
+ # Weekly full backups
122
+ tar -czf /backup/corpus-data/weekly/$(date +%Y-%m-%d).tar.gz /data/adaptai/corpus-data/
123
+ ```
124
+
125
+ ### Cloud Backup
126
+ - Regular sync to Nebius S3 for disaster recovery
127
+ - Versioned backups for data recovery
128
+ - Geographic redundancy
129
+
130
+ ## Security
131
+
132
+ ### Access Control
133
+ - Role-based permissions
134
+ - Audit logging
135
+ - Encryption at rest and in transit
136
+
137
+ ### Data Protection
138
+ - Anonymization where required
139
+ - Compliance with usage agreements
140
+ - Regular security audits
141
+
142
+ ## Monitoring
143
+
144
+ ### Health Checks
145
+ ```bash
146
+ # Disk space monitoring
147
+ df -h /data/adaptai/corpus-data
148
+
149
+ # Data integrity checks
150
+ find /data/adaptai/corpus-data -name "*.jsonl" -exec jsonschema -i {} \;
151
+
152
+ # Access monitoring
153
+ inotifywait -m -r /data/adaptai/corpus-data
154
+ ```
155
+
156
+ ### Performance Metrics
157
+ - Throughput: GB/s processed
158
+ - Latency: End-to-end processing time
159
+ - Quality: Data validation results
160
+ - Utilization: Storage capacity metrics
161
+
162
+ ## Troubleshooting
163
+
164
+ ### Common Issues
165
+ 1. **Permission Denied**
166
+ ```bash
167
+ sudo chown -R $(whoami):$(whoami) /data/adaptai/corpus-data
168
+ ```
169
+
170
+ 2. **Disk Space Full**
171
+ ```bash
172
+ # Clean up temporary files
173
+ find /data/adaptai/corpus-data -name "*.tmp" -delete
174
+ ```
175
+
176
+ 3. **S3 Mount Failed**
177
+ ```bash
178
+ # Check credentials
179
+ cat /etc/passwd-s3fs
180
+
181
+ # Remount
182
+ sudo umount /mnt/s3/*
183
+ sudo s3fs oscar-corpus /mnt/s3/oscar-corpus -o url=https://storage.yandexcloud.net
184
+ ```
185
+
186
+ ## Related Components
187
+
188
+ ### ETL Pipeline
189
+ - **FlowETL**: `/data/adaptai/bleeding-edge-etl/flowetl/`
190
+ - **Apache NiFi**: `/data/adaptai/bleeding-edge-etl/nifi/`
191
+ - **Apache Drill**: `/data/adaptai/bleeding-edge-etl/drill/`
192
+ - **CWB/ANNIS**: `/data/adaptai/bleeding-edge-etl/corpus-analysis/`
193
+
194
+ ### Infrastructure
195
+ - **Nebius S3**: Cloud object storage
196
+ - **DragonFly**: High-performance cache
197
+ - **Redis**: Traditional caching
198
+ - **Qdrant**: Vector database for analysis
199
+
200
+ ---
201
+ **Maintained by**: ETL Team - Bleeding-Edge Corpus Aggregation
202
+ **Last Updated**: August 24, 2025
203
+ **Status**: ACTIVE - Ready for Data Ingestion