binbin eff75c7701
Replace sdk source and merge tests and tests20 (#7182)
Signed-off-by: Binbin Lv <binbin.lv@zilliz.com>
2021-08-20 11:00:56 +08:00

24 lines
547 B
Python

import json
import hashlib
class Env:
"""
{
"_version": "0.1",
"_type": "env",
"server_config": dict,
"OMP_NUM_THREADS": string,
}
"""
def __init__(self, server_config=None, omp_num_threads=None):
self._version = '0.1'
self._type = 'env'
self.server_config = server_config
self.OMP_NUM_THREADS = omp_num_threads
def json_md5(self):
json_str = json.dumps(vars(self), sort_keys=True)
return hashlib.md5(json_str.encode('utf-8')).hexdigest()