kinu-garage / nton_matching

Apache License 2.0
0 stars 0 forks source link

Minimal viable state #6

Closed 130s closed 7 months ago

130s commented 9 months ago

Get the tool working for just one input.

CoS

130s commented 8 months ago
Output 2/09 ``` # gjls_match /cws/src/daffidwilde/matching/src/matching/matchings.py:3: DeprecationWarning: Pyarrow will become a required dependency of pandas in the next major release of pandas (pandas 3.0), (to allow more performant data types, such as the Arrow string type, and better interoperability with other libraries) but was not found to be installed on your system. If this would cause problems for you, please provide us feedback at https://github.com/pandas-dev/pandas/issues/54466 import pandas Python sys.path: ['/usr/local/bin', '/usr/local/lib/python39.zip', '/usr/local/lib/python3.9', '/usr/local/lib/python3.9/lib-dynload', '/root/.local/lib/python3.9/site-packages', '/cws/src/daffidwilde/matching/src', '/usr/local/lib/python3.9/site-packages', '/cws/src/130s/nton_matching/n_to_n_matching/src'] INFO:n_to_n_matching.matcher:dates_attention: [, , , ] dates_lgtm: [] INFO:n_to_n_matching.matcher:#dates 4 INFO:n_to_n_matching.matcher:max_allowance: {: {'max_occurence': 2, 'num_unlucky_person': 0}, : {'max_occurence': 2, 'num_unlucky_person': 2}, : {'max_occurence': 2, 'num_unlucky_person': 2}} INFO:n_to_n_matching.matcher:BEFORE assigning: Date=2024-04-01 assignees stored. Leader: [], Committee: [], Non-commitee: [] WARNING:n_to_n_matching.matcher:TBD hmmm not sure what this means, needs looked into. _enough_leaders: True, _enough_committee: True, _enough_noncommittee: False WARNING:n_to_n_matching.matcher:TBD hmmm not sure what this means, needs looked into. _enough_leaders: True, _enough_committee: True, _enough_noncommittee: False INFO:n_to_n_matching.matcher:At the end of `_assign_day` Date=2024-04-01 assignees stored. Leader: [guardian-name1], Committee: [guardian-name2, guardian-name3], Non-commitee: [guardian-name6, guardian-name7, guardian-name8] INFO:n_to_n_matching.matcher:AFTER assigning a day: Date=2024-04-01 assignees stored. Leader: [guardian-name1], Committee: [guardian-name2, guardian-name3], Non-commitee: [guardian-name6, guardian-name7, guardian-name8] INFO:n_to_n_matching.matcher:BEFORE assigning: Date=2024-04-08 assignees stored. Leader: [guardian-name1], Committee: [guardian-name2, guardian-name3], Non-commitee: [guardian-name6, guardian-name7, guardian-name8] INFO:n_to_n_matching.matcher:At the end of `_assign_day` Date=2024-04-08 assignees stored. Leader: [guardian-name1], Committee: [guardian-name2, guardian-name3], Non-commitee: [guardian-name6, guardian-name7, guardian-name8] INFO:n_to_n_matching.matcher:AFTER assigning a day: Date=2024-04-08 assignees stored. Leader: [guardian-name1], Committee: [guardian-name2, guardian-name3], Non-commitee: [guardian-name6, guardian-name7, guardian-name8] INFO:n_to_n_matching.matcher:BEFORE assigning: Date=2024-04-15 assignees stored. Leader: [guardian-name1], Committee: [guardian-name2, guardian-name3], Non-commitee: [guardian-name6, guardian-name7, guardian-name8] INFO:n_to_n_matching.matcher:At the end of `_assign_day` Date=2024-04-15 assignees stored. Leader: [guardian-name1], Committee: [guardian-name2, guardian-name3], Non-commitee: [guardian-name6, guardian-name7, guardian-name8] INFO:n_to_n_matching.matcher:AFTER assigning a day: Date=2024-04-15 assignees stored. Leader: [guardian-name1], Committee: [guardian-name2, guardian-name3], Non-commitee: [guardian-name6, guardian-name7, guardian-name8] INFO:n_to_n_matching.matcher:BEFORE assigning: Date=2024-04-22 assignees stored. Leader: [guardian-name1], Committee: [guardian-name2, guardian-name3], Non-commitee: [guardian-name6, guardian-name7, guardian-name8] INFO:n_to_n_matching.matcher:At the end of `_assign_day` Date=2024-04-22 assignees stored. Leader: [guardian-name1], Committee: [guardian-name2, guardian-name3], Non-commitee: [guardian-name6, guardian-name7, guardian-name8] INFO:n_to_n_matching.matcher:AFTER assigning a day: Date=2024-04-22 assignees stored. Leader: [guardian-name1], Committee: [guardian-name2, guardian-name3], Non-commitee: [guardian-name6, guardian-name7, guardian-name8] Traceback (most recent call last): File "/usr/local/bin/gjls_match", line 8, in sys.exit(main()) File "/cws/src/130s/nton_matching/n_to_n_matching/src/n_to_n_matching/__main__.py", line 8, in main test_1() File "/cws/src/130s/nton_matching/n_to_n_matching/src/n_to_n_matching/test_main.py", line 128, in test_1 solution = game.solve() File "/cws/src/130s/nton_matching/n_to_n_matching/src/n_to_n_matching/matcher.py", line 580, in solve self._matching = GjVolunteerMatching( File "/cws/src/130s/nton_matching/n_to_n_matching/src/n_to_n_matching/matcher.py", line 84, in __init__ super().__init__(dictionary) File "/cws/src/daffidwilde/matching/src/matching/matchings.py", line 83, in __init__ super().__init__(dictionary) File "/cws/src/daffidwilde/matching/src/matching/base.py", line 225, in __init__ self._data.update(dictionary) TypeError: cannot convert dictionary update sequence element #0 to a sequence ```

