Create Experiment Async

POST

Run a novel experiment asynchronously using provided requirements.

This endpoint initiates an experiment based on the input parameters. It can handle both regular experiments and human baseline (HB) experiments. The experiment is either run immediately (in debug mode) or enqueued for processing.

Parameters:

  • req: Experiment object containing experiment details

Returns:

  • ExperimentAsyncResponse object with the following structure:
    • wandb_run_id: Unique identifier for the experiment run
    • wandb_run_name: Generated name for the experiment run

Example Response:

1{
2 "wandb_run_id": "550e8400-e29b-41d4-a716-446655440000",
3 "wandb_run_name": "causal-23-10-17-14-30-45-123"
4}

Notes:

  • For HB experiments, provide either hb_folder or hb_run_id in the request
  • The experiment is run immediately if DEBUG mode is True, otherwise it’s enqueued
  • The wandb_run_name is generated using a random causal word and the current timestamp

Raises:

  • HTTPException 500: If an error occurs during experiment creation or enqueuing

Request

This endpoint expects an object.
titlestringOptional
random_design_seedintegerOptional
attribute_shuffle_seedintegerOptional
price_generation_seedintegerOptional
population_seedintegerOptional
alternative_shuffle_seedintegerOptional
expr_llm_modelenumOptionalDefaults to gpt4

Enum representing the llm model types used in the experiments.

dv_llm_modelenumOptionalDefaults to gpt4

Enum representing the llm model types used in the experiments.

study_subject_llm_modelenumOptionalDefaults to gpt4

Enum representing the llm model types used in the experiments.

levels_llm_modelenumOptionalDefaults to gpt4

Enum representing the llm model types used in the experiments.

use_apibooleanOptional
use_threadingbooleanOptional
use_multiprocessingbooleanOptional
use_batchingbooleanOptional
is_privatebooleanOptional
survey_promptstringOptional
max_lengthintegerOptional
batch_sizeintegerOptional
attribute_countintegerOptional>=2<=7
level_countintegerOptional>=2<=10
pre_cooked_attributes_and_levels_lookuplist of lists of strings or lists of stringsOptional
levels_per_traitintegerOptional
null_levelsbooleanOptional
total_number_of_tasksintegerOptional
confidence_levelstringOptional
r_squaredintegerOptional
spearman_correlationdoubleOptional
coverage_probabilitydoubleOptional
sample_sizeintegerOptional
tasks_per_respondentintegerOptional
token_countintegerOptional
cost_amountdoubleOptional
add_neither_optionbooleanOptional
include_price_brandbooleanOptional
all_combinations_indexlist of lists of stringsOptional
population_traitsobjectOptional
response_type"probabilistic" or "discrete"Optional
Allowed values: probabilisticdiscrete
respondent_dependent_variablestringOptional
respondent_instructions_preamblestringOptional
prompt_typestringOptional
why_promptstringOptional
countrystringOptional
statestringOptional
yearstringOptional
hb_folderstringOptional
hb_run_idstringOptional
is_hb_runbooleanOptional
paper_datalist of lists of stringsOptional

Response

Successful Response

wandb_run_idstring
wandb_run_namestring