tebakaja commited on
Commit
2cbb276
·
1 Parent(s): 28ad5fb

[ repair ]: Repair Scheduler and ML Pipeline

Browse files
.github/workflows/gru_pipeline.yaml CHANGED
@@ -10,6 +10,7 @@ on:
10
  - cron: "0 7 * * *"
11
  # 14 - 7 = 7
12
 
 
13
  jobs:
14
  scraping_extracting:
15
  name: Scraping and Extracting
@@ -26,38 +27,38 @@ jobs:
26
  persist-credentials: false
27
  fetch-depth: 1
28
 
29
- - name: Read pipeline schedule date
30
- id: read_schedule
31
- run: |
32
- SCHEDULE_DATE=$(cat schedulers/gru_schedule.ctl)
33
- echo "schedule_date=${SCHEDULE_DATE}" >> $GITHUB_ENV
34
-
35
- - name: Get current date
36
- id: get_date
37
- run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
38
-
39
- - name: Check if dates match
40
- id: date_check
41
- run: |
42
- if [ "$schedule_date" = "$current_date" ]; then
43
- echo "match=true" >> $GITHUB_ENV
44
- else
45
- echo "match=false" >> $GITHUB_ENV
46
- fi
47
 
48
  - name: Scraping Yahoo Finance
49
- if: env.match != 'true'
50
  run: |
51
  mkdir datasets
52
  go run scraper.go \
53
  --symbols-file=./postman/symbols_test.json
54
 
55
  - name: Zip Datasets
56
- if: env.match != 'true'
57
  run: zip -r datasets.zip datasets
58
 
59
  - name: Store Datasets to Google Drive
60
- if: env.match != 'true'
61
  uses: adityak74/google-drive-upload-git-action@main
62
  with:
63
  credentials: ${{ secrets.GDRIVE_GRU_CRED }}
@@ -67,19 +68,20 @@ jobs:
67
  overwrite: "true"
68
 
69
  - name: Upload Artifact (datasets)
70
- if: env.match != 'true'
71
  uses: actions/upload-artifact@v3
72
  with:
73
  name: datasets
74
  path: datasets.zip
75
 
76
  - name: Remove Temporarary Files and Directories
77
- if: env.match != 'true'
78
  run: |
79
  rm datasets.zip
80
  rm -rf datasets
81
 
82
 
 
83
  preprocessing_training:
84
  name: Preprocessing and Training
85
  runs-on: ubuntu-latest
@@ -96,37 +98,37 @@ jobs:
96
  persist-credentials: false
97
  fetch-depth: 1
98
 
99
- - name: Read pipeline schedule date
100
- id: read_schedule
101
- run: |
102
- SCHEDULE_DATE=$(cat schedulers/gru_schedule.ctl)
103
- echo "schedule_date=${SCHEDULE_DATE}" >> $GITHUB_ENV
104
-
105
- - name: Get current date
106
- id: get_date
107
- run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
108
-
109
- - name: Check if dates match
110
- id: date_check
111
- run: |
112
- if [ "$schedule_date" = "$current_date" ]; then
113
- echo "match=true" >> $GITHUB_ENV
114
- else
115
- echo "match=false" >> $GITHUB_ENV
116
- fi
117
 
118
  - name: Install Libraries
119
- if: env.match != 'true'
120
  run: pip install -r requirements.txt
121
 
122
  - name: Download Artifact (datasets)
123
- if: env.match != 'true'
124
  uses: actions/download-artifact@v3
125
  with:
126
  name: datasets
127
 
128
  - name: Modeling and Training
129
- if: env.match != 'true'
130
  run: |
131
  unzip datasets.zip
132
 
@@ -139,20 +141,16 @@ jobs:
139
  --batchs=32 \
140
  --sequences=5 \
141
  --algorithm=GRU
142
-
143
- - name: Set Pipeline Schedule
144
- if: env.match != 'true'
145
- run: echo "$(date +'%Y-%m-%d')" > schedulers/gru_schedule.ctl
146
 
147
  - name: Zip Posttrained, Models, and Pickles
148
- if: env.match != 'true'
149
  run: |
150
  zip -r models.zip models
151
  zip -r pickles.zip pickles
152
  zip -r posttrained.zip posttrained
153
 
154
  - name: Store Models to Google Drive
155
- if: env.match != 'true'
156
  uses: adityak74/google-drive-upload-git-action@main
157
  with:
158
  credentials: ${{ secrets.GDRIVE_GRU_CRED }}
@@ -162,7 +160,7 @@ jobs:
162
  overwrite: "true"
163
 
164
  - name: Store Pickles to Google Drive
165
- if: env.match != 'true'
166
  uses: adityak74/google-drive-upload-git-action@main
167
  with:
168
  credentials: ${{ secrets.GDRIVE_GRU_CRED }}
@@ -172,7 +170,7 @@ jobs:
172
  overwrite: "true"
173
 
174
  - name: Store Posttrained to Google Drive
175
- if: env.match != 'true'
176
  uses: adityak74/google-drive-upload-git-action@main
177
  with:
178
  credentials: ${{ secrets.GDRIVE_GRU_CRED }}
@@ -182,7 +180,7 @@ jobs:
182
  overwrite: "true"
183
 
184
  - name: Remove Temporarary Files and Directories
185
- if: env.match != 'true'
186
  run: |
187
  rm models.zip
188
  rm pickles.zip
@@ -194,23 +192,8 @@ jobs:
194
  rm -rf datasets
195
  rm -rf posttrained
196
 
197
- - name: Commit changes
198
- if: env.match != 'true'
199
- run: |
200
- git config --local user.email "belajarqywok@gmail.com"
201
- git config --local user.name "belajarqywok"
202
- git add -A
203
- git commit -m "Data Extraction, Training, and Modeling"
204
-
205
- - name: Push changes
206
- if: env.match != 'true'
207
- uses: ad-m/github-push-action@master
208
- with:
209
- github_token: ${{ secrets.GH_TOKEN }}
210
- branch: main
211
-
212
  - name: Flush All Caching Data (Redis)
213
- if: env.match != 'true'
214
  run: |
215
  sudo apt install -y redis-tools
216
  echo "FLUSHALL" | redis-cli --tls \
@@ -219,6 +202,7 @@ jobs:
219
  -a ${{ secrets.REDIS_TOKEN }}
220
 
221
 
 
222
  tebakaja_crypto_space-0:
223
  name: crypto-forecast-svc-0
224
  runs-on: ubuntu-latest
@@ -239,29 +223,50 @@ jobs:
239
  persist-credentials: false
240
  fetch-depth: 1000
241
 
242
- - name: Check git status
243
- run: git status
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
244
 
245
  - name: Configure git
 
246
  run: |
247
  git config --local user.email "alfariqyraihan@gmail.com"
248
  git config --local user.name "qywok"
249
 
250
  - name: Pull changes from remote
 
251
  run: |
252
  git pull https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main || \
253
  (git merge --strategy-option theirs)
254
 
255
  - name: Add and commit changes
 
256
  run: |
257
  git add -A
258
  git diff-index --quiet HEAD || git commit -m "Model Deployment"
259
 
260
  - name: Push to Hugging Face
 
261
  run: |
262
  git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main --force
263
 
264
 
 
265
  tebakaja_crypto_space-1:
266
  name: crypto-forecast-svc-1
267
  runs-on: ubuntu-latest
@@ -282,29 +287,50 @@ jobs:
282
  persist-credentials: false
283
  fetch-depth: 1000
284
 
285
- - name: Check git status
286
- run: git status
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
287
 
288
  - name: Configure git
 
289
  run: |
290
  git config --local user.email "alfariqyraihan@gmail.com"
291
  git config --local user.name "qywok"
292
 
293
  - name: Pull changes from remote
 
294
  run: |
295
  git pull https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main || \
296
  (git merge --strategy-option theirs)
297
 
298
  - name: Add and commit changes
 
299
  run: |
300
  git add -A
301
  git diff-index --quiet HEAD || git commit -m "Model Deployment"
302
 
303
  - name: Push to Hugging Face
 
304
  run: |
305
  git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main --force
306
 
307
 
 
308
  tebakaja_crypto_space-2:
309
  name: crypto-forecast-svc-2
310
  runs-on: ubuntu-latest
@@ -325,29 +351,50 @@ jobs:
325
  persist-credentials: false
326
  fetch-depth: 1000
327
 
328
- - name: Check git status
329
- run: git status
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
330
 
331
  - name: Configure git
 
332
  run: |
333
  git config --local user.email "alfariqyraihan@gmail.com"
334
  git config --local user.name "qywok"
335
 
336
  - name: Pull changes from remote
 
337
  run: |
338
  git pull https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main || \
339
  (git merge --strategy-option theirs)
340
 
341
  - name: Add and commit changes
 
342
  run: |
343
  git add -A
344
  git diff-index --quiet HEAD || git commit -m "Model Deployment"
345
 
346
  - name: Push to Hugging Face
 
347
  run: |
348
  git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main --force
349
 
350
 
 
351
  tebakaja_crypto_space-3:
352
  name: crypto-forecast-svc-3
353
  runs-on: ubuntu-latest
@@ -368,29 +415,50 @@ jobs:
368
  persist-credentials: false
369
  fetch-depth: 1000
370
 
371
- - name: Check git status
372
- run: git status
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
373
 
374
  - name: Configure git
 
375
  run: |
376
  git config --local user.email "alfariqyraihan@gmail.com"
377
  git config --local user.name "qywok"
378
 
379
  - name: Pull changes from remote
 
380
  run: |
381
  git pull https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main || \
382
  (git merge --strategy-option theirs)
383
 
384
  - name: Add and commit changes
 
385
  run: |
386
  git add -A
387
  git diff-index --quiet HEAD || git commit -m "Model Deployment"
388
 
389
  - name: Push to Hugging Face
 
390
  run: |
391
  git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main --force
392
 
393
 
 
394
  tebakaja_crypto_space-4:
395
  name: crypto-forecast-svc-4
396
  runs-on: ubuntu-latest
@@ -411,29 +479,50 @@ jobs:
411
  persist-credentials: false
412
  fetch-depth: 1000
413
 
414
- - name: Check git status
415
- run: git status
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
416
 
417
  - name: Configure git
 
418
  run: |
419
  git config --local user.email "alfariqyraihan@gmail.com"
420
  git config --local user.name "qywok"
421
 
422
  - name: Pull changes from remote
 
423
  run: |
424
  git pull https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main || \
425
  (git merge --strategy-option theirs)
426
 
427
  - name: Add and commit changes
 
428
  run: |
429
  git add -A
430
  git diff-index --quiet HEAD || git commit -m "Model Deployment"
431
 
432
  - name: Push to Hugging Face
 
433
  run: |
434
  git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main --force
435
 
436
 
 
437
  functional_testing:
438
  name: Functional Testing
439
  runs-on: ubuntu-latest
@@ -454,8 +543,47 @@ jobs:
454
  persist-credentials: false
455
  fetch-depth: 1
456
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
457
  - name: Testing Proxy Endpoints
 
458
  run: |
459
  sleep 60
460
  chmod +x endpoints_test.sh && ./endpoints_test.sh
461
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
10
  - cron: "0 7 * * *"
11
  # 14 - 7 = 7
12
 
13
+
14
  jobs:
15
  scraping_extracting:
16
  name: Scraping and Extracting
 
27
  persist-credentials: false
28
  fetch-depth: 1
29
 
30
+ # - name: Read pipeline schedule date
31
+ # id: read_schedule
32
+ # run: |
33
+ # SCHEDULE_DATE=$(cat schedulers/gru_schedule.ctl)
34
+ # echo "schedule_date=${SCHEDULE_DATE}" >> $GITHUB_ENV
35
+
36
+ # - name: Get current date
37
+ # id: get_date
38
+ # run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
39
+
40
+ # - name: Check if dates match
41
+ # id: date_check
42
+ # run: |
43
+ # if [ "$schedule_date" = "$current_date" ]; then
44
+ # echo "match=true" >> $GITHUB_ENV
45
+ # else
46
+ # echo "match=false" >> $GITHUB_ENV
47
+ # fi
48
 
49
  - name: Scraping Yahoo Finance
50
+ # if: env.match != 'true'
51
  run: |
52
  mkdir datasets
53
  go run scraper.go \
54
  --symbols-file=./postman/symbols_test.json
55
 
56
  - name: Zip Datasets
57
+ # if: env.match != 'true'
58
  run: zip -r datasets.zip datasets
59
 
60
  - name: Store Datasets to Google Drive
61
+ # if: env.match != 'true'
62
  uses: adityak74/google-drive-upload-git-action@main
63
  with:
64
  credentials: ${{ secrets.GDRIVE_GRU_CRED }}
 
