Skip to content

Error During Log Extraction #111

@erpupis

Description

@erpupis

When i try to apply the extract_log method from logix.lightning to my transformer i get the following error.
By inspecting the variables i understood that, even if logix tracks all the layers of the Transformer, and thus write_order_key contains all of them, nested_dict just contains logs from the first block, and it appears that the get_from_nested_dict method, if the key isn't in nested_dict, returns by default the whole dictionary itself; I tried to downgrade lightning to an older version but still doesn't work:

AttributeError Traceback (most recent call last)
in <cell line: 18>()
16 dropout_transf = p, learning_rate = lr, positional_encoding_type = pe, is_causal = is_causal, load_state=True)
17
---> 18 trainerX.extract_log(model, loader_train)
19 result = trainerX.influence(model, loader_test)

14 frames
/usr/local/lib/python3.10/dist-packages/logix/logging/mmap.py in write(save_path, filename, data_buffer, write_order_key, dtype)
61 for key in write_order_key:
62 arr = get_from_nested_dict(nested_dict, key)
---> 63 bytes = arr.nbytes
64 data_shape.append(arr.shape)
65 block_size += reduce(lambda x, y: x * y, arr.shape)

AttributeError: 'collections.defaultdict' object has no attribute 'nbytes'

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions