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_modelenumOptional

Enum representing the llm model types used in the experiments.

dv_llm_modelenumOptional

Enum representing the llm model types used in the experiments.

study_subject_llm_modelenumOptional

Enum representing the llm model types used in the experiments.

levels_llm_modelenumOptional

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
number_of_attributesintegerOptional
number_of_levelsintegerOptional
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
total_tokensintegerOptional
total_costdoubleOptional
add_neither_optionbooleanOptional
add_price_and_brand_attributesbooleanOptional
all_combinations_indexlist of lists of stringsOptional
population_traitsobjectOptional
response_type"Probabilistic" or "Discrete"Optional
Allowed values: ProbabilisticDiscrete
respondent_dependent_variablestringOptional
respondent_instructions_preamblestringOptional
experimentor_why_question_typestringOptional
experimentor_why_question_promptstringOptional
survey_countrystringOptional
survey_statestringOptional
survey_yearstringOptional
hb_folderstringOptional
hb_run_idstringOptional
is_hb_runbooleanOptional
paper_datalist of lists of stringsOptional

Response

This endpoint returns an object.
wandb_run_idstring
wandb_run_namestring