68
  overwrite: "true"
69
 
70
  - name: Upload Artifact (datasets)
71
+ # if: env.match != 'true'
72
  uses: actions/upload-artifact@v3
73
  with:
74
  name: datasets
75
  path: datasets.zip
76
 
77
  - name: Remove Temporarary Files and Directories
78
+ # if: env.match != 'true'
79
  run: |
80
  rm datasets.zip
81
  rm -rf datasets
82
 
83
 
84
+
85
  preprocessing_training:
86
  name: Preprocessing and Training
87
  runs-on: ubuntu-latest
 
98
  persist-credentials: false
99
  fetch-depth: 1
100
 
101
+ # - name: Read pipeline schedule date
102
+ # id: read_schedule
103
+ # run: |
104
+ # SCHEDULE_DATE=$(cat schedulers/gru_schedule.ctl)
105
+ # echo "schedule_date=${SCHEDULE_DATE}" >> $GITHUB_ENV
106
+
107
+ # - name: Get current date
108
+ # id: get_date
109
+ # run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
110
+
111
+ # - name: Check if dates match
112
+ # id: date_check
113
+ # run: |
114
+ # if [ "$schedule_date" = "$current_date" ]; then
115
+ # echo "match=true" >> $GITHUB_ENV
116
+ # else
117
+ # echo "match=false" >> $GITHUB_ENV
118
+ # fi
119
 
120
  - name: Install Libraries
121
+ # if: env.match != 'true'
122
  run: pip install -r requirements.txt
123
 
124
  - name: Download Artifact (datasets)
125
+ # if: env.match != 'true'
126
  uses: actions/download-artifact@v3
127
  with:
128
  name: datasets
129
 
130
  - name: Modeling and Training
131
+ # if: env.match != 'true'
132
  run: |
133
  unzip datasets.zip
134
 
 
141
  --batchs=32 \
142
  --sequences=5 \
143
  --algorithm=GRU
 
 
 
 
144
 
145
  - name: Zip Posttrained, Models, and Pickles
146
+ # if: env.match != 'true'
147
  run: |
148
  zip -r models.zip models
149
  zip -r pickles.zip pickles
150
  zip -r posttrained.zip posttrained
151
 
152
  - name: Store Models to Google Drive
153
+ # if: env.match != 'true'
154
  uses: adityak74/google-drive-upload-git-action@main
155
  with:
156
  credentials: ${{ secrets.GDRIVE_GRU_CRED }}
 
160
  overwrite: "true"
161
 
162
  - name: Store Pickles to Google Drive
163
+ # if: env.match != 'true'
164
  uses: adityak74/google-drive-upload-git-action@main
165
  with:
166
  credentials: ${{ secrets.GDRIVE_GRU_CRED }}
 
170
  overwrite: "true"
171
 
172
  - name: Store Posttrained to Google Drive
173
+ # if: env.match != 'true'
174
  uses: adityak74/google-drive-upload-git-action@main
175
  with:
176
  credentials: ${{ secrets.GDRIVE_GRU_CRED }}
 
180
  overwrite: "true"
181
 
182
  - name: Remove Temporarary Files and Directories
183
+ # if: env.match != 'true'
184
  run: |
185
  rm models.zip
186
  rm pickles.zip
 
192
  rm -rf datasets
193
  rm -rf posttrained
194
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
195
  - name: Flush All Caching Data (Redis)
196
+ # if: env.match != 'true'
197
  run: |
198
  sudo apt install -y redis-tools
199
  echo "FLUSHALL" | redis-cli --tls \
 
202
  -a ${{ secrets.REDIS_TOKEN }}
203
 
204
 
205
+
206
  tebakaja_crypto_space-0:
207
  name: crypto-forecast-svc-0
208
  runs-on: ubuntu-latest
 
223
  persist-credentials: false
224
  fetch-depth: 1000
225
 
226
+ # - name: Read pipeline schedule date
227
+ # id: read_schedule
228
+ # run: |
229
+ # SCHEDULE_DATE=$(cat schedulers/gru_schedule.ctl)
230
+ # echo "schedule_date=${SCHEDULE_DATE}" >> $GITHUB_ENV
231
+
232
+ # - name: Get current date
233
+ # id: get_date
234
+ # run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
235
+
236
+ # - name: Check if dates match
237
+ # id: date_check
238
+ # run: |
239
+ # if [ "$schedule_date" = "$current_date" ]; then
240
+ # echo "match=true" >> $GITHUB_ENV
241
+ # else
242
+ # echo "match=false" >> $GITHUB_ENV
243
+ # fi
244
 
245
  - name: Configure git
246
+ # if: env.match != 'true'
247
  run: |
248
  git config --local user.email "alfariqyraihan@gmail.com"
249
  git config --local user.name "qywok"
250
 
251
  - name: Pull changes from remote
252
+ # if: env.match != 'true'
253
  run: |
254
  git pull https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main || \
255
  (git merge --strategy-option theirs)
256
 
257
  - name: Add and commit changes
258
+ # if: env.match != 'true'
259
  run: |
260
  git add -A
261
  git diff-index --quiet HEAD || git commit -m "Model Deployment"
262
 
263
  - name: Push to Hugging Face
264
+ # if: env.match != 'true'
265
  run: |
266
  git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main --force
267
 
268
 
269
+
270
  tebakaja_crypto_space-1:
271
  name: crypto-forecast-svc-1
272
  runs-on: ubuntu-latest
 
287
  persist-credentials: false
288
  fetch-depth: 1000
289
 
290
+ # - name: Read pipeline schedule date
291
+ # id: read_schedule
292
+ # run: |
293
+ # SCHEDULE_DATE=$(cat schedulers/gru_schedule.ctl)
294
+ # echo "schedule_date=${SCHEDULE_DATE}" >> $GITHUB_ENV
295
+
296
+ # - name: Get current date
297
+ # id: get_date
298
+ # run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
299
+
300
+ # - name: Check if dates match
301
+ # id: date_check
302
+ # run: |
303
+ # if [ "$schedule_date" = "$current_date" ]; then
304
+ # echo "match=true" >> $GITHUB_ENV
305
+ # else
306
+ # echo "match=false" >> $GITHUB_ENV
307
+ # fi
308
 
309
  - name: Configure git
310
+ # if: env.match != 'true'
311
  run: |
312
  git config --local user.email "alfariqyraihan@gmail.com"
313
  git config --local user.name "qywok"
314
 
