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

generate_expert_config.py issues #12

Open
y-he2 opened this issue Jan 23, 2025 · 0 comments
Open

generate_expert_config.py issues #12

y-he2 opened this issue Jan 23, 2025 · 0 comments

Comments

@y-he2
Copy link

y-he2 commented Jan 23, 2025

Directly running the example command in the README:

python scripts/expert/generate_expert_config.py \
    --eval_datasets=intent,summary,law,translation \
    --expert_scores_dir=results/expert_scores \
    --output_dir=results/expert_configs \
    --score_function=token \
    --top_p=0.2 # the scoring function and top_p are hyperparameters

raised:
generate_expert_config.py: error: the following arguments are required: --eval_dataset, --output_path

Looked into the script it reads:

    parser.add_argument("--eval_dataset", type=str, required=True)
    parser.add_argument("--expert_scores_dir", type=str, required=True)
    parser.add_argument("--output_path", type=str, required=True)
    parser.add_argument("--score_function", type=str, required=True)
    parser.add_argument("--top_p", type=float, required=True)
    parser.add_argument("--train_shared_experts", action="store_true")
    parser.add_argument("--train_non_expert_modules", action="store_true")

After changed the example command to:
python scripts/expert/generate_expert_config.py
--eval_dataset=summary
--expert_scores_dir=results/expert_scores
--output_path=results/expert_configs
--score_function=token --top_p=0.2
raised:

..../generate_expert_config.py", line 96, in <module>
    with open(args.output_path, "w") as f:
IsADirectoryError: [Errno 21] Is a directory: 'results/expert_configs'

Suspect the doc is outdated, pls update the doc or code accordingly. Specifically:
eval_dataset vs eval_datasets;
output_path vs output_dir;

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

1 participant