Ciroc0 commited on
Commit
18efa2c
Β·
verified Β·
1 Parent(s): 8c04aa9

Add README with HF configuration

Browse files
Files changed (1) hide show
  1. README.md +20 -53
README.md CHANGED
@@ -1,66 +1,33 @@
1
- # ArcaThread Processor
 
 
 
 
 
 
 
 
2
 
3
- Pre-computes champion statistics from matchup-matrix data for fast tier list generation.
4
 
5
- ## What it does
6
 
7
- 1. **Scans matchup-matrix** for latest patches every hour
8
- 2. **Aggregates data** per champion (win rates, matchups, by role/rank)
9
- 3. **Generates JSON files** at `champ-stats/{patch}/{champion_id}.json`
10
- 4. **Creates tier list** at `champ-stats/{patch}/tier-list.json`
11
 
12
  ## Output Structure
13
 
14
  ```
15
- champ-stats/
16
- β”œβ”€β”€ 16.4/
17
- β”‚ β”œβ”€β”€ meta.json # Patch metadata
18
- β”‚ β”œβ”€β”€ tier-list.json # Sorted tier list
19
- β”‚ β”œβ”€β”€ 266.json # Aatrox stats
20
- β”‚ β”œβ”€β”€ 103.json # Ahri stats
21
- β”‚ └── ...
22
- β”œβ”€β”€ 16.3/
23
- β”‚ └── ...
24
  ```
25
 
26
- ## Champion Stats Format
27
 
28
- ```json
29
- {
30
- "champion_id": 266,
31
- "total_games": 15420,
32
- "win_rate": 0.5234,
33
- "by_role": {
34
- "TOP": {"games": 12000, "win_rate": 0.5240},
35
- "JUNGLE": {"games": 3420, "win_rate": 0.5210}
36
- },
37
- "by_rank": {
38
- "DIAMOND": {"games": 3000, "win_rate": 0.5100},
39
- "MASTER": {"games": 1500, "win_rate": 0.5050}
40
- },
41
- "matchups": [
42
- {"enemy_champion_id": 54, "games": 500, "win_rate": 0.4800},
43
- ...
44
- ]
45
- }
46
- ```
47
 
48
  ## Environment Variables
49
 
50
- | Variable | Default | Description |
51
- |----------|---------|-------------|
52
- | `HF_TOKEN` | (required) | HuggingFace API token |
53
- | `DATASET_REPO` | `ArcaThread/arca-thread-priors` | Target dataset |
54
- | `PROCESS_INTERVAL_SECONDS` | `3600` | Run interval (1 hour) |
55
- | `MIN_SAMPLE_SIZE` | `100` | Minimum games for inclusion |
56
-
57
- ## API Endpoints
58
-
59
- - `GET /` - Basic info
60
- - `GET /health` - Status and stats
61
- - `GET /trigger` - Manually trigger processing
62
- - `GET /patch/{patch}` - Patch processing status
63
-
64
- ## Deployment
65
-
66
- Deploy to HuggingFace Spaces as a Docker space. Set `HF_TOKEN` as a secret.
 
1
+ ---
2
+ title: Arca Processor
3
+ emoji: πŸ”„
4
+ colorFrom: blue
5
+ colorTo: indigo
6
+ sdk: docker
7
+ app_file: app.py
8
+ pinned: false
9
+ ---
10
 
11
+ # Arca Processor
12
 
13
+ Pre-computed champion stats generator for ArcaThread.
14
 
15
+ ## Purpose
16
+
17
+ This space processes matchup-matrix parquet files from `arca-thread-priors` dataset and generates lightweight JSON files per champion.
 
18
 
19
  ## Output Structure
20
 
21
  ```
22
+ champ-stats/{patch}/{championName}.json
23
+ champ-stats/{patch}/tier-list.json
 
 
 
 
 
 
 
24
  ```
25
 
26
+ ## Schedule
27
 
28
+ Runs hourly to detect new patches and update stats.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
  ## Environment Variables
31
 
32
+ - `HF_TOKEN` - HuggingFace API token
33
+ - `DATASET_REPO` - Source dataset (default: ArcaThread/arca-thread-priors)