Updates paths inside attentions to the new naming scheme (local renaming)
(old_list, n_shave_prefix_segments=0)
| 77 | |
| 78 | |
| 79 | def renew_attention_paths(old_list, n_shave_prefix_segments=0): |
| 80 | """ |
| 81 | Updates paths inside attentions to the new naming scheme (local renaming) |
| 82 | """ |
| 83 | mapping = [] |
| 84 | for old_item in old_list: |
| 85 | new_item = old_item |
| 86 | mapping.append({"old": old_item, "new": new_item}) |
| 87 | |
| 88 | return mapping |
| 89 | |
| 90 | |
| 91 | def shave_segments(path, n_shave_prefix_segments=1): |
no outgoing calls
no test coverage detected
searching dependent graphs…