Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There is a error during loading data #13

Closed
WallE-Chang opened this issue Aug 13, 2018 · 8 comments · Fixed by #15
Closed

There is a error during loading data #13

WallE-Chang opened this issue Aug 13, 2018 · 8 comments · Fixed by #15

Comments

@WallE-Chang
Copy link

WallE-Chang commented Aug 13, 2018

Hi ,this is a really good tool to use. But I encounter some problem, I feed data with colmuns=[user_ID,item_ID,choice], but get error. However, I choose the part of data, It sometimes works. I find that if a item is all aright or all false pyirt will return error.

`2018-08-13 16:09:20 INFO: data loaded
data loaded
data loaded
data loaded
data loaded
data loaded
data loaded
data loaded
data loaded
data loaded
100%|████████████████████████████████████████████████████████████████████████| 10000/10000 [00:55<00:00, 179.29it/s]
0%| | 0/61615 [00:00<?, ?it/s]
--- Logging error ---
Traceback (most recent call last):
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 367, in update
map_user_idx_vec = self.dao.get_map(item_idx, ['1', '0'])
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in get_map
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
KeyError: 174
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 992, in emit
msg = self.format(record)
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 838, in format
return fmt.format(record)
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 575, in format
record.message = record.getMessage()
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 338, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "", line 1, in
File "/home/lb/pyirt-master/pyirt/_pyirt.py", line 46, in irt
mod.solve_EM()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 101, in solve_EM
self._exp_step()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 161, in _exp_step
self.__get_expect_count()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 394, in __get_expect_count
procs = procs_operator(procs, 7200, 0.1)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 27, in procs_operator
p.start()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 20, in init
self._launch(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 74, in _launch
code = process_obj._bootstrap()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap
self.run()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 373, in update
self.logger.critical("Unexpected error:", str(e))
Message: 'Unexpected error:'
Arguments: ('174',)
--- Logging error ---
Traceback (most recent call last):
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 367, in update
map_user_idx_vec = self.dao.get_map(item_idx, ['1', '0'])
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in get_map
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
KeyError: 174

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 992, in emit
msg = self.format(record)
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 838, in format
return fmt.format(record)
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 575, in format
record.message = record.getMessage()
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 338, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "", line 1, in
File "/home/lb/pyirt-master/pyirt/_pyirt.py", line 46, in irt
mod.solve_EM()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 101, in solve_EM
self._exp_step()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 161, in _exp_step
self.__get_expect_count()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 394, in __get_expect_count
procs = procs_operator(procs, 7200, 0.1)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 27, in procs_operator
p.start()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 20, in init
self._launch(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 74, in _launch
code = process_obj._bootstrap()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap
self.run()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 373, in update
self.logger.critical("Unexpected error:", str(e))
Message: 'Unexpected error:'
Arguments: ('174',)
--- Logging error ---
Traceback (most recent call last):
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 367, in update
map_user_idx_vec = self.dao.get_map(item_idx, ['1', '0'])
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in get_map
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
KeyError: 174

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 992, in emit
msg = self.format(record)
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 838, in format
return fmt.format(record)
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 575, in format
record.message = record.getMessage()
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 338, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "", line 1, in
File "/home/lb/pyirt-master/pyirt/_pyirt.py", line 46, in irt
mod.solve_EM()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 101, in solve_EM
self._exp_step()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 161, in _exp_step
self.__get_expect_count()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 394, in __get_expect_count
procs = procs_operator(procs, 7200, 0.1)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 27, in procs_operator
p.start()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 20, in init
self._launch(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 74, in _launch
code = process_obj._bootstrap()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap
self.run()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 373, in update
self.logger.critical("Unexpected error:", str(e))
Message: 'Unexpected error:'
Arguments: ('174',)
--- Logging error ---
Traceback (most recent call last):
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 367, in update
map_user_idx_vec = self.dao.get_map(item_idx, ['1', '0'])
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in get_map
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
KeyError: 174

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 992, in emit
msg = self.format(record)
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 838, in format
return fmt.format(record)
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 575, in format
record.message = record.getMessage()
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 338, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "", line 1, in
File "/home/lb/pyirt-master/pyirt/_pyirt.py", line 46, in irt
mod.solve_EM()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 101, in solve_EM
self._exp_step()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 161, in _exp_step
self.__get_expect_count()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 394, in __get_expect_count
procs = procs_operator(procs, 7200, 0.1)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 27, in procs_operator
p.start()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 20, in init
self._launch(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 74, in _launch
code = process_obj._bootstrap()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap
self.run()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 373, in update
self.logger.critical("Unexpected error:", str(e))
Message: 'Unexpected error:'
Arguments: ('174',)
--- Logging error ---
Traceback (most recent call last):
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 367, in update
map_user_idx_vec = self.dao.get_map(item_idx, ['1', '0'])
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in get_map
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
KeyError: 174

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 992, in emit
msg = self.format(record)
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 838, in format
return fmt.format(record)
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 575, in format
record.message = record.getMessage()
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 338, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "", line 1, in
File "/home/lb/pyirt-master/pyirt/_pyirt.py", line 46, in irt
mod.solve_EM()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 101, in solve_EM
self._exp_step()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 161, in _exp_step
self.__get_expect_count()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 394, in __get_expect_count
procs = procs_operator(procs, 7200, 0.1)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 27, in procs_operator
p.start()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 20, in init
self._launch(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 74, in _launch
code = process_obj._bootstrap()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap
self.run()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 373, in update
self.logger.critical("Unexpected error:", str(e))
Message: 'Unexpected error:'
Arguments: ('174',)
--- Logging error ---
Traceback (most recent call last):
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 367, in update
map_user_idx_vec = self.dao.get_map(item_idx, ['1', '0'])
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in get_map
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
KeyError: 174

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 992, in emit
msg = self.format(record)
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 838, in format
return fmt.format(record)
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 575, in format
record.message = record.getMessage()
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 338, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "", line 1, in
File "/home/lb/pyirt-master/pyirt/_pyirt.py", line 46, in irt
mod.solve_EM()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 101, in solve_EM
self._exp_step()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 161, in _exp_step
self.__get_expect_count()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 394, in __get_expect_count
procs = procs_operator(procs, 7200, 0.1)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 27, in procs_operator
p.start()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 20, in init
self._launch(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 74, in _launch
code = process_obj._bootstrap()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap
self.run()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 373, in update
self.logger.critical("Unexpected error:", str(e))
Message: 'Unexpected error:'
Arguments: ('174',)
--- Logging error ---
Traceback (most recent call last):
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 367, in update
map_user_idx_vec = self.dao.get_map(item_idx, ['1', '0'])
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in get_map
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
KeyError: 174

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 992, in emit
msg = self.format(record)
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 838, in format
return fmt.format(record)
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 575, in format
record.message = record.getMessage()
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 338, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "", line 1, in
File "/home/lb/pyirt-master/pyirt/_pyirt.py", line 46, in irt
mod.solve_EM()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 101, in solve_EM
self._exp_step()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 161, in _exp_step
self.__get_expect_count()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 394, in __get_expect_count
procs = procs_operator(procs, 7200, 0.1)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 27, in procs_operator
p.start()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 20, in init
self._launch(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 74, in _launch
code = process_obj._bootstrap()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap
self.run()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 373, in update
self.logger.critical("Unexpected error:", str(e))
Message: 'Unexpected error:'
Arguments: ('174',)
--- Logging error ---
Traceback (most recent call last):
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 367, in update
map_user_idx_vec = self.dao.get_map(item_idx, ['1', '0'])
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in get_map
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
KeyError: 174

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 992, in emit
msg = self.format(record)
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 838, in format
return fmt.format(record)
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 575, in format
record.message = record.getMessage()
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 338, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "", line 1, in
File "/home/lb/pyirt-master/pyirt/_pyirt.py", line 46, in irt
mod.solve_EM()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 101, in solve_EM
self._exp_step()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 161, in _exp_step
self.__get_expect_count()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 394, in __get_expect_count
procs = procs_operator(procs, 7200, 0.1)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 27, in procs_operator
p.start()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 20, in init
self._launch(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 74, in _launch
code = process_obj._bootstrap()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap
self.run()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 373, in update
self.logger.critical("Unexpected error:", str(e))
Message: 'Unexpected error:'
Arguments: ('174',)
--- Logging error ---
Traceback (most recent call last):
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 367, in update
map_user_idx_vec = self.dao.get_map(item_idx, ['1', '0'])
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in get_map
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
KeyError: 174

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 992, in emit
msg = self.format(record)
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 838, in format
return fmt.format(record)
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 575, in format
record.message = record.getMessage()
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 338, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "", line 1, in
File "/home/lb/pyirt-master/pyirt/_pyirt.py", line 46, in irt
mod.solve_EM()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 101, in solve_EM
self._exp_step()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 161, in _exp_step
self.__get_expect_count()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 394, in __get_expect_count
procs = procs_operator(procs, 7200, 0.1)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 27, in procs_operator
p.start()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 20, in init
self._launch(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 74, in _launch
code = process_obj._bootstrap()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap
self.run()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 373, in update
self.logger.critical("Unexpected error:", str(e))
Message: 'Unexpected error:'
Arguments: ('174',)
--- Logging error ---
Traceback (most recent call last):
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 367, in update
map_user_idx_vec = self.dao.get_map(item_idx, ['1', '0'])
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in get_map
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
KeyError: 174

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 992, in emit
msg = self.format(record)
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 838, in format
return fmt.format(record)
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 575, in format
record.message = record.getMessage()
File "/home/lb/anaconda3/lib/python3.6/logging/init.py", line 338, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "", line 1, in
File "/home/lb/pyirt-master/pyirt/_pyirt.py", line 46, in irt
mod.solve_EM()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 101, in solve_EM
self._exp_step()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 161, in _exp_step
self.__get_expect_count()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 394, in __get_expect_count
procs = procs_operator(procs, 7200, 0.1)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 27, in procs_operator
p.start()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 20, in init
self._launch(process_obj)
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/popen_fork.py", line 74, in _launch
code = process_obj._bootstrap()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap
self.run()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 373, in update
self.logger.critical("Unexpected error:", str(e))
Message: 'Unexpected error:'
Arguments: ('174',)
Process Process-168:
Traceback (most recent call last):
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 249, in _bootstrap
self.run()
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 374, in update
raise e
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 367, in update
map_user_idx_vec = self.dao.get_map(item_idx, ['1', '0'])
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in get_map
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
File "/home/lb/pyirt-master/pyirt/dao.py", line 150, in
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
KeyError: 174
Traceback (most recent call last):
File "", line 1, in
File "/home/lb/pyirt-master/pyirt/_pyirt.py", line 46, in irt
mod.solve_EM()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 101, in solve_EM
self._exp_step()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 161, in _exp_step
self.__get_expect_count()
File "/home/lb/pyirt-master/pyirt/solver/model.py", line 399, in __get_expect_count
self.item_expected_right_by_theta[:, item_idx] = procs_repo[item_idx][1]
File "", line 2, in getitem
File "/home/lb/anaconda3/lib/python3.6/multiprocessing/managers.py", line 772, in _callmethod
raise convert_to_error(kind, result)
KeyError: 174
`

