Spaces:
Sleeping
Sleeping
finalzing training
Browse files- .github/workflows/training.yml +47 -0
- header.png +0 -0
- llm-tagging.py +1 -1
- train.py +1 -1
.github/workflows/training.yml
ADDED
@@ -0,0 +1,47 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
name: training script
|
2 |
+
|
3 |
+
on:
|
4 |
+
workflow_dispatch:
|
5 |
+
schedule:
|
6 |
+
# Run every 30 minutes
|
7 |
+
#- cron: '*/30 * * * *'
|
8 |
+
- cron: '0 1 * * 1'
|
9 |
+
|
10 |
+
jobs:
|
11 |
+
run-scraper:
|
12 |
+
runs-on: ubuntu-latest
|
13 |
+
|
14 |
+
steps:
|
15 |
+
- name: Checkout repository
|
16 |
+
uses: actions/checkout@v3
|
17 |
+
|
18 |
+
- name: Set up Python
|
19 |
+
uses: actions/setup-python@v4
|
20 |
+
with:
|
21 |
+
python-version: '3.11'
|
22 |
+
|
23 |
+
- name: Install dependencies
|
24 |
+
run: |
|
25 |
+
python -m pip install --upgrade pip
|
26 |
+
pip install -r all-requirements.txt
|
27 |
+
|
28 |
+
- name: Training
|
29 |
+
env:
|
30 |
+
RAPID_API_KEY: ${{ secrets.RAPID_API_KEY }}
|
31 |
+
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
|
32 |
+
run: |
|
33 |
+
python llm-tagging.py
|
34 |
+
python filter-faults.py
|
35 |
+
python train.py
|
36 |
+
- name: List tags folder
|
37 |
+
run: ls -R tags || echo "tags folder not found"
|
38 |
+
- name: Commit and Push Changes
|
39 |
+
run: |
|
40 |
+
git config --global user.name "github-actions[bot]"
|
41 |
+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
42 |
+
git add tags
|
43 |
+
git commit -m "Add tags generated by script"
|
44 |
+
git push
|
45 |
+
env:
|
46 |
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
47 |
+
|
header.png
ADDED
![]() |
llm-tagging.py
CHANGED
@@ -135,7 +135,7 @@ def tag_posting(job_path, output_path):
|
|
135 |
def tag_all_today():
|
136 |
|
137 |
date = datetime.today().strftime('%d-%m-%Y')
|
138 |
-
date = "04-01-2025"
|
139 |
|
140 |
jobs = os.listdir(f'./job-postings/{date}')
|
141 |
output_path = f'./data/tags-{date}.jsonl'
|
|
|
135 |
def tag_all_today():
|
136 |
|
137 |
date = datetime.today().strftime('%d-%m-%Y')
|
138 |
+
# date = "04-01-2025"
|
139 |
|
140 |
jobs = os.listdir(f'./job-postings/{date}')
|
141 |
output_path = f'./data/tags-{date}.jsonl'
|
train.py
CHANGED
@@ -160,7 +160,7 @@ def train(json_path: str):
|
|
160 |
def train_today():
|
161 |
|
162 |
date = datetime.today().strftime('%d-%m-%Y')
|
163 |
-
date = "04-01-2025"
|
164 |
json_path = os.path.join(os.getcwd(),f'data/tags-{date}.jsonl')
|
165 |
print(f"Training on {json_path}")
|
166 |
train(json_path=json_path)
|
|
|
160 |
def train_today():
|
161 |
|
162 |
date = datetime.today().strftime('%d-%m-%Y')
|
163 |
+
# date = "04-01-2025"
|
164 |
json_path = os.path.join(os.getcwd(),f'data/tags-{date}.jsonl')
|
165 |
print(f"Training on {json_path}")
|
166 |
train(json_path=json_path)
|