Fix in_ci env judge with bool type. (#1171)

* Fix in_ci env judge with bool type.

* Add fix for accuracy_test.
pull/1173/head
zhangyang2057 2024-02-22 20:21:20 +08:00 committed by GitHub
parent 24fcfffac0
commit bdaf0b12c6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -115,7 +115,7 @@ class Inference:
def dump_kmodel_desc(self, file):
input_shapes = data_shape_list_string(self.inputs)
output_shapes = data_shape_list_string(self.outputs)
s = f"{len(self.inputs)} {len(self.outputs)}\n{input_shapes}\n{output_shapes}"
s = f"{len(self.inputs)} {len(self.outputs)}\n{input_shapes}\n{output_shapes}\n"
with open(file, "w+") as f:
f.write(s)

View File

@ -66,7 +66,7 @@ def dump_dict_to_json(dict, json_file):
def in_ci():
return os.getenv('CI', False)
return os.getenv('CI', 'False').lower() == 'true'
def kpu_targets():

View File

@ -62,7 +62,7 @@ def dump_dict_to_json(dict, json_file):
def in_ci():
return os.getenv('CI', False)
return os.getenv('CI', 'False').lower() == 'true'
def kpu_targets():