@gracielamobwise
Copy link

Hi, WallE-Chang! I'm having the same situation here.
Although I was able to run it successfully once, now I see this error log

(Have you found any solution?)

2018-09-21 16:38:48 INFO: start loading data
start loading data
************************** ['11001138433007', '11001138433007'] ['1', '2'] [1, 0]
2018-09-21 16:38:48 INFO: data loaded
data loaded
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 639.77it/s]
0%| | 0/2 [00:00<?, ?it/s]6666666666666666666666666666666666666CHAMADAGET_MAP 0
TTTTTTTTTTTTTTTTTTTTTTTTTTTTTTGET_MAP3 ['1', '0']

--- Logging error ---
Traceback (most recent call last):
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/solver/model.py", line 368, in update
map_user_idx_vec = self.dao.get_map(item_idx, ['1', '0'])
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/dao.py", line 152, in get_map
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/dao.py", line 152, in
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
KeyError: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.6/logging/init.py", line 993, in emit
msg = self.format(record)
File "/usr/lib/python3.6/logging/init.py", line 839, in format
return fmt.format(record)
File "/usr/lib/python3.6/logging/init.py", line 576, in format
record.message = record.getMessage()
File "/usr/lib/python3.6/logging/init.py", line 338, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "", line 1, in
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/_pyirt.py", line 46, in irt
mod.solve_EM()
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/solver/model.py", line 101, in solve_EM
self._exp_step()
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/solver/model.py", line 161, in _exp_step
self.__get_expect_count()
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/solver/model.py", line 395, in __get_expect_count
procs = procs_operator(procs, 7200, 0.1)
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/solver/model.py", line 27, in procs_operator
p.start()
File "/usr/lib/python3.6/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
File "/usr/lib/python3.6/multiprocessing/context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/usr/lib/python3.6/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "/usr/lib/python3.6/multiprocessing/popen_fork.py", line 19, in init
self._launch(process_obj)
File "/usr/lib/python3.6/multiprocessing/popen_fork.py", line 73, in _launch
code = process_obj._bootstrap()
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/solver/model.py", line 374, in update
self.logger.critical("Unexpected error:", str(e))
Message: 'Unexpected error:'
Arguments: ('0',)
--- Logging error ---
Traceback (most recent call last):
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/solver/model.py", line 368, in update
map_user_idx_vec = self.dao.get_map(item_idx, ['1', '0'])
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/dao.py", line 152, in get_map
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/dao.py", line 152, in
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
KeyError: 0

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/lib/python3.6/logging/init.py", line 993, in emit
msg = self.format(record)
File "/usr/lib/python3.6/logging/init.py", line 839, in format
return fmt.format(record)
File "/usr/lib/python3.6/logging/init.py", line 576, in format
record.message = record.getMessage()
File "/usr/lib/python3.6/logging/init.py", line 338, in getMessage
msg = msg % self.args
TypeError: not all arguments converted during string formatting
Call stack:
File "", line 1, in
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/_pyirt.py", line 46, in irt
mod.solve_EM()
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/solver/model.py", line 101, in solve_EM
self._exp_step()
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/solver/model.py", line 161, in _exp_step
self.__get_expect_count()
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/solver/model.py", line 395, in __get_expect_count
procs = procs_operator(procs, 7200, 0.1)
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/solver/model.py", line 27, in procs_operator
p.start()
File "/usr/lib/python3.6/multiprocessing/process.py", line 105, in start
self._popen = self._Popen(self)
File "/usr/lib/python3.6/multiprocessing/context.py", line 223, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/usr/lib/python3.6/multiprocessing/context.py", line 277, in _Popen
return Popen(process_obj)
File "/usr/lib/python3.6/multiprocessing/popen_fork.py", line 19, in init
self._launch(process_obj)
File "/usr/lib/python3.6/multiprocessing/popen_fork.py", line 73, in _launch
code = process_obj._bootstrap()
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/solver/model.py", line 374, in update
self.logger.critical("Unexpected error:", str(e))
Message: 'Unexpected error:'
Arguments: ('0',)
Process Process-4:
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/process.py", line 258, in _bootstrap
self.run()
File "/usr/lib/python3.6/multiprocessing/process.py", line 93, in run
self._target(*self._args, **self._kwargs)
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/solver/model.py", line 375, in update
raise e
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/solver/model.py", line 368, in update
map_user_idx_vec = self.dao.get_map(item_idx, ['1', '0'])
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/dao.py", line 152, in get_map
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/dao.py", line 152, in
return [self.database.item2user_map[str(ans_key)][item_idx] for ans_key in ans_key_list]
KeyError: 0
Traceback (most recent call last):
File "", line 1, in
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/_pyirt.py", line 46, in irt
mod.solve_EM()
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/solver/model.py", line 101, in solve_EM
self._exp_step()
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/solver/model.py", line 161, in _exp_step
self.__get_expect_count()
File "/home/graciela/descomplica/pyirt/pyirt/pyirt/solver/model.py", line 400, in __get_expect_count
self.item_expected_right_by_theta[:, item_idx] = procs_repo[item_idx][1]
File "", line 2, in getitem
File "/usr/lib/python3.6/multiprocessing/managers.py", line 772, in _callmethod
raise convert_to_error(kind, result)
KeyError: 0

@junchenfeng
Copy link
Contributor

Hi, guys. Thanks for reporting the bug. This bug likely to be caused by a mismatch when pyirt map the long format to user2item and item2user sparse storage. Can you kindly share the data with me so that I can use it as unit-test in the bug-fix test.

@akhilbatra898
Copy link

Hi the issue is still persisting. Is it fixed in the latest release?

@junchenfeng junchenfeng reopened this Jul 18, 2019
@junchenfeng
Copy link
Contributor

I think the problem should be fixed @ 0.3.4, which is just released on pypi. However, I never get to add the unittest so I cannot be sure it is so. I re-open this issue so if it is not fixed, pls let me know.

@akhilbatra898
Copy link

Hi I updated to 0.3.4.

Its working now. Thanks a lot :).

@WallE-Chang
Copy link
Author

good job !!! However, I can't wait to fix it and wrote a tensorflow_irt by myself 23333

@junchenfeng
Copy link
Contributor

I would love to see that on your github if you can share it. I did not even know you can put structure on neural network

@WallE-Chang
Copy link
Author

@junchenfeng Sorry, I can not share it owing of copyright of my ex company. However, you can use gradient decent replacing EM algorithm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants