Commit 8adbd70d authored by Oriol Guitart's avatar Oriol Guitart
Browse files

Remove unused params file

parent e3454943
Pipeline #569 passed with stage
in 10 minutes and 10 seconds
......@@ -51,7 +51,6 @@ class clus1(BaseSignature):
self.__log.debug('signature path is: %s', signature_path)
self.data_path = os.path.join(signature_path, "clus1.h5")
self.__log.debug('data_path: %s', self.data_path)
self.__log.debug('param file: %s', self.param_file)
self.clustencoder_file = "clustencoder.h5"
self.clustcentroids_file = "clustcentroids.h5"
self.clust_info_file = "clust_stats.json"
......
......@@ -31,7 +31,6 @@ class neig1(BaseSignature):
self.__log.debug('signature path is: %s', signature_path)
self.data_path = os.path.join(signature_path, "neig1.h5")
self.__log.debug('data_path: %s', self.data_path)
self.__log.debug('param file: %s', self.param_file)
self.metric = "cosine"
self.cpu = 1
self.k_neig = 1000
......
......@@ -43,7 +43,6 @@ class proj1(BaseSignature):
self.__log.debug('signature path is: %s', signature_path)
self.data_path = os.path.join(signature_path, "proj1.h5")
self.__log.debug('data_path: %s', self.data_path)
self.__log.debug('param file: %s', self.param_file)
self.index_file = "faiss_proj1.index"
self.projections_file = "centroids.h5"
......
......@@ -25,7 +25,6 @@ class sign0(BaseSignature):
self.__log.debug('signature path is: %s', signature_path)
self.data_path = os.path.join(signature_path, "sign0.h5")
self.__log.debug('data_path: %s', self.data_path)
self.__log.debug('param file: %s', self.param_file)
for param, value in params.items():
self.__log.debug('parameter %s : %s', param, value)
......
......@@ -45,7 +45,6 @@ class BaseSignature(object):
"""Initialize or load the signature at the given path."""
self.dataset = dataset
self.signature_path = signature_path
self.param_file = os.path.join(signature_path, 'PARAMS.JSON')
self.validation_path = validation_path
if not os.path.isdir(signature_path):
......@@ -54,20 +53,7 @@ class BaseSignature(object):
original_umask = os.umask(0)
os.makedirs(signature_path, 0o775)
os.umask(original_umask)
if not params:
params = dict()
with open(self.param_file, 'w') as fh:
json.dump(params, fh)
else:
if not os.path.isfile(self.param_file):
BaseSignature.__log.warning(
"Signature missing parameter file: %s" % self.param_file)
BaseSignature.__log.warning(
"Updating with current: %s" % self.param_file)
if not params:
params = dict()
with open(self.param_file, 'w') as fh:
json.dump(params, fh)
self.model_path = os.path.join(signature_path, "models")
if not os.path.isdir(self.model_path):
BaseSignature.__log.info(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment