Skip to content

Commit

Permalink
update naming
Browse files Browse the repository at this point in the history
  • Loading branch information
tottenjordan committed Sep 25, 2023
1 parent db835d1 commit 5c9560a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 11 deletions.
21 changes: 10 additions & 11 deletions 03b-build-retrieval-image.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@
"metadata": {},
"outputs": [],
"source": [
"# ! gcloud artifacts repositories create $REPOSITORY --repository-format=docker --location=$LOCATION"
"! gcloud artifacts repositories create $REPOSITORY --repository-format=docker --location=$LOCATION"
]
},
{
Expand Down Expand Up @@ -473,7 +473,6 @@
"outputs": [],
"source": [
"# %%writefile {REPO_SRC}/.dockerignore\n",
"# *.yaml\n",
"# **/__pycache__\n",
"# **/*.pyc\n",
"# ranking/*\n",
Expand Down Expand Up @@ -799,12 +798,12 @@
"MODEL_ROOT_NAME = f'{APP}-{MODEL_TYPE}-{FRAMEWORK}-{VERSION}'\n",
"\n",
"# Docker definitions for training\n",
"IMAGE_NAME = f'{MODEL_ROOT_NAME}-tr'\n",
"IMAGE_URI = f'gcr.io/{PROJECT_ID}/{IMAGE_NAME}'\n",
"IMAGE_NAME = f'{MODEL_ROOT_NAME}-tr'\n",
"IMAGE_URI = f'gcr.io/{PROJECT_ID}/{IMAGE_NAME}'\n",
"\n",
"DOCKERNAME = 'tfrs'\n",
"MACHINE_TYPE ='e2-highcpu-32'\n",
"FILE_LOCATION = \"src\" # './src'\n",
"DOCKERNAME = 'tfrs'\n",
"MACHINE_TYPE ='e2-highcpu-32'\n",
"FILE_LOCATION = \"src\" # './src'\n",
"\n",
"print(f\"MODEL_ROOT_NAME : {MODEL_ROOT_NAME}\")\n",
"print(f\"IMAGE_URI : {IMAGE_URI}\")\n",
Expand Down Expand Up @@ -833,10 +832,10 @@
},
"outputs": [],
"source": [
"# ! gcloud builds submit --config src/cloudbuild.yaml \\\n",
"# --substitutions _DOCKERNAME=$DOCKERNAME,_IMAGE_URI=$IMAGE_URI,_FILE_LOCATION=$FILE_LOCATION \\\n",
"# --timeout=2h \\\n",
"# --machine-type=$MACHINE_TYPE"
"! gcloud builds submit --config src/cloudbuild.yaml \\\n",
" --substitutions _DOCKERNAME=$DOCKERNAME,_IMAGE_URI=$IMAGE_URI,_FILE_LOCATION=$FILE_LOCATION \\\n",
" --timeout=2h \\\n",
" --machine-type=$MACHINE_TYPE"
]
},
{
Expand Down
6 changes: 6 additions & 0 deletions beam_candidates/bq_to_tfr/candidate_pipeline.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
import os
# import argparse
import gcsfs
import numpy as np

os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2'

import warnings
warnings.filterwarnings('ignore')

import tensorflow as tf

from datetime import datetime
Expand Down

0 comments on commit 5c9560a

Please sign in to comment.