I'm seeing issues: (moved to OP)

130s commented 8 months ago
I see the inner list objects are all pointing to the same memory address... ``` INFO:n_to_n_matching.matcher:Debug: 142: Date=2024-04-22 assignees stored. Leader: [], Committee: [], Non-commitee: [] [1894/30291] INFO:n_to_n_matching.matcher:Debug: 116 Memory addr of date.assignees_leader: 139812035944064: Date=2024-04-01 assignees stored. Leader: [guardian-name1], Committee: [], Non-commitee: [] INFO:n_to_n_matching.matcher:Debug: 116 Memory addr of date.assignees_leader: 139812035944064: Date=2024-04-08 assignees stored. Leader: [guardian-name1], Committee: [], Non-commitee: [] INFO:n_to_n_matching.matcher:Debug: 116 Memory addr of date.assignees_leader: 139812035944064: Date=2024-04-15 assignees stored. Leader: [guardian-name1], Committee: [], Non-commitee: [] INFO:n_to_n_matching.matcher:Debug: 116 Memory addr of date.assignees_leader: 139812035944064: Date=2024-04-22 assignees stored. Leader: [guardian-name1], Committee: [], Non-commitee: [] INFO:n_to_n_matching.matcher:Debug: 114: Date=2024-04-01 assignees stored. Leader: [guardian-name1], Committee: [], Non-commitee: [] INFO:n_to_n_matching.matcher:Debug: 114: Date=2024-04-08 assignees stored. Leader: [guardian-name1], Committee: [], Non-commitee: [] INFO:n_to_n_matching.matcher:Debug: 114: Date=2024-04-15 assignees stored. Leader: [guardian-name1], Committee: [], Non-commitee: [] INFO:n_to_n_matching.matcher:Debug: 114: Date=2024-04-22 assignees stored. Leader: [guardian-name1], Committee: [], Non-commitee: [] INFO:n_to_n_matching.matcher:Debug: 141: Date=2024-04-01 assignees stored. Leader: [guardian-name1], Committee: [], Non-commitee: [] INFO:n_to_n_matching.matcher:Debug: 141: Date=2024-04-08 assignees stored. Leader: [guardian-name1], Committee: [], Non-commitee: [] ```
130s commented 8 months ago

Now one issue is resolved in https://github.com/kinu-garage/nton_matching/issues/6#issuecomment-1938855631 then got a new one.

130s commented 8 months ago
  • [ ] Some, not all, persons that just got assigned in a previous round of an iteration for a date get emptied.

This was caused by a temporary debug code, which is removed now so no issue.

130s commented 8 months ago
  • [ ] All 4 days the same persons are assigned.

Every person is put into free_workers stack and no one in the other stacks is absolutely wrong. There must be a bug.

INFO:n_to_n_matching.matcher:151 free_workers [guardian-name1, guardian-name2, guardian-name3, guardian-name4, guardian-name5, guardian-name6, guardian-name7, guardian-name8, guardian-name9, guardian-name10]
fullybookd_workers []
overlybooked_workers []
130s commented 8 months ago
130s commented 8 months ago
130s commented 8 months ago
130s commented 8 months ago
130s commented 8 months ago
130s commented 8 months ago
130s commented 6 months ago

Released 0.1.1.