-
Notifications
You must be signed in to change notification settings - Fork 9
Migrate existing run quickstart scripts to dev customer id
#473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
b3ec233
Migrate run_zipline_quickstart to the dev customer id
david-zlai 82e587f
should be folder
david-zlai 6460b5b
remove the gcp
david-zlai d4f886c
fix fetch
david-zlai a172765
fix import
david-zlai ab09dc5
fix lint
david-zlai File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,24 +14,24 @@ RED='\033[0;31m' | |
| WHEEL_FILE="zipline_ai-0.1.0-py3-none-any.whl " | ||
|
|
||
| # Delete gcp tables to start from scratch | ||
| bq rm -f -t canary-443022:data.quickstart_purchases_v1_test | ||
| bq rm -f -t canary-443022:data.quickstart_purchases_v1_test_upload | ||
| bq rm -f -t canary-443022:data.quickstart_purchases_v1_dev | ||
| bq rm -f -t canary-443022:data.quickstart_purchases_v1_dev_upload | ||
| #TODO: delete bigtable rows | ||
|
|
||
| # Clone the cananry configs | ||
| git clone [email protected]:zipline-ai/cananry-confs.git | ||
| cd cananry-confs | ||
|
|
||
| # Use the branch with Zipline specific team.json | ||
| git fetch origin davidhan/selects | ||
| git checkout davidhan/selects | ||
| git fetch origin davidhan/dev | ||
| git checkout davidhan/dev | ||
|
|
||
| # Create a virtualenv to fresh install zipline-ai | ||
| python3 -m venv tmp_chronon | ||
| source tmp_chronon/bin/activate | ||
|
|
||
| # Download the wheel | ||
| gcloud storage cp gs://zipline-artifacts-canary/jars/$WHEEL_FILE . | ||
| gcloud storage cp gs://zipline-artifacts-dev/jars/$WHEEL_FILE . | ||
|
|
||
| # Install the wheel (force) | ||
| pip uninstall zipline-ai | ||
|
|
@@ -63,33 +63,33 @@ zipline compile --conf=group_bys/quickstart/purchases.py | |
|
|
||
| echo -e "${GREEN}<<<<<.....................................BACKFILL.....................................>>>>>\033[0m" | ||
| touch tmp_backfill.out | ||
| zipline run --conf production/group_bys/quickstart/purchases.v1_test --dataproc 2>&1 | tee tmp_backfill.out | ||
| zipline run --conf production/group_bys/quickstart/purchases.v1_dev --dataproc 2>&1 | tee tmp_backfill.out | ||
| BACKFILL_JOB_ID=$(cat tmp_backfill.out | grep "$DATAPROC_SUBMITTER_ID_STR" | cut -d " " -f5) | ||
| check_dataproc_job_state $BACKFILL_JOB_ID | ||
|
|
||
| echo -e "${GREEN}<<<<<.....................................GROUP-BY-UPLOAD.....................................>>>>>\033[0m" | ||
| touch tmp_gbu.out | ||
| zipline run --mode upload --conf production/group_bys/quickstart/purchases.v1_test --ds 2023-12-01 --dataproc 2>&1 | tee tmp_gbu.out | ||
| zipline run --mode upload --conf production/group_bys/quickstart/purchases.v1_dev --ds 2023-12-01 --dataproc 2>&1 | tee tmp_gbu.out | ||
| GBU_JOB_ID=$(cat tmp_gbu.out | grep "$DATAPROC_SUBMITTER_ID_STR" | cut -d " " -f5) | ||
| check_dataproc_job_state $GBU_JOB_ID | ||
|
|
||
| # Need to wait for upload to finish | ||
| echo -e "${GREEN}<<<<<.....................................UPLOAD-TO-KV.....................................>>>>>\033[0m" | ||
| touch tmp_upload_to_kv.out | ||
| zipline run --mode upload-to-kv --conf production/group_bys/quickstart/purchases.v1_test --partition-string=2023-12-01 --dataproc 2>&1 | tee tmp_upload_to_kv.out | ||
| zipline run --mode upload-to-kv --conf production/group_bys/quickstart/purchases.v1_dev --partition-string=2023-12-01 --dataproc 2>&1 | tee tmp_upload_to_kv.out | ||
| UPLOAD_TO_KV_JOB_ID=$(cat tmp_upload_to_kv.out | grep "$DATAPROC_SUBMITTER_ID_STR" | cut -d " " -f5) | ||
| check_dataproc_job_state $UPLOAD_TO_KV_JOB_ID | ||
|
|
||
| echo -e "${GREEN}<<<<< .....................................METADATA-UPLOAD.....................................>>>>>\033[0m" | ||
| touch tmp_metadata_upload.out | ||
| zipline run --mode metadata-upload --conf production/group_bys/quickstart/purchases.v1_test --dataproc 2>&1 | tee tmp_metadata_upload.out | ||
| zipline run --mode metadata-upload --conf production/group_bys/quickstart/purchases.v1_dev --dataproc 2>&1 | tee tmp_metadata_upload.out | ||
| METADATA_UPLOAD_JOB_ID=$(cat tmp_metadata_upload.out | grep "$DATAPROC_SUBMITTER_ID_STR" | cut -d " " -f5) | ||
| check_dataproc_job_state $METADATA_UPLOAD_JOB_ID | ||
|
|
||
| # Need to wait for upload-to-kv to finish | ||
| echo -e "${GREEN}<<<<<.....................................FETCH.....................................>>>>>\033[0m" | ||
| touch tmp_fetch.out | ||
| zipline run --mode fetch --conf-type group_bys --name quickstart.purchases.v1_test -k '{"user_id":"5"}' --gcp 2>&1 | tee tmp_fetch.out | grep -q purchase_price_average_14d | ||
| zipline run --mode fetch --conf-type group_bys --name quickstart.purchases.v1_dev -k '{"user_id":"5"}' 2>&1 | tee tmp_fetch.out | grep -q purchase_price_average_14d | ||
| cat tmp_fetch.out | grep purchase_price_average_14d | ||
| # check if exit code of previous is 0 | ||
| if [ $? -ne 0 ]; then | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
Environment-based cloud provider detection.
Replaced flag parameter with environment variable check.
🏁 Script executed:
Length of output: 591
Review Update: Verify update consistency in environment checks.
api/py/ai/chronon/repo/run.py(line 833), using the environment variable for GCP detection is correct.--gcpstill exist inscripts/distribution/build_and_upload_artifacts.sh. Please confirm if these should be updated as well for consistency.