315
  - name: Pull changes from remote
316
+ # if: env.match != 'true'
317
  run: |
318
  git pull https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main || \
319
  (git merge --strategy-option theirs)
320
 
321
  - name: Add and commit changes
322
+ # if: env.match != 'true'
323
  run: |
324
  git add -A
325
  git diff-index --quiet HEAD || git commit -m "Model Deployment"
326
 
327
  - name: Push to Hugging Face
328
+ # if: env.match != 'true'
329
  run: |
330
  git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main --force
331
 
332
 
333
+
334
  tebakaja_crypto_space-2:
335
  name: crypto-forecast-svc-2
336
  runs-on: ubuntu-latest
 
351
  persist-credentials: false
352
  fetch-depth: 1000
353
 
354
+ # - name: Read pipeline schedule date
355
+ # id: read_schedule
356
+ # run: |
357
+ # SCHEDULE_DATE=$(cat schedulers/gru_schedule.ctl)
358
+ # echo "schedule_date=${SCHEDULE_DATE}" >> $GITHUB_ENV
359
+
360
+ # - name: Get current date
361
+ # id: get_date
362
+ # run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
363
+
364
+ # - name: Check if dates match
365
+ # id: date_check
366
+ # run: |
367
+ # if [ "$schedule_date" = "$current_date" ]; then
368
+ # echo "match=true" >> $GITHUB_ENV
369
+ # else
370
+ # echo "match=false" >> $GITHUB_ENV
371
+ # fi
372
 
373
  - name: Configure git
374
+ # if: env.match != 'true'
375
  run: |
376
  git config --local user.email "alfariqyraihan@gmail.com"
377
  git config --local user.name "qywok"
378
 
379
  - name: Pull changes from remote
380
+ # if: env.match != 'true'
381
  run: |
382
  git pull https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main || \
383
  (git merge --strategy-option theirs)
384
 
385
  - name: Add and commit changes
386
+ # if: env.match != 'true'
387
  run: |
388
  git add -A
389
  git diff-index --quiet HEAD || git commit -m "Model Deployment"
390
 
391
  - name: Push to Hugging Face
392
+ # if: env.match != 'true'
393
  run: |
394
  git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main --force
395
 
396
 
397
+
398
  tebakaja_crypto_space-3:
399
  name: crypto-forecast-svc-3
400
  runs-on: ubuntu-latest
 
415
  persist-credentials: false
416
  fetch-depth: 1000
417
 
418
+ # - name: Read pipeline schedule date
419
+ # id: read_schedule
420
+ # run: |
421
+ # SCHEDULE_DATE=$(cat schedulers/gru_schedule.ctl)
422
+ # echo "schedule_date=${SCHEDULE_DATE}" >> $GITHUB_ENV
423
+
424
+ # - name: Get current date
425
+ # id: get_date
426
+ # run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
427
+
428
+ # - name: Check if dates match
429
+ # id: date_check
430
+ # run: |
431
+ # if [ "$schedule_date" = "$current_date" ]; then
432
+ # echo "match=true" >> $GITHUB_ENV
433
+ # else
434
+ # echo "match=false" >> $GITHUB_ENV
435
+ # fi
436
 
437
  - name: Configure git
438
+ # if: env.match != 'true'
439
  run: |
440
  git config --local user.email "alfariqyraihan@gmail.com"
441
  git config --local user.name "qywok"
442
 
443
  - name: Pull changes from remote
444
+ # if: env.match != 'true'
445
  run: |
446
  git pull https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main || \
447
  (git merge --strategy-option theirs)
448
 
449
  - name: Add and commit changes
450
+ # if: env.match != 'true'
451
  run: |
452
  git add -A
453
  git diff-index --quiet HEAD || git commit -m "Model Deployment"
454
 
455
  - name: Push to Hugging Face
456
+ # if: env.match != 'true'
457
  run: |
458
  git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main --force
459
 
460
 
461
+
462
  tebakaja_crypto_space-4:
463
  name: crypto-forecast-svc-4
464
  runs-on: ubuntu-latest
 
479
  persist-credentials: false
480
  fetch-depth: 1000
481
 
482
+ # - name: Read pipeline schedule date
483
+ # id: read_schedule
484
+ # run: |
485
+ # SCHEDULE_DATE=$(cat schedulers/gru_schedule.ctl)
486
+ # echo "schedule_date=${SCHEDULE_DATE}" >> $GITHUB_ENV
487
+
488
+ # - name: Get current date
489
+ # id: get_date
490
+ # run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
491
+
492
+ # - name: Check if dates match
493
+ # id: date_check
494
+ # run: |
495
+ # if [ "$schedule_date" = "$current_date" ]; then
496
+ # echo "match=true" >> $GITHUB_ENV
497
+ # else
498
+ # echo "match=false" >> $GITHUB_ENV
499
+ # fi
500
 
501
  - name: Configure git
502
+ # if: env.match != 'true'
503
  run: |
504
  git config --local user.email "alfariqyraihan@gmail.com"
505
  git config --local user.name "qywok"
506
 
507
  - name: Pull changes from remote
508
+ # if: env.match != 'true'
509
  run: |
510
  git pull https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main || \
511
  (git merge --strategy-option theirs)
512
 
513
  - name: Add and commit changes
514
+ # if: env.match != 'true'
515
  run: |
516
  git add -A
517
  git diff-index --quiet HEAD || git commit -m "Model Deployment"
518
 
519
  - name: Push to Hugging Face
520
+ # if: env.match != 'true'
521
  run: |
522
  git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main --force
523
 
524
 
525
+
526
  functional_testing:
527
  name: Functional Testing
528
  runs-on: ubuntu-latest
 
543
  persist-credentials: false
544
  fetch-depth: 1
545
 
546
+ # - name: Read pipeline schedule date
547
+ # id: read_schedule
548
+ # run: |
549
+ # SCHEDULE_DATE=$(cat schedulers/gru_schedule.ctl)
550
+ # echo "schedule_date=${SCHEDULE_DATE}" >> $GITHUB_ENV
551
+
552
+ # - name: Get current date
553
+ # id: get_date
554
+ # run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
555
+
556
+ # - name: Check if dates match
557
+ # id: date_check
558
+ # run: |
559
+ # if [ "$schedule_date" = "$current_date" ]; then
560
+ # echo "match=true" >> $GITHUB_ENV
561
+ # else
562
+ # echo "match=false" >> $GITHUB_ENV
563
+ # fi
564
+
565
  - name: Testing Proxy Endpoints
566
+ # if: env.match != 'true'
567
  run: |
568
  sleep 60
569
  chmod +x endpoints_test.sh && ./endpoints_test.sh
570
 
571
+ - name: Set Pipeline Schedule
572
+ # if: env.match != 'true'
573
+ run: echo "$(date +'%Y-%m-%d')" > schedulers/gru_schedule.ctl
574
+
575
+ # - name: Commit changes
576
+ # if: env.match != 'true'
577
+ # run: |
578
+ # git config --local user.email "belajarqywok@gmail.com"
579
+ # git config --local user.name "belajarqywok"
580
+ # git add -A
581
+ # git commit -m "Data Extraction, Training, and Modeling"
582
+
583
+ # - name: Push changes
584
+ # if: env.match != 'true'
585
+ # uses: ad-m/github-push-action@master
586
+ # with:
587
+ # github_token: ${{ secrets.GH_TOKEN }}
588
+ # branch: main
589
+
.github/workflows/lstm_gru_pipeline.yaml CHANGED
@@ -10,6 +10,7 @@ on:
10
  - cron: "0 11 * * *"
11
  # 18 - 7 = 11
12
 
 
13
  jobs:
14
  scraping_extracting:
15
  name: Scraping and Extracting
@@ -26,38 +27,38 @@ jobs:
26
  persist-credentials: false
27
  fetch-depth: 1
28
 
29
- - name: Read pipeline schedule date
30
- id: read_schedule
31
- run: |
32
- SCHEDULE_DATE=$(cat schedulers/lstm_gru_schedule.ctl)
33
- echo "schedule_date=${SCHEDULE_DATE}" >> $GITHUB_ENV
34
-
35
- - name: Get current date
36
- id: get_date
37
- run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
38
-
39
- - name: Check if dates match
40
- id: date_check
41
- run: |
42
- if [ "$schedule_date" = "$current_date" ]; then
43
- echo "match=true" >> $GITHUB_ENV
44
- else
45
- echo "match=false" >> $GITHUB_ENV
46
- fi
47
 
48
  - name: Scraping Yahoo Finance
49
- if: env.match != 'true'
50
  run: |
51
  mkdir datasets
52
  go run scraper.go \
53
  --symbols-file=./postman/symbols_test.json
54
 
55
  - name: Zip Datasets
56
- if: env.match != 'true'
57
  run: zip -r datasets.zip datasets
58
 
59
  - name: Store Datasets to Google Drive
60
- if: env.match != 'true'
61
  uses: adityak74/google-drive-upload-git-action@main
62
  with:
63
  credentials: ${{ secrets.GDRIVE_LSTM_GRU_CRED }}
@@ -67,19 +68,20 @@ jobs:
67
  overwrite: "true"
68
 
69
  - name: Upload Artifact (datasets)
70
- if: env.match != 'true'
71
  uses: actions/upload-artifact@v3
72
  with:
73
  name: datasets
74
  path: datasets.zip
75
 
76
  - name: Remove Temporarary Files and Directories
77
- if: env.match != 'true'
78
  run: |
79
  rm datasets.zip
80
  rm -rf datasets
81
 
82
 
 
83
  preprocessing_training:
84
  name: Preprocessing and Training
85
  runs-on: ubuntu-latest
@@ -96,37 +98,37 @@ jobs:
96
  persist-credentials: false
97
  fetch-depth: 1
98
 
99
- - name: Read pipeline schedule date
100
- id: read_schedule
101
- run: |
102
- SCHEDULE_DATE=$(cat schedulers/lstm_gru_schedule.ctl)
103
- echo "schedule_date=${SCHEDULE_DATE}" >> $GITHUB_ENV
104
-
105
- - name: Get current date
106
- id: get_date
107
- run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
108
-
109
- - name: Check if dates match
110
- id: date_check
111
- run: |
112
- if [ "$schedule_date" = "$current_date" ]; then
113
- echo "match=true" >> $GITHUB_ENV
114
- else
115
- echo "match=false" >> $GITHUB_ENV
116
- fi
117
 
118
  - name: Install Libraries
119
- if: env.match != 'true'
120
  run: pip install -r requirements.txt
121
 
122
  - name: Download Artifact (datasets)
123
- if: env.match != 'true'
124
  uses: actions/download-artifact@v3
125
  with:
126
  name: datasets
127
 
128
  - name: Modeling and Training
129
- if: env.match != 'true'
130
  run: |
131
  unzip datasets.zip
132
 
@@ -141,18 +143,18 @@ jobs:
141
  --algorithm=LSTM_GRU
142
 
143
  - name: Set Pipeline Schedule
144
- if: env.match != 'true'
145
  run: echo "$(date +'%Y-%m-%d')" > schedulers/lstm_gru_schedule.ctl
146
 
147
  - name: Zip Posttrained, Models, and Pickles
148
- if: env.match != 'true'
149
  run: |
150
  zip -r models.zip models
151
  zip -r pickles.zip pickles
152
  zip -r posttrained.zip posttrained
153
 
154
  - name: Store Models to Google Drive
155
- if: env.match != 'true'
156
  uses: adityak74/google-drive-upload-git-action@main
157
  with:
158
  credentials: ${{ secrets.GDRIVE_LSTM_GRU_CRED }}
@@ -162,7 +164,7 @@ jobs:
162
  overwrite: "true"
163
 
164
  - name: Store Pickles to Google Drive
165
- if: env.match != 'true'
166
  uses: adityak74/google-drive-upload-git-action@main
167
  with:
168
  credentials: ${{ secrets.GDRIVE_LSTM_GRU_CRED }}
@@ -172,7 +174,7 @@ jobs:
172
  overwrite: "true"
173
 
174
  - name: Store Posttrained to Google Drive
175
- if: env.match != 'true'
176
  uses: adityak74/google-drive-upload-git-action@main
177
  with:
178
  credentials: ${{ secrets.GDRIVE_LSTM_GRU_CRED }}
@@ -182,7 +184,7 @@ jobs:
182
  overwrite: "true"
183
 
184
  - name: Remove Temporarary Files and Directories
185
- if: env.match != 'true'
186
  run: |
187
  rm models.zip
188
  rm pickles.zip
@@ -194,20 +196,21 @@ jobs:
194
  rm -rf datasets
195
  rm -rf posttrained
196
 
