nice-bill commited on
Commit
b96e9c6
·
1 Parent(s): 9a3e23b

cluster model routine training added

Browse files
.github/workflows/weekly_retrain.yml ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Weekly Model Retraining
2
+
3
+ on:
4
+ schedule:
5
+ # Run at 00:00 every Monday
6
+ - cron: '0 0 * * 1'
7
+ workflow_dispatch: # Allow manual trigger for testing
8
+
9
+ jobs:
10
+ retrain:
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ contents: write # Needed to push changes back to the repo
14
+
15
+ steps:
16
+ - name: Checkout repository
17
+ uses: actions/checkout@v4
18
+
19
+ - name: Install uv
20
+ uses: astral-sh/setup-uv@v5
21
+ with:
22
+ version: "0.4.15"
23
+
24
+ - name: Set up Python
25
+ uses: actions/setup-python@v5
26
+ with:
27
+ python-version: "3.12"
28
+
29
+ - name: Install dependencies
30
+ run: |
31
+ cd cluster
32
+ uv sync
33
+
34
+ - name: Fetch new data from Dune
35
+ env:
36
+ DUNE_API_KEY: ${{ secrets.DUNE_API_KEY }}
37
+ run: |
38
+ cd cluster
39
+ uv run request.py
40
+
41
+ - name: Retrain Model
42
+ run: |
43
+ cd cluster
44
+ uv run train.py
45
+
46
+ - name: Update Visualizations
47
+ run: |
48
+ cd cluster
49
+ uv run visualize_clusters.py
50
+
51
+ - name: Commit and Push changes
52
+ uses: stefanzweifel/git-auto-commit-action@v5
53
+ with:
54
+ commit_message: "Weekly Model Retraining: Updated data and artifacts"
55
+ file_pattern: "cluster/data/* cluster/*.csv cluster/*.pkl cluster/docs/*.png"
56
+ branch: main
.gitignore CHANGED
@@ -11,4 +11,6 @@ wheels/
11
 
12
  .env
13
 
14
- PROJECT_LOG.md
 
 
 
11
 
12
  .env
13
 
14
+ PROJECT_LOG.md
15
+ CONTRIBUTION_ROADMAP.md
16
+ DRAFT_ISSUE.md
clustering_models.ipynb CHANGED
The diff for this file is too large to render. See raw diff