summaryrefslogtreecommitdiff
path: root/cli/app/search/search_dense.py
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2020-01-08 20:17:30 +0100
committerJules Laplace <julescarbon@gmail.com>2020-01-08 20:17:30 +0100
commitb9f515173f480a0468fc54d05bf134ebb15b0328 (patch)
treed473b3946ba20f95b31305e4c9c04ca17dba92df /cli/app/search/search_dense.py
parent76d4a9ed2e209cea7d3524e1b537faaabc4ca1c6 (diff)
moving in the live stuff
Diffstat (limited to 'cli/app/search/search_dense.py')
-rw-r--r--cli/app/search/search_dense.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/cli/app/search/search_dense.py b/cli/app/search/search_dense.py
index d5cbf64..5bf77fc 100644
--- a/cli/app/search/search_dense.py
+++ b/cli/app/search/search_dense.py
@@ -50,11 +50,10 @@ def find_dense_embedding_for_images(params):
SAMPLE_SIZE = params.sample_size
LOGS_DIR = os.path.join(params.path, LATENT_TAG, 'logs')
SAMPLES_DIR = os.path.join(params.path, LATENT_TAG, 'samples')
- VECTOR_DIR = os.path.join(params.path, 'vectors')
os.makedirs(LOGS_DIR, exist_ok=True)
os.makedirs(SAMPLES_DIR, exist_ok=True)
- os.makedirs(VECTOR_DIR, exist_ok=True)
+ os.makedirs(app_cfg.DIR_VECTORS, exist_ok=True)
def one_hot(values):
return np.eye(N_CLASS)[values]
@@ -426,7 +425,7 @@ def find_dense_embedding_for_images(params):
data = upload_bytes_to_cortex(params.folder_id, sample_fn + "-inverse.png", fp, "image/png")
if data is not None:
file_id = data['id']
- fp_out_pkl = os.path.join(vector_dir, "file_{}.pkl".format(file_id))
+ fp_out_pkl = os.path.join(app_cfg.DIR_VECTORS, "file_{}.pkl".format(file_id))
out_data = {
'id': file_id,
'sample_fn': sample_fn,