197
- - name: Commit changes
198
- if: env.match != 'true'
199
- run: |
200
- git config --local user.email "belajarqywok@gmail.com"
201
- git config --local user.name "belajarqywok"
202
- git add -A
203
- git commit -m "Data Extraction, Training, and Modeling"
204
-
205
- - name: Push changes
206
- if: env.match != 'true'
207
- uses: ad-m/github-push-action@master
208
- with:
209
- github_token: ${{ secrets.GH_TOKEN }}
210
- branch: main
 
211
 
212
 
213
  tebakaja_crypto_space-0:
@@ -253,6 +256,7 @@ jobs:
253
  git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main --force
254
 
255
 
 
256
  tebakaja_crypto_space-1:
257
  name: crypto-forecast-svc-1
258
  runs-on: ubuntu-latest
@@ -296,6 +300,7 @@ jobs:
296
  git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main --force
297
 
298
 
 
299
  tebakaja_crypto_space-2:
300
  name: crypto-forecast-svc-2
301
  runs-on: ubuntu-latest
@@ -339,6 +344,7 @@ jobs:
339
  git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main --force
340
 
341
 
 
342
  tebakaja_crypto_space-3:
343
  name: crypto-forecast-svc-3
344
  runs-on: ubuntu-latest
@@ -382,6 +388,7 @@ jobs:
382
  git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main --force
383
 
384
 
 
385
  tebakaja_crypto_space-4:
386
  name: crypto-forecast-svc-4
387
  runs-on: ubuntu-latest
@@ -425,6 +432,7 @@ jobs:
425
  git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main --force
426
 
427
 
 
428
  functional_testing:
429
  name: Functional Testing
430
  runs-on: ubuntu-latest
 
10
  - cron: "0 11 * * *"
11
  # 18 - 7 = 11
12
 
13
+
14
  jobs:
15
  scraping_extracting:
16
  name: Scraping and Extracting
 
27
  persist-credentials: false
28
  fetch-depth: 1
29
 
30
+ # - name: Read pipeline schedule date
31
+ # id: read_schedule
32
+ # run: |
33
+ # SCHEDULE_DATE=$(cat schedulers/lstm_gru_schedule.ctl)
34
+ # echo "schedule_date=${SCHEDULE_DATE}" >> $GITHUB_ENV
35
+
36
+ # - name: Get current date
37
+ # id: get_date
38
+ # run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
39
+
40
+ # - name: Check if dates match
41
+ # id: date_check
42
+ # run: |
43
+ # if [ "$schedule_date" = "$current_date" ]; then
44
+ # echo "match=true" >> $GITHUB_ENV
45
+ # else
46
+ # echo "match=false" >> $GITHUB_ENV
47
+ # fi
48
 
49
  - name: Scraping Yahoo Finance
50
+ # if: env.match != 'true'
51
  run: |
52
  mkdir datasets
53
  go run scraper.go \
54
  --symbols-file=./postman/symbols_test.json
55
 
56
  - name: Zip Datasets
57
+ # if: env.match != 'true'
58
  run: zip -r datasets.zip datasets
59
 
60
  - name: Store Datasets to Google Drive
61
+ # if: env.match != 'true'
62
  uses: adityak74/google-drive-upload-git-action@main
63
  with:
64
  credentials: ${{ secrets.GDRIVE_LSTM_GRU_CRED }}
 
68
  overwrite: "true"
69
 
70
  - name: Upload Artifact (datasets)
71
+ # if: env.match != 'true'
72
  uses: actions/upload-artifact@v3
73
  with:
74
  name: datasets
75
  path: datasets.zip
76
 
77
  - name: Remove Temporarary Files and Directories
78
+ # if: env.match != 'true'
79
  run: |
80
  rm datasets.zip
81
  rm -rf datasets
82
 
83
 
84
+
85
  preprocessing_training:
86
  name: Preprocessing and Training
87
  runs-on: ubuntu-latest
 
98
  persist-credentials: false
99
  fetch-depth: 1
100
 
101
+ # - name: Read pipeline schedule date
102
+ # id: read_schedule
103
+ # run: |
104
+ # SCHEDULE_DATE=$(cat schedulers/lstm_gru_schedule.ctl)
105
+ # echo "schedule_date=${SCHEDULE_DATE}" >> $GITHUB_ENV
106
+
107
+ # - name: Get current date
108
+ # id: get_date
109
+ # run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
110
+
111
+ # - name: Check if dates match
112
+ # id: date_check
113
+ # run: |
114
+ # if [ "$schedule_date" = "$current_date" ]; then
115
+ # echo "match=true" >> $GITHUB_ENV
116
+ # else
117
+ # echo "match=false" >> $GITHUB_ENV
118
+ # fi
119
 
120
  - name: Install Libraries
121
+ # if: env.match != 'true'
122
  run: pip install -r requirements.txt
123
 
124
  - name: Download Artifact (datasets)
125
+ # if: env.match != 'true'
126
  uses: actions/download-artifact@v3
127
  with:
128
  name: datasets
129
 
130
  - name: Modeling and Training
131
+ # if: env.match != 'true'
132
  run: |
133
  unzip datasets.zip
134
 
 
143
  --algorithm=LSTM_GRU
144
 
145
  - name: Set Pipeline Schedule
146
+ # if: env.match != 'true'
147
  run: echo "$(date +'%Y-%m-%d')" > schedulers/lstm_gru_schedule.ctl
148
 
149
  - name: Zip Posttrained, Models, and Pickles
150
+ # if: env.match != 'true'
151
  run: |
152
  zip -r models.zip models
153
  zip -r pickles.zip pickles
154
  zip -r posttrained.zip posttrained
155
 
156
  - name: Store Models to Google Drive
157
+ # if: env.match != 'true'
158
  uses: adityak74/google-drive-upload-git-action@main
159
  with:
160
  credentials: ${{ secrets.GDRIVE_LSTM_GRU_CRED }}
 
164
  overwrite: "true"
165
 
166
  - name: Store Pickles to Google Drive
167
+ # if: env.match != 'true'
168
  uses: adityak74/google-drive-upload-git-action@main
169
  with:
170
  credentials: ${{ secrets.GDRIVE_LSTM_GRU_CRED }}
 
174
  overwrite: "true"
175
 
176
  - name: Store Posttrained to Google Drive
177
+ # if: env.match != 'true'
178
  uses: adityak74/google-drive-upload-git-action@main
179
  with:
180
  credentials: ${{ secrets.GDRIVE_LSTM_GRU_CRED }}
 
