[GH-ISSUE #12] generate_expert_config.py issues #8

Closed
opened 2026-10-26 21:06:38 +00:00 by bsakaguchi · 0 comments
Owner

Originally created by @y-he2 on GitHub (Jan 23, 2025).
Original GitHub issue: https://github.com/deepseek-ai/ESFT/issues/12

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;

Originally created by @y-he2 on GitHub (Jan 23, 2025). Original GitHub issue: https://github.com/deepseek-ai/ESFT/issues/12 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 in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/ESFT#8
No description provided.