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

The experimental results cannot be replicated. script do not work! #1

Open
liveck opened this issue Sep 25, 2024 · 2 comments
Open

Comments

@liveck
Copy link

liveck commented Sep 25, 2024

when calling run_job.bash

majority/majority_exp.py", line 294, in run_experiment
    _, queries, _, keys, Q, K, _ = model(classes)
ValueError: not enough values to unpack (expected 7, got 3)

it seams that the model returns logits, qQK, keys.

how can i replicated the experimental results ?

@shakedbr
Copy link
Contributor

Hi @liveck, I committed a fix. Let me know if there are any other problems.

@liveck
Copy link
Author

liveck commented Sep 30, 2024

tensor can not be dump as json.
so, i modified the code as below.

    _, queries, keys = model(classes)
    queries = queries.tolist()
    keys = keys.tolist()
    if hidden_dim == 3:
        wandb.run.summary['queries'] = queries
        wandb.run.summary['keys'] = keys
        with open(f'{layer_norm}_keys_queries.json', 'w') as f:
            json.dump({'keys': keys, 'queries': queries}, f)

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

No branches or pull requests

2 participants