- 用md5
import hashlib
_a = hashlib.md5(_model_file.encode('utf-8')).hexdigest()
resource_name = f'tfmodel_{_a}.tar.gz'
- 不能缩短
import base64
_a = base64.standard_b64decode(args['oss_model_file']).hex()
标签:hashlib,base64,利用,file,命名,import,model,md5
From: https://www.cnblogs.com/bregman/p/16606974.html