-
Notifications
You must be signed in to change notification settings - Fork 2.4k
[docs] Add GEPA gepa_kwargs documentation #8998
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
base: main
Are you sure you want to change the base?
Conversation
dspy/teleprompt/gepa/gepa.py
Outdated
| Available parameters: | ||
| - batch_sampler: Strategy for selecting training examples. Can be a [BatchSampler](https://github.com/gepa-ai/gepa/blob/main/src/gepa/strategies/batch_sampler.py) instance or a string | ||
| ('epoch_shuffled'). Defaults to 'epoch_shuffled'. Only valid when reflection_minibatch_size is None. | ||
| - reflection_prompt_template: Custom prompt template for reflection. Must contain placeholders |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In case of DSPy, it does already provide a propose_new_texts, so this will always get ignored, UNLESS, one implements this check in the DSPyAdapter's reflection_prompt_template
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My mistake! I removed reflection_prompt_template from the docs
dspy/teleprompt/gepa/gepa.py
Outdated
| [NoImprovementStopper](https://github.com/gepa-ai/gepa/blob/main/src/gepa/utils/stop_condition.py), | ||
| or custom stopping logic. Note: This overrides the default | ||
| max_metric_calls stopping condition. | ||
| - mlflow_tracking_uri: The tracking URI to use for MLflow (when use_mlflow=True). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@TomeHirata can correct, but mlflow related args are pre-handled by the dspy <> mlflow <> gepa integration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I checked this MLFlow documentation example, and it looks like everything is handled within MLflow directly (or at least it is standard practice), I removed those args.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @GabrielLoiseau. Can you help add a doc for the "use_mlflow" argument? It's good to have docstring for all public arguments for completeness.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @TomeHirata, I added the doc for "use_mlflow" and added back the two other mlflow related args.
|
Hey, this is a great PR, thank you very much! Could you please address the few comments above? In general, try to see all the args being passed by optimize call within the dspy.GEPA->compile method, and we can hide those from the documentation. |
|
Thank you for your review! I also removed |
| 'full_eval' (evaluate every id each time) or an [EvaluationPolicy](https://github.com/gepa-ai/gepa/blob/main/src/gepa/strategies/eval_policy.py) instance. Default is 'full_eval'. | ||
| - use_mlflow: If True, enables MLflow integration to log optimization progress. | ||
| MLflow can be used alongside Weights & Biases (WandB). | ||
| - mlflow_tracking_uri: The tracking URI to use for MLflow (when use_mlflow=True). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't have mlflow_tracking_uri and mlflow_experiment_name which are configured globally.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Those are used within GEPA optimize function, should we remove them?
This PR adds documentation for additional GEPA arguments based on the official GEPA repository, improving the coverage of
gepa_kwargsindspy.teleprompt.gepa.gepa.resolve #8921