marcotcr / checklist

Beyond Accuracy: Behavioral Testing of NLP models with CheckList
MIT License
2.01k stars 204 forks source link

Read the 'pkl' file under Windows, prompt 'an integer is required (get type bytes)' #150

Open Rui-hub1 opened 1 year ago

Rui-hub1 commented 1 year ago

my read program

import checklist
from checklist.test_suite import TestSuite
suite_path = 'release_data/qqp/qqp_suite.pkl'
suite = TestSuite.from_file(suite_path)

Error reported after running the program

Traceback (most recent call last):
  File "C:\Users\Rui\Desktop\All_code\CheckList\release_data\qqp\test.py", line 4, in <module>
    suite = TestSuite.from_file(suite_path)
  File "C:\Users\Rui\Desktop\All_code\CheckList\checklist\test_suite.py", line 33, in from_file
    return load_test(path)
  File "C:\Users\Rui\Desktop\All_code\CheckList\checklist\abstract_test.py", line 13, in load_test
    return dill.load(infile)
  File "C:\ProgramData\anaconda3\envs\CheckList\lib\site-packages\dill\_dill.py", line 287, in load
    return Unpickler(file, ignore=ignore, **kwds).load()
  File "C:\ProgramData\anaconda3\envs\CheckList\lib\site-packages\dill\_dill.py", line 442, in load
    obj = StockUnpickler.load(self)
TypeError: an integer is required (got type bytes)

what I should do to solve this problem