## Recommend hyperparameters `autoscientist.recommend_hyperparams(AutoscientistRecommendHyperparamsParams**kwargs) -> AutoscientistRecommendHyperparamsResponse` **post** `/api/v1/autoscientist/recommend-hyperparams` Returns the hyperparameters AutoScientist derives for a model and the dataset's effective training size (rows plus planned augmentation). Nothing is launched. Omit `model` to size against the model POST /autoscientist would select for this dataset; the resolved id is returned with the values. POST /autoscientist applies the same values when `hyperparams` is omitted. ### Parameters - `dataset_id: str` The dataset the hyperparameters are sized for. Must be a dataset you own that has finished processing. - `model: Optional[str]` Base model id from GET /autoscientist/models to tune for. Omit to size the recommendation against the model POST /autoscientist selects for this dataset; the resolved id is returned in the response `model` field. That pick reads the columns already selected for the dataset, so a create request supplying `column_mapping.reasoning_trace` can resolve a different model. Pass the returned `model` back on create to pin it. - `augmentation_domain_rows: Optional[float]` Number of synthetic domain-targeted rows you plan to generate. These are additional to your own rows and count toward the effective training size, so the recommendation matches what you will launch. Defaults to 0 (no augmentation). - `augmentation_general_rows: Optional[float]` Number of synthetic general-diversity rows you plan to generate. These are additional to your own rows and count toward the effective training size. Defaults to 0 (no augmentation). ### Returns - `class AutoscientistRecommendHyperparamsResponse: …` - `model: str` Resolved base model id the recommendation is sized for: the value you sent, or the automatically selected model when `model` was omitted. Pass it back as `model` on POST /autoscientist to launch against the same model. - `hyperparams: Hyperparams` Hyperparameters derived for the resolved model and effective dataset size. POST /autoscientist applies the same values when `hyperparams` is omitted. Overriding is not advised. - `n_epochs: Optional[float]` - `batch_size: Optional[Union[Literal["max"], int, null]]` Either the literal 'max' or an integer of 1 or more. No fixed upper bound: the ceiling depends on the model and hardware, and a larger value is rejected at launch. Defaults to 'max'. - `Literal["max"]` - `"max"` - `int` - `learning_rate: Optional[float]` - `lora_r: Optional[float]` - `lora_alpha: Optional[float]` Must be 1× or 2× lora_r. Only checked when you supply lora_r in the same request; otherwise it is validated against the platform default. - `lora_dropout: Optional[float]` - `lora_trainable_modules: Optional[str]` 'all-linear' or comma-separated module list (e.g. 'q_proj,v_proj'). - `lr_scheduler_type: Optional[Literal["linear", "cosine", "constant"]]` - `"linear"` - `"cosine"` - `"constant"` - `min_lr_ratio: Optional[float]` - `scheduler_num_cycles: Optional[float]` Number of cosine decay cycles across training. Defaults to 0.5, a single half-cycle decay from the peak learning rate down to the floor. - `warmup_ratio: Optional[float]` - `max_grad_norm: Optional[float]` - `weight_decay: Optional[float]` - `train_on_inputs: Optional[bool]` Whether training loss is computed over the prompt tokens as well as the completion. `true` trains on the full sequence, `false` trains only on the completion. Omit to let the platform decide per example, which is the default. - `training_type: Optional[Literal["lora", "full"]]` Training strategy override. AutoScientist optimizes this by default; set it only when strictly necessary. - `"lora"` - `"full"` ### Example ```python import os from adaption import Adaption client = Adaption( api_key=os.environ.get("ADAPTION_API_KEY"), # This is the default and can be omitted ) response = client.autoscientist.recommend_hyperparams( dataset_id="dataset_id", ) print(response.model) ``` #### Response ```json { "model": "model", "hyperparams": { "n_epochs": 1, "batch_size": "max", "learning_rate": 0.00005, "lora_r": 8, "lora_alpha": 0, "lora_dropout": 0, "lora_trainable_modules": "q_proj,v_proj", "lr_scheduler_type": "linear", "min_lr_ratio": 0.1, "scheduler_num_cycles": 0.5, "warmup_ratio": 0.03, "max_grad_norm": 2, "weight_decay": 0, "train_on_inputs": false, "training_type": "lora" } } ```