184
  overwrite: "true"
185
 
186
  - name: Remove Temporarary Files and Directories
187
+ # if: env.match != 'true'
188
  run: |
189
  rm models.zip
190
  rm pickles.zip
 
196
  rm -rf datasets
197
  rm -rf posttrained
198
 
199
+ # - name: Commit changes
200
+ # if: env.match != 'true'
201
+ # run: |
202
+ # git config --local user.email "belajarqywok@gmail.com"
203
+ # git config --local user.name "belajarqywok"
204
+ # git add -A
205
+ # git commit -m "Data Extraction, Training, and Modeling"
206
+
207
+ # - name: Push changes
208
+ # if: env.match != 'true'
209
+ # uses: ad-m/github-push-action@master
210
+ # with:
211
+ # github_token: ${{ secrets.GH_TOKEN }}
212
+ # branch: main
213
+
214
 
215
 
216
  tebakaja_crypto_space-0:
 
256
  git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main --force
257
 
258
 
259
+
260
  tebakaja_crypto_space-1:
261
  name: crypto-forecast-svc-1
262
  runs-on: ubuntu-latest
 
300
  git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main --force
301
 
302
 
303
+
304
  tebakaja_crypto_space-2:
305
  name: crypto-forecast-svc-2
306
  runs-on: ubuntu-latest
 
344
  git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main --force
345
 
346
 
347
+
348
  tebakaja_crypto_space-3:
349
  name: crypto-forecast-svc-3
350
  runs-on: ubuntu-latest
 
388
  git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main --force
389
 
390
 
391
+
392
  tebakaja_crypto_space-4:
393
  name: crypto-forecast-svc-4
394
  runs-on: ubuntu-latest
 
432
  git push https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/$HF_USERNAME/$SPACE_NAME main --force
433
 
434
 
435
+
436
  functional_testing:
437
  name: Functional Testing
438
  runs-on: ubuntu-latest
.github/workflows/lstm_pipeline.yaml CHANGED
@@ -10,6 +10,7 @@ on:
10
  - cron: "0 9 * * *"
11
  # 16 - 7 = 9
12
 
 
13
  jobs:
14
  scraping_extracting:
15
  name: Scraping and Extracting
@@ -26,38 +27,38 @@ jobs:
26
  persist-credentials: false
27
  fetch-depth: 1
28
 
29
- - name: Read pipeline schedule date
30
- id: read_schedule
31
- run: |
32
- SCHEDULE_DATE=$(cat schedulers/lstm_schedule.ctl)
33
- echo "schedule_date=${SCHEDULE_DATE}" >> $GITHUB_ENV
34
-
35
- - name: Get current date
36
- id: get_date
37
- run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
38
-
39
- - name: Check if dates match
40
- id: date_check
41
- run: |
42
- if [ "$schedule_date" = "$current_date" ]; then
43
- echo "match=true" >> $GITHUB_ENV
44
- else
45
- echo "match=false" >> $GITHUB_ENV
46
- fi
47
 
48
  - name: Scraping Yahoo Finance
49
- if: env.match != 'true'
50
  run: |
51
  mkdir datasets
52
  go run scraper.go \
53
  --symbols-file=./postman/symbols_test.json
54
 
55
  - name: Zip Datasets
56
- if: env.match != 'true'
57
  run: zip -r datasets.zip datasets
58
 
59
  - name: Store Datasets to Google Drive
60
- if: env.match != 'true'
61
  uses: adityak74/google-drive-upload-git-action@main
62
  with:
63
  credentials: ${{ secrets.GDRIVE_LSTM_CRED }}
@@ -67,14 +68,14 @@ jobs:
67
  overwrite: "true"
68
 
69
  - name: Upload Artifact (datasets)
70
- if: env.match != 'true'
71
  uses: actions/upload-artifact@v3
72
  with:
73
  name: datasets
74
  path: datasets.zip
75
 
76
  - name: Remove Temporarary Files and Directories
77
- if: env.match != 'true'
78
  run: |
79
  rm datasets.zip
80
  rm -rf datasets
@@ -96,37 +97,37 @@ jobs:
96
  persist-credentials: false
97
  fetch-depth: 1
98
 
99
- - name: Read pipeline schedule date
100
- id: read_schedule
101
- run: |
102
- SCHEDULE_DATE=$(cat schedulers/lstm_schedule.ctl)
103
- echo "schedule_date=${SCHEDULE_DATE}" >> $GITHUB_ENV
104
-
105
- - name: Get current date
106
- id: get_date
107
- run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
108
-
109
- - name: Check if dates match
110
- id: date_check
111
- run: |
112
- if [ "$schedule_date" = "$current_date" ]; then
113
- echo "match=true" >> $GITHUB_ENV
114
- else
115
- echo "match=false" >> $GITHUB_ENV
116
- fi
117
 
118
  - name: Install Libraries
119
- if: env.match != 'true'
120
  run: pip install -r requirements.txt
121
 
122
  - name: Download Artifact (datasets)
123
- if: env.match != 'true'
124
  uses: actions/download-artifact@v3
125
  with:
126
  name: datasets
127
 
128
  - name: Modeling and Training
129
- if: env.match != 'true'
130
  run: |
131
  unzip datasets.zip
132
 
@@ -141,18 +142,18 @@ jobs:
141
  --algorithm=LSTM
142
 
143
  - name: Set Pipeline Schedule
144
- if: env.match != 'true'
145
  run: echo "$(date +'%Y-%m-%d')" > schedulers/lstm_schedule.ctl
146
 
147
  - name: Zip Posttrained, Models, and Pickles
148
- if: env.match != 'true'
149
  run: |
150
  zip -r models.zip models
151
  zip -r pickles.zip pickles
152
  zip -r posttrained.zip posttrained
153
 
154
  - name: Store Models to Google Drive
155
- if: env.match != 'true'
156
  uses: adityak74/google-drive-upload-git-action@main
157
  with:
158
  credentials: ${{ secrets.GDRIVE_LSTM_CRED }}
@@ -162,7 +163,7 @@ jobs:
162
  overwrite: "true"
163
 
164
  - name: Store Pickles to Google Drive
165
- if: env.match != 'true'
166
  uses: adityak74/google-drive-upload-git-action@main
167
  with:
168
  credentials: ${{ secrets.GDRIVE_LSTM_CRED }}
@@ -172,7 +173,7 @@ jobs:
172
  overwrite: "true"
173
 
