Skip to content

Commit

Permalink
oops
Browse files Browse the repository at this point in the history
  • Loading branch information
rtjoa committed Dec 31, 2024
1 parent f636262 commit ad52aa4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion qc/benchmarks/benchmarks.jl
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ function produce_loss(rs::RunState, m::FeatureSpecEntropyLossMgr, epoch::Integer

lpr_eq = LogPr(prob_equals(m.generation.value, sample))
lpr_eq = Dice.expand_logprs(l, lpr_eq)
empirical_feature_logpr = log(feature_counts[m.p.feature(sample)]/length(samples))
empirical_feature_logpr = Dice.Constant(log(feature_counts[m.p.feature(sample)]/length(samples)))
if m.p.train_feature
[lpr_eq * empirical_feature_logpr, empirical_feature_logpr]
else
Expand Down
8 changes: 5 additions & 3 deletions qc/benchmarks/main.jl
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ BOUND_LIST = [0.]

PROPERTY_LIST = [nothing]

n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, BOUND_LIST]))
TRAIN_FEATURE_LIST = [false, true]

n_runs = prod(map(length, [GENERATION_PARAMS_LIST, LR_LIST, PROPERTY_LIST, RESAMPLING_FREQUENCY_LIST, SAMPLES_PER_BATCH_LIST, EPOCHS_LIST, BOUND_LIST, TRAIN_FEATURE_LIST]))
println(n_runs)
@assert n_runs <= 12

Expand All @@ -52,15 +54,15 @@ println()
LOSS_CONFIG_WEIGHT_PAIRS_LIST = collect(Iterators.flatten([
(
[
FeatureSpecEntropy{STLC}(resampling_frequency,samples_per_batch,wellTyped,typecheck_ft,false) => lr,
FeatureSpecEntropy{STLC}(resampling_frequency,samples_per_batch,wellTyped,typecheck_ft,true) => lr,
FeatureSpecEntropy{STLC}(resampling_frequency,samples_per_batch,wellTyped,typecheck_ft,train_feature) => lr,
# MLELossConfig{STLC}(num_apps, Uniform()) => lr,
# MLELossConfig{STLC}(size, Uniform()) => lr,
]
for lr in LR_LIST
for property in PROPERTY_LIST
for resampling_frequency in RESAMPLING_FREQUENCY_LIST
for samples_per_batch in SAMPLES_PER_BATCH_LIST
for train_feature in TRAIN_FEATURE_LIST
),
]))

Expand Down

0 comments on commit ad52aa4

Please sign in to comment.