Skip to content

Commit 30d9fa6

Browse files
Initial commit — Citi Bike prediction system
0 parents  commit 30d9fa6

38 files changed

Lines changed: 19101 additions & 0 deletions
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: citibike_rides_hourly_features_pipeline
2+
on:
3+
schedule:
4+
- cron: "0 * * * *" # Runs every hour
5+
workflow_dispatch: {} # Allows manual triggering of the workflow
6+
7+
jobs:
8+
run-python-script:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.11" # Specify the Python version
19+
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install -r requirements_feature_pipeline.txt
24+
25+
- name: Debug Secrets
26+
run: echo "HOPSWORKS_API_KEY=${{ secrets.HOPSWORKS_API_KEY }}"
27+
28+
- name: Run new data fetch pipeline and load to hopsworks
29+
env:
30+
HOPSWORKS_API_KEY: ${{ secrets.HOPSWORKS_API_KEY }}
31+
run: python -m pipelines.feature_pipeline
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: citibike_rides_hourly_inference_pipeline
2+
3+
on:
4+
schedule:
5+
- cron: "5 * * * *" # Runs every hour
6+
workflow_dispatch: {}
7+
8+
workflow_dispatch: # Allows manual triggering of the workflow
9+
10+
jobs:
11+
run-python-script:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v4
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.11' # Specify the Python version
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install --upgrade pip
26+
pip install -r requirements.txt # Install dependencies if a requirements file exists
27+
28+
- name: Run new data fetch pipeline and load to hopsworks
29+
env:
30+
HOPSWORKS_API_KEY: ${{ secrets.HOPSWORKS_API_KEY}}
31+
run: python -m pipelines.inference_pipeline
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: citibike_rides_model_training_pipeline
2+
on:
3+
schedule:
4+
- cron: '0 0 * * 1' # Runs every Monday at midnight
5+
workflow_dispatch: # Allows manual triggering of the workflow
6+
7+
jobs:
8+
run-python-script:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v5
17+
with:
18+
python-version: '3.11' # Specify the Python version
19+
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install -r requirements.txt
24+
25+
- name: Train model on new data
26+
env:
27+
HOPSWORKS_API_KEY: ${{ secrets.HOPSWORKS_API_KEY }}
28+
run: python -m pipelines.model_training_pipeline

0 commit comments

Comments
 (0)