174
  - name: Store Posttrained to Google Drive
175
- if: env.match != 'true'
176
  uses: adityak74/google-drive-upload-git-action@main
177
  with:
178
  credentials: ${{ secrets.GDRIVE_LSTM_CRED }}
@@ -182,7 +183,7 @@ jobs:
182
  overwrite: "true"
183
 
184
  - name: Remove Temporarary Files and Directories
185
- if: env.match != 'true'
186
  run: |
187
  rm models.zip
188
  rm pickles.zip
@@ -195,7 +196,7 @@ jobs:
195
  rm -rf posttrained
196
 
197
  - name: Commit changes
198
- if: env.match != 'true'
199
  run: |
200
  git config --local user.email "belajarqywok@gmail.com"
201
  git config --local user.name "belajarqywok"
@@ -203,7 +204,7 @@ jobs:
203
  git commit -m "Data Extraction, Training, and Modeling"
204
 
205
  - name: Push changes
206
- if: env.match != 'true'
207
  uses: ad-m/github-push-action@master
208
  with:
209
  github_token: ${{ secrets.GH_TOKEN }}
 
10
  - cron: "0 9 * * *"
11
  # 16 - 7 = 9
12
 
13
+
14
  jobs:
15
  scraping_extracting:
16
  name: Scraping and Extracting
 
27
  persist-credentials: false
28
  fetch-depth: 1
29
 
30
+ # - name: Read pipeline schedule date
31
+ # id: read_schedule
32
+ # run: |
33
+ # SCHEDULE_DATE=$(cat schedulers/lstm_schedule.ctl)
34
+ # echo "schedule_date=${SCHEDULE_DATE}" >> $GITHUB_ENV
35
+
36
+ # - name: Get current date
37
+ # id: get_date
38
+ # run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
39
+
40
+ # - name: Check if dates match
41
+ # id: date_check
42
+ # run: |
43
+ # if [ "$schedule_date" = "$current_date" ]; then
44
+ # echo "match=true" >> $GITHUB_ENV
45
+ # else
46
+ # echo "match=false" >> $GITHUB_ENV
47
+ # fi
48
 
49
  - name: Scraping Yahoo Finance
50
+ # if: env.match != 'true'
51
  run: |
52
  mkdir datasets
53
  go run scraper.go \
54
  --symbols-file=./postman/symbols_test.json
55
 
56
  - name: Zip Datasets
57
+ # if: env.match != 'true'
58
  run: zip -r datasets.zip datasets
59
 
60
  - name: Store Datasets to Google Drive
61
+ # if: env.match != 'true'
62
  uses: adityak74/google-drive-upload-git-action@main
63
  with:
64
  credentials: ${{ secrets.GDRIVE_LSTM_CRED }}
 
68
  overwrite: "true"
69
 
70
  - name: Upload Artifact (datasets)
71
+ # if: env.match != 'true'
72
  uses: actions/upload-artifact@v3
73
  with:
74
  name: datasets
75
  path: datasets.zip
76
 
77
  - name: Remove Temporarary Files and Directories
78
+ # if: env.match != 'true'
79
  run: |
80
  rm datasets.zip
81
  rm -rf datasets
 
97
  persist-credentials: false
98
  fetch-depth: 1
99
 
100
+ # - name: Read pipeline schedule date
101
+ # id: read_schedule
102
+ # run: |
103
+ # SCHEDULE_DATE=$(cat schedulers/lstm_schedule.ctl)
104
+ # echo "schedule_date=${SCHEDULE_DATE}" >> $GITHUB_ENV
105
+
106
+ # - name: Get current date
107
+ # id: get_date
108
+ # run: echo "current_date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
109
+
110
+ # - name: Check if dates match
111
+ # id: date_check
112
+ # run: |
113
+ # if [ "$schedule_date" = "$current_date" ]; then
114
+ # echo "match=true" >> $GITHUB_ENV
115
+ # else
116
+ # echo "match=false" >> $GITHUB_ENV
117
+ # fi
118
 
119
  - name: Install Libraries
120
+ # if: env.match != 'true'
121
  run: pip install -r requirements.txt
122
 
123
  - name: Download Artifact (datasets)
124
+ # if: env.match != 'true'
125
  uses: actions/download-artifact@v3
126
  with:
127
  name: datasets
128
 
129
  - name: Modeling and Training
130
+ # if: env.match != 'true'
131
  run: |
132
  unzip datasets.zip
133
 
 
142
  --algorithm=LSTM
143
 
144
  - name: Set Pipeline Schedule
145
+ # if: env.match != 'true'
146
  run: echo "$(date +'%Y-%m-%d')" > schedulers/lstm_schedule.ctl
147
 
148
  - name: Zip Posttrained, Models, and Pickles
149
+ # if: env.match != 'true'
150
  run: |
151
  zip -r models.zip models
152
  zip -r pickles.zip pickles
153
  zip -r posttrained.zip posttrained
154
 
155
  - name: Store Models to Google Drive
156
+ # if: env.match != 'true'
157
  uses: adityak74/google-drive-upload-git-action@main
158
  with:
159
  credentials: ${{ secrets.GDRIVE_LSTM_CRED }}
 
163
  overwrite: "true"
164
 
165
  - name: Store Pickles to Google Drive
166
+ # if: env.match != 'true'
167
  uses: adityak74/google-drive-upload-git-action@main
168
  with:
169
  credentials: ${{ secrets.GDRIVE_LSTM_CRED }}
 
173
  overwrite: "true"
174
 
175
  - name: Store Posttrained to Google Drive
176
+ # if: env.match != 'true'
177
  uses: adityak74/google-drive-upload-git-action@main
178
  with:
179
  credentials: ${{ secrets.GDRIVE_LSTM_CRED }}
 
183
  overwrite: "true"
184
 
185
  - name: Remove Temporarary Files and Directories
186
+ # if: env.match != 'true'
187
  run: |
188
  rm models.zip
189
  rm pickles.zip
 
196
  rm -rf posttrained
197
 
198
  - name: Commit changes
199
+ # if: env.match != 'true'
200
  run: |
201
  git config --local user.email "belajarqywok@gmail.com"
202
  git config --local user.name "belajarqywok"
 
204
  git commit -m "Data Extraction, Training, and Modeling"
205
 
206
  - name: Push changes
207
+ # if: env.match != 'true'
208
  uses: ad-m/github-push-action@master
209
  with:
210
  github_token: ${{ secrets.GH_TOKEN }}