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

avoid duplicate logging #24

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

hiromakimaki
Copy link

@junchenfeng
Hello. I tried to solve the issue #23.

I confirmed this issue was solved by this code:

from pyirt import irt

input = [
    ('user_0', 'item_0', 0),
    ('user_1', 'item_0', 1)
]

item_param, user_param = irt(input)

The logs in console of the above code are as follows. You can see duplicated logging problem is solved.

I'm glad if you review this pull request.

before

2021-07-08 04:07:32 INFO: start loading data
start loading data
2021-07-08 04:07:32 INFO: data loaded
data loaded
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 571.55it/s]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 441.97it/s]
2021-07-08 04:07:32 DEBUG: E step runs for 291.61 sec
E step runs for 291.61 sec
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 120.35it/s]
2021-07-08 04:07:32 DEBUG: M step runs for 126.464 sec
M step runs for 126.464 sec
2021-07-08 04:07:32 DEBUG: score calculating
score calculating
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 7145.32it/s]
2021-07-08 04:07:32 DEBUG: score calculated.
score calculated.
2021-07-08 04:07:32 DEBUG: 0.6018582902998789
0.6018582902998789
2021-07-08 04:07:32 DEBUG: stop condition runs for 110.94 sec
stop condition runs for 110.94 sec
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 497.72it/s]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 312.80it/s]
2021-07-08 04:07:33 DEBUG: E step runs for 248.485 sec
E step runs for 248.485 sec
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 290.42it/s]
2021-07-08 04:07:33 DEBUG: M step runs for 124.469 sec
M step runs for 124.469 sec
2021-07-08 04:07:33 DEBUG: score calculating
score calculating
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 4848.91it/s]
2021-07-08 04:07:33 DEBUG: score calculated.
score calculated.
2021-07-08 04:07:33 DEBUG: 0.6018582902998789
0.6018582902998789
2021-07-08 04:07:33 INFO: EM converged at iteration 2.
EM converged at iteration 2.
2021-07-08 04:07:33 DEBUG: stop condition runs for 105.169 sec
stop condition runs for 105.169 sec
2021-07-08 04:07:33 INFO: parameter estimated
parameter estimated
2021-07-08 04:07:33 INFO: parameter retrieved
parameter retrieved

after

2021-07-08 04:08:15 INFO: start loading data
2021-07-08 04:08:15 INFO: data loaded
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 737.46it/s]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 199.68it/s]
2021-07-08 04:08:15 DEBUG: E step runs for 282.773 sec
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 221.76it/s]
2021-07-08 04:08:15 DEBUG: M step runs for 139.378 sec
2021-07-08 04:08:15 DEBUG: score calculating
100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 7660.83it/s]
2021-07-08 04:08:15 DEBUG: score calculated.
2021-07-08 04:08:15 DEBUG: 0.6018582902998789
2021-07-08 04:08:15 DEBUG: stop condition runs for 113.277 sec
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 818.08it/s]
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 483.27it/s]
2021-07-08 04:08:16 DEBUG: E step runs for 238.975 sec
100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1/1 [00:00<00:00, 200.30it/s]
2021-07-08 04:08:16 DEBUG: M step runs for 121.835 sec
2021-07-08 04:08:16 DEBUG: score calculating
100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2/2 [00:00<00:00, 11184.81it/s]
2021-07-08 04:08:16 DEBUG: score calculated.
2021-07-08 04:08:16 DEBUG: 0.6018582902998789
2021-07-08 04:08:16 INFO: EM converged at iteration 2.
2021-07-08 04:08:16 DEBUG: stop condition runs for 104.464 sec
2021-07-08 04:08:16 INFO: parameter estimated
2021-07-08 04:08:16 INFO: parameter retrieved

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 this pull request may close these issues.

1 participant