Skip to content

Commit

Permalink
feat: Create Experiments From Overrides
Browse files Browse the repository at this point in the history
  • Loading branch information
yuvrajjsingh0 committed Feb 25, 2025
1 parent 5778bf9 commit 58b5fef
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
9 changes: 4 additions & 5 deletions crates/frontend/src/components/context_card.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,14 @@ pub fn context_card(
<Show when=move || actions_supported>
<div class="h-fit text-right space-x-4">
<Show when=move || !edit_unsupported>
<button
class="btn-purple font-medium rounded-lg text-xs px-5 py-2 text-center me-1.5 mb-1.5 drawer-button"
<i
class="ri-test-tube-line ri-lg text-blue-500 cursor-pointer"
on:click=move |_| {
handle_create_experiment.call((context.get_value(), overrides.get_value()));
}
>
Create Experiment
<i class="ri-edit-2-line ml-2"></i>
</button>
</i>

<i
class="ri-pencil-line ri-lg text-blue-500 cursor-pointer"
on:click=move |_| {
Expand Down
2 changes: 1 addition & 1 deletion crates/frontend/src/components/experiment_form.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub fn experiment_form<NF>(
name: String,
context: Conditions,
variants: VariantFormTs,
overrides: Vec<(String, Value)>,
#[prop(default=vec![])] overrides: Vec<(String, Value)>,
handle_submit: NF,
default_config: Vec<DefaultConfig>,
dimensions: Vec<DimensionWithMandatory>,
Expand Down
1 change: 0 additions & 1 deletion crates/frontend/src/pages/experiment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ pub fn experiment_page() -> impl IntoView {
id=experiment.id
name=experiment_ef.name
context=experiment_ef.context.clone()
overrides=vec![]
variants=FromIterator::from_iter(experiment_ef.variants)
default_config=default_config
dimensions=dimensions
Expand Down
1 change: 0 additions & 1 deletion crates/frontend/src/pages/experiment_list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,6 @@ pub fn experiment_list() -> impl IntoView {
name="".to_string()
context=Conditions::default()
variants=VariantFormTs::default()
overrides=vec![]
dimensions=dim.clone()
default_config=def_conf.clone()
handle_submit=handle_submit_experiment_form
Expand Down

0 comments on commit 58b5fef

Please sign in to comment.