Skip to content

Commit

Permalink
Add CLI v2 Example of forecasting bike share notebook (Azure#1728)
Browse files Browse the repository at this point in the history
* Add CLI bike share example

* add workflow

Co-authored-by: Yuan Zhuang <[email protected]>
  • Loading branch information
yuanzhuangyuanzhuang and Yuan Zhuang authored Oct 10, 2022
1 parent 65134aa commit 96d7d46
Show file tree
Hide file tree
Showing 8 changed files with 846 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: cli-jobs-automl-standalone-jobs-cli-automl-forecasting-bike-share-cli-automl-forecasting-task-bike-share
on:
workflow_dispatch:
schedule:
- cron: "0 0/4 * * *"
pull_request:
branches:
- main
- sdk-preview
paths:
- cli/jobs/automl-standalone-jobs/cli-automl-forecasting-bike-share/**
- .github/workflows/cli-jobs-automl-standalone-jobs-cli-automl-forecasting-bike-share-cli-automl-forecasting-task-bike-share.yml
- cli/setup.sh
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: check out repo
uses: actions/checkout@v2
- name: azure login
uses: azure/login@v1
with:
creds: ${{secrets.AZ_CREDS}}
- name: setup
run: bash setup.sh
working-directory: cli
continue-on-error: true
- name: run job
run: bash -x ../../../run-job.sh cli-automl-forecasting-task-bike-share.yml
working-directory: cli/jobs/automl-standalone-jobs/cli-automl-forecasting-bike-share
6 changes: 4 additions & 2 deletions cli/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
How to Run this AutoML Job with CLI (Time-Series Forecasting)
===============================================================


Run the AutoML CLI command pointing to the .YML file in this folder plus the Azure ML IDs needed:
----------------------------------------------------------------------------------------------------


/> az ml job create --file ./cli-automl-forecasting-task-bike-share.yml --workspace-name [YOUR_AZURE_WORKSPACE] --resource-group [YOUR_AZURE_RESOURCE_GROUP] --subscription [YOUR_AZURE_SUBSCRIPTION]
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
$schema: https://azuremlsdk2.blob.core.windows.net/preview/0.0.1/autoMLJob.schema.json
type: automl

experiment_name: dpv2-cli-automl-forecasting-bike-share
# name: dpv2-sdk-forecasting-train-job-01
description: A Time-Series Forecasting job using bike share dataset
compute: azureml:cpu-cluster
task: forecasting
primary_metric: normalized_root_mean_squared_error
log_verbosity: debug

training_data:
path: "./training-mltable-folder"
type: mltable

test_data:
path: "./test-mltable-folder"
type: mltable

target_column_name: cnt
n_cross_validations: 3

limits:
timeout_minutes: 20
max_trials: 10
max_concurrent_trials: 4
trial_timeout_minutes: 20
enable_early_termination: true

forecasting:
time_column_name: "date"
forecast_horizon: 14
frequency: "D"
target_lags: "auto"
country_or_region_for_holidays: "US"

training:
enable_model_explainability: true
enable_stack_ensemble: false
blocked_training_algorithms: ["extreme_random_trees"]
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
paths:
- file: ./bike-share-test.csv
transformations:
- read_delimited:
delimiter: ','
encoding: 'ascii'
- convert_column_types:
- columns: temp
column_type: float
- columns: atemp
column_type: float
- columns: hum
column_type: float
- columns: windspeed
column_type: float
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
instant,date,season,yr,mnth,weekday,weathersit,temp,atemp,hum,windspeed,cnt
610,2012-09-01,3,1,9,6,2,0.753333,0.702654,0.638333,0.113187,6140
611,2012-09-02,3,1,9,0,2,0.696667,0.649,0.815,0.0640708,5810
612,2012-09-03,3,1,9,1,1,0.7075,0.661629,0.790833,0.151121,6034
613,2012-09-04,3,1,9,2,1,0.725833,0.686888,0.755,0.236321,6864
614,2012-09-05,3,1,9,3,1,0.736667,0.708983,0.74125,0.187808,7112
615,2012-09-06,3,1,9,4,2,0.696667,0.655329,0.810417,0.142421,6203
616,2012-09-07,3,1,9,5,1,0.703333,0.657204,0.73625,0.171646,7504
617,2012-09-08,3,1,9,6,2,0.659167,0.611121,0.799167,0.281104,5976
618,2012-09-09,3,1,9,0,1,0.61,0.578925,0.5475,0.224496,8227
619,2012-09-10,3,1,9,1,1,0.583333,0.565654,0.50375,0.258713,7525
620,2012-09-11,3,1,9,2,1,0.5775,0.554292,0.52,0.0920542,7767
621,2012-09-12,3,1,9,3,1,0.599167,0.570075,0.577083,0.131846,7870
622,2012-09-13,3,1,9,4,1,0.6125,0.579558,0.637083,0.0827208,7804
623,2012-09-14,3,1,9,5,1,0.633333,0.594083,0.6725,0.103863,8009
624,2012-09-15,3,1,9,6,1,0.608333,0.585867,0.501667,0.247521,8714
625,2012-09-16,3,1,9,0,1,0.58,0.563125,0.57,0.0901833,7333
626,2012-09-17,3,1,9,1,2,0.580833,0.55305,0.734583,0.151742,6869
627,2012-09-18,3,1,9,2,2,0.623333,0.565067,0.8725,0.357587,4073
628,2012-09-19,3,1,9,3,1,0.5525,0.540404,0.536667,0.215175,7591
629,2012-09-20,3,1,9,4,1,0.546667,0.532192,0.618333,0.118167,7720
630,2012-09-21,3,1,9,5,1,0.599167,0.571971,0.66875,0.154229,8167
631,2012-09-22,3,1,9,6,1,0.65,0.610488,0.646667,0.283583,8395
632,2012-09-23,4,1,9,0,1,0.529167,0.518933,0.467083,0.223258,7907
633,2012-09-24,4,1,9,1,1,0.514167,0.502513,0.492917,0.142404,7436
634,2012-09-25,4,1,9,2,1,0.55,0.544179,0.57,0.236321,7538
635,2012-09-26,4,1,9,3,1,0.635,0.596613,0.630833,0.2444,7733
636,2012-09-27,4,1,9,4,2,0.65,0.607975,0.690833,0.134342,7393
637,2012-09-28,4,1,9,5,2,0.619167,0.585863,0.69,0.164179,7415
638,2012-09-29,4,1,9,6,1,0.5425,0.530296,0.542917,0.227604,8555
639,2012-09-30,4,1,9,0,1,0.526667,0.517663,0.583333,0.134958,6889
640,2012-10-01,4,1,10,1,2,0.520833,0.512,0.649167,0.0908042,6778
641,2012-10-02,4,1,10,2,3,0.590833,0.542333,0.871667,0.104475,4639
642,2012-10-03,4,1,10,3,2,0.6575,0.599133,0.79375,0.0665458,7572
643,2012-10-04,4,1,10,4,2,0.6575,0.607975,0.722917,0.117546,7328
644,2012-10-05,4,1,10,5,1,0.615,0.580187,0.6275,0.10635,8156
645,2012-10-06,4,1,10,6,1,0.554167,0.538521,0.664167,0.268025,7965
646,2012-10-07,4,1,10,0,2,0.415833,0.419813,0.708333,0.141162,3510
647,2012-10-08,4,1,10,1,2,0.383333,0.387608,0.709583,0.189679,5478
648,2012-10-09,4,1,10,2,2,0.446667,0.438112,0.761667,0.1903,6392
649,2012-10-10,4,1,10,3,1,0.514167,0.503142,0.630833,0.187821,7691
650,2012-10-11,4,1,10,4,1,0.435,0.431167,0.463333,0.181596,7570
651,2012-10-12,4,1,10,5,1,0.4375,0.433071,0.539167,0.235092,7282
652,2012-10-13,4,1,10,6,1,0.393333,0.391396,0.494583,0.146142,7109
653,2012-10-14,4,1,10,0,1,0.521667,0.508204,0.640417,0.278612,6639
654,2012-10-15,4,1,10,1,2,0.561667,0.53915,0.7075,0.296037,5875
655,2012-10-16,4,1,10,2,1,0.468333,0.460846,0.558333,0.182221,7534
656,2012-10-17,4,1,10,3,1,0.455833,0.450108,0.692917,0.101371,7461
657,2012-10-18,4,1,10,4,2,0.5225,0.512625,0.728333,0.236937,7509
658,2012-10-19,4,1,10,5,2,0.563333,0.537896,0.815,0.134954,5424
659,2012-10-20,4,1,10,6,1,0.484167,0.472842,0.572917,0.117537,8090
660,2012-10-21,4,1,10,0,1,0.464167,0.456429,0.51,0.166054,6824
661,2012-10-22,4,1,10,1,1,0.4875,0.482942,0.568333,0.0814833,7058
662,2012-10-23,4,1,10,2,1,0.544167,0.530304,0.641667,0.0945458,7466
663,2012-10-24,4,1,10,3,1,0.5875,0.558721,0.63625,0.0727792,7693
664,2012-10-25,4,1,10,4,2,0.55,0.529688,0.800417,0.124375,7359
665,2012-10-26,4,1,10,5,2,0.545833,0.52275,0.807083,0.132467,7444
666,2012-10-27,4,1,10,6,2,0.53,0.515133,0.72,0.235692,7852
667,2012-10-28,4,1,10,0,2,0.4775,0.467771,0.694583,0.398008,4459
668,2012-10-29,4,1,10,1,3,0.44,0.4394,0.88,0.3582,22
669,2012-10-30,4,1,10,2,2,0.318182,0.309909,0.825455,0.213009,1096
670,2012-10-31,4,1,10,3,2,0.3575,0.3611,0.666667,0.166667,5566
671,2012-11-01,4,1,11,4,2,0.365833,0.369942,0.581667,0.157346,5986
672,2012-11-02,4,1,11,5,1,0.355,0.356042,0.522083,0.266175,5847
673,2012-11-03,4,1,11,6,2,0.343333,0.323846,0.49125,0.270529,5138
674,2012-11-04,4,1,11,0,1,0.325833,0.329538,0.532917,0.179108,5107
675,2012-11-05,4,1,11,1,1,0.319167,0.308075,0.494167,0.236325,5259
676,2012-11-06,4,1,11,2,1,0.280833,0.281567,0.567083,0.173513,5686
677,2012-11-07,4,1,11,3,2,0.295833,0.274621,0.5475,0.304108,5035
678,2012-11-08,4,1,11,4,1,0.352174,0.341891,0.333478,0.347835,5315
679,2012-11-09,4,1,11,5,1,0.361667,0.355413,0.540833,0.214558,5992
680,2012-11-10,4,1,11,6,1,0.389167,0.393937,0.645417,0.0578458,6536
681,2012-11-11,4,1,11,0,1,0.420833,0.421713,0.659167,0.1275,6852
682,2012-11-12,4,1,11,1,1,0.485,0.475383,0.741667,0.173517,6269
683,2012-11-13,4,1,11,2,2,0.343333,0.323225,0.662917,0.342046,4094
684,2012-11-14,4,1,11,3,1,0.289167,0.281563,0.552083,0.199625,5495
685,2012-11-15,4,1,11,4,2,0.321667,0.324492,0.620417,0.152987,5445
686,2012-11-16,4,1,11,5,1,0.345,0.347204,0.524583,0.171025,5698
687,2012-11-17,4,1,11,6,1,0.325,0.326383,0.545417,0.179729,5629
688,2012-11-18,4,1,11,0,1,0.3425,0.337746,0.692917,0.227612,4669
689,2012-11-19,4,1,11,1,2,0.380833,0.375621,0.623333,0.235067,5499
690,2012-11-20,4,1,11,2,2,0.374167,0.380667,0.685,0.082725,5634
691,2012-11-21,4,1,11,3,1,0.353333,0.364892,0.61375,0.103246,5146
692,2012-11-22,4,1,11,4,1,0.34,0.350371,0.580417,0.0528708,2425
693,2012-11-23,4,1,11,5,1,0.368333,0.378779,0.56875,0.148021,3910
694,2012-11-24,4,1,11,6,1,0.278333,0.248742,0.404583,0.376871,2277
695,2012-11-25,4,1,11,0,1,0.245833,0.257583,0.468333,0.1505,2424
696,2012-11-26,4,1,11,1,1,0.313333,0.339004,0.535417,0.04665,5087
697,2012-11-27,4,1,11,2,2,0.291667,0.281558,0.786667,0.237562,3959
698,2012-11-28,4,1,11,3,1,0.296667,0.289762,0.50625,0.210821,5260
699,2012-11-29,4,1,11,4,1,0.28087,0.298422,0.555652,0.115522,5323
700,2012-11-30,4,1,11,5,1,0.298333,0.323867,0.649583,0.0584708,5668
701,2012-12-01,4,1,12,6,2,0.298333,0.316904,0.806667,0.0597042,5191
702,2012-12-02,4,1,12,0,2,0.3475,0.359208,0.823333,0.124379,4649
703,2012-12-03,4,1,12,1,1,0.4525,0.455796,0.7675,0.0827208,6234
704,2012-12-04,4,1,12,2,1,0.475833,0.469054,0.73375,0.174129,6606
705,2012-12-05,4,1,12,3,1,0.438333,0.428012,0.485,0.324021,5729
706,2012-12-06,4,1,12,4,1,0.255833,0.258204,0.50875,0.174754,5375
707,2012-12-07,4,1,12,5,2,0.320833,0.321958,0.764167,0.1306,5008
708,2012-12-08,4,1,12,6,2,0.381667,0.389508,0.91125,0.101379,5582
709,2012-12-09,4,1,12,0,2,0.384167,0.390146,0.905417,0.157975,3228
710,2012-12-10,4,1,12,1,2,0.435833,0.435575,0.925,0.190308,5170
711,2012-12-11,4,1,12,2,2,0.353333,0.338363,0.596667,0.296037,5501
712,2012-12-12,4,1,12,3,2,0.2975,0.297338,0.538333,0.162937,5319
713,2012-12-13,4,1,12,4,1,0.295833,0.294188,0.485833,0.174129,5532
714,2012-12-14,4,1,12,5,1,0.281667,0.294192,0.642917,0.131229,5611
715,2012-12-15,4,1,12,6,1,0.324167,0.338383,0.650417,0.10635,5047
716,2012-12-16,4,1,12,0,2,0.3625,0.369938,0.83875,0.100742,3786
717,2012-12-17,4,1,12,1,2,0.393333,0.4015,0.907083,0.0982583,4585
718,2012-12-18,4,1,12,2,1,0.410833,0.409708,0.66625,0.221404,5557
719,2012-12-19,4,1,12,3,1,0.3325,0.342162,0.625417,0.184092,5267
720,2012-12-20,4,1,12,4,2,0.33,0.335217,0.667917,0.132463,4128
721,2012-12-21,1,1,12,5,2,0.326667,0.301767,0.556667,0.374383,3623
722,2012-12-22,1,1,12,6,1,0.265833,0.236113,0.44125,0.407346,1749
723,2012-12-23,1,1,12,0,1,0.245833,0.259471,0.515417,0.133083,1787
724,2012-12-24,1,1,12,1,2,0.231304,0.2589,0.791304,0.0772304,920
725,2012-12-25,1,1,12,2,2,0.291304,0.294465,0.734783,0.168726,1013
726,2012-12-26,1,1,12,3,3,0.243333,0.220333,0.823333,0.316546,441
727,2012-12-27,1,1,12,4,2,0.254167,0.226642,0.652917,0.350133,2114
728,2012-12-28,1,1,12,5,2,0.253333,0.255046,0.59,0.155471,3095
729,2012-12-29,1,1,12,6,2,0.253333,0.2424,0.752917,0.124383,1341
730,2012-12-30,1,1,12,0,1,0.255833,0.2317,0.483333,0.350754,1796
731,2012-12-31,1,1,12,1,2,0.215833,0.223487,0.5775,0.154846,2729
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
paths:
- file: ./bike-share-train.csv
transformations:
- read_delimited:
delimiter: ','
encoding: 'ascii'
- convert_column_types:
- columns: temp
column_type: float
- columns: atemp
column_type: float
- columns: hum
column_type: float
- columns: windspeed
column_type: float
Loading

0 comments on commit 96d7d46

Please sign in to comment.