bitfab 0.61.1 → 0.61.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/bitfab/client.rb +9 -1
- data/lib/bitfab/http_client.rb +2 -1
- data/lib/bitfab/replay.rb +9 -2
- data/lib/bitfab/replay_registry.rb +9 -3
- data/lib/bitfab/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c3ee5133d6797e0d931936274c5d05bea38532e5879f8a55567a5417cabdd04d
|
|
4
|
+
data.tar.gz: 57666b69b7277a81a3715a3f386d8660d47d6568ef027adc7a4a10fafc02f6c2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 8a7d3b6f1f05402242f92004139803d1246be8407c3e71a8246331e8cb2d49ed811f0e54005843549490ae385e2bec32be681392241c2a866d13d502339e2e51
|
|
7
|
+
data.tar.gz: 3e2a653d2de7a0d4e64424f3a40ada97e5922968e7862701241efb41a2e3a679e715feb1899ac0e7ace5144bbb4161269b52f2bf5f66e53eef0e9d854397bcf0
|
data/lib/bitfab/client.rb
CHANGED
|
@@ -120,6 +120,13 @@ module Bitfab
|
|
|
120
120
|
# Passed alongside dataset_id or dataset_ids it pins which members of that
|
|
121
121
|
# selection replay, and the server rejects any ID none of those datasets
|
|
122
122
|
# contains
|
|
123
|
+
# @param name [String, nil] What this run is testing, in a few words, such
|
|
124
|
+
# as 'baseline' or 'shorter system prompt'. Bitfab records the commit,
|
|
125
|
+
# branch, tree state, datasets, and who ran it with every experiment, so
|
|
126
|
+
# do not repeat them here.
|
|
127
|
+
# @param notes [String, nil] Run conditions Bitfab cannot see on its own,
|
|
128
|
+
# such as an environment override or a forced feature flag. Kept on the
|
|
129
|
+
# experiment next to its name (max 10,000 characters).
|
|
123
130
|
# @param max_concurrency [Integer, nil] max threads for parallel replay (default: 10)
|
|
124
131
|
# @param code_change_description [String, nil] optional rationale for the
|
|
125
132
|
# code change being tested in this replay (stored on the experiment).
|
|
@@ -190,7 +197,7 @@ module Bitfab
|
|
|
190
197
|
# @return [Hash] with :items, :experiment_id, :experiment_url, and the
|
|
191
198
|
# deprecated aliases :test_run_id and :test_run_url carrying the same values
|
|
192
199
|
def replay(receiver, method_name = nil, trace_function_key:, limit: nil, trace_ids: nil, concurrency: nil, max_concurrency: ReplayConcurrency::UNSET,
|
|
193
|
-
name: nil, code_change_description: Replay::CODE_CHANGE_UNSET, code_change_files: Replay::CODE_CHANGE_UNSET, experiment_group_id: nil, dataset_id: nil, dataset_ids: nil, grader_ids: nil, mock: "marked", attempts: ReplayConcurrency::UNSET, only_with_assertions: false, judge_assertions: false, dry_run: false,
|
|
200
|
+
name: nil, notes: nil, code_change_description: Replay::CODE_CHANGE_UNSET, code_change_files: Replay::CODE_CHANGE_UNSET, experiment_group_id: nil, dataset_id: nil, dataset_ids: nil, grader_ids: nil, mock: "marked", attempts: ReplayConcurrency::UNSET, only_with_assertions: false, judge_assertions: false, dry_run: false,
|
|
194
201
|
adapt_inputs: nil, mock_override: nil, db_branch: nil, on_item_start: nil, on_item_finish: nil, on_progress: nil,
|
|
195
202
|
on_experiment_start: nil, experimental_selective_replay: nil)
|
|
196
203
|
Replay.run(
|
|
@@ -201,6 +208,7 @@ module Bitfab
|
|
|
201
208
|
limit:,
|
|
202
209
|
trace_ids:,
|
|
203
210
|
name:,
|
|
211
|
+
notes:,
|
|
204
212
|
concurrency:,
|
|
205
213
|
max_concurrency:,
|
|
206
214
|
attempts:,
|
data/lib/bitfab/http_client.rb
CHANGED
|
@@ -261,7 +261,7 @@ module Bitfab
|
|
|
261
261
|
# runnable graders at completion; each must be an active/live grader in the
|
|
262
262
|
# same org and trace function or the server rejects the replay
|
|
263
263
|
def start_replay(trace_function_key, limit, trace_ids: nil, code_change_description: nil,
|
|
264
|
-
code_change_files: nil, experiment_group_id: nil, name: nil, include_db_branch_lease: false, dataset_ids: nil,
|
|
264
|
+
code_change_files: nil, experiment_group_id: nil, name: nil, notes: nil, include_db_branch_lease: false, dataset_ids: nil,
|
|
265
265
|
grader_ids: nil, db_branch_settings: nil, attempts: 1, only_with_assertions: false, judge_assertions: false, include_original_metadata: false, experimental_selective_replay: nil)
|
|
266
266
|
payload = {
|
|
267
267
|
"traceFunctionKey" => trace_function_key
|
|
@@ -271,6 +271,7 @@ module Bitfab
|
|
|
271
271
|
payload["limit"] = limit unless limit.nil?
|
|
272
272
|
payload["traceIds"] = trace_ids if trace_ids
|
|
273
273
|
payload["name"] = name unless name.nil?
|
|
274
|
+
payload["notes"] = notes unless notes.nil?
|
|
274
275
|
payload["codeChangeDescription"] = code_change_description unless code_change_description.nil?
|
|
275
276
|
payload["codeChangeFiles"] = normalize_code_change_files(code_change_files) unless code_change_files.nil?
|
|
276
277
|
payload["experimentGroupId"] = experiment_group_id unless experiment_group_id.nil?
|
data/lib/bitfab/replay.rb
CHANGED
|
@@ -205,7 +205,13 @@ module Bitfab
|
|
|
205
205
|
# already determines how many traces replay. Supplying trace_ids also
|
|
206
206
|
# emits a warning.
|
|
207
207
|
# @param trace_ids [Array<String>, nil] optional list of trace IDs to replay (max 100)
|
|
208
|
-
# @param name [String, nil]
|
|
208
|
+
# @param name [String, nil] What this run is testing, in a few words, such
|
|
209
|
+
# as 'baseline' or 'shorter system prompt'. Bitfab records the commit,
|
|
210
|
+
# branch, tree state, datasets, and who ran it with every experiment, so
|
|
211
|
+
# do not repeat them here.
|
|
212
|
+
# @param notes [String, nil] Run conditions Bitfab cannot see on its own,
|
|
213
|
+
# such as an environment override or a forced feature flag. Kept on the
|
|
214
|
+
# experiment next to its name (max 10,000 characters).
|
|
209
215
|
# @param max_concurrency [Integer, nil] max threads for parallel replay (default: 10)
|
|
210
216
|
# @param code_change_description [String, nil] optional rationale for the
|
|
211
217
|
# code change being tested in this replay (stored on the experiment).
|
|
@@ -274,7 +280,7 @@ module Bitfab
|
|
|
274
280
|
# crashes the run.
|
|
275
281
|
# @return [Hash] with :items, :experiment_id, :experiment_url, and the
|
|
276
282
|
# deprecated aliases :test_run_id and :test_run_url carrying the same values
|
|
277
|
-
def run(client, receiver, method_name, trace_function_key:, limit: nil, trace_ids: nil, name: nil,
|
|
283
|
+
def run(client, receiver, method_name, trace_function_key:, limit: nil, trace_ids: nil, name: nil, notes: nil,
|
|
278
284
|
concurrency: nil, max_concurrency: ReplayConcurrency::UNSET, code_change_description: CODE_CHANGE_UNSET, code_change_files: CODE_CHANGE_UNSET, experiment_group_id: nil,
|
|
279
285
|
dataset_id: nil, dataset_ids: nil, grader_ids: nil, mock: "marked", attempts: ReplayConcurrency::UNSET, only_with_assertions: false, judge_assertions: false, dry_run: false,
|
|
280
286
|
adapt_inputs: nil, mock_override: nil, db_branch: nil, on_item_start: nil, on_item_finish: nil, on_progress: nil,
|
|
@@ -371,6 +377,7 @@ module Bitfab
|
|
|
371
377
|
effective_limit,
|
|
372
378
|
trace_ids:,
|
|
373
379
|
name:,
|
|
380
|
+
notes:,
|
|
374
381
|
code_change_description:,
|
|
375
382
|
code_change_files:,
|
|
376
383
|
experiment_group_id:,
|
|
@@ -19,7 +19,7 @@ module Bitfab
|
|
|
19
19
|
# Project-owned registry of production replay roots.
|
|
20
20
|
class ReplayRegistry
|
|
21
21
|
OPTION_NAMES = %i[
|
|
22
|
-
limit trace_ids name concurrency max_concurrency code_change_description
|
|
22
|
+
limit trace_ids name notes concurrency max_concurrency code_change_description
|
|
23
23
|
code_change_files experiment_group_id dataset_id dataset_ids grader_ids mock
|
|
24
24
|
mock_override adapt_inputs db_branch attempts only_with_assertions judge_assertions dry_run on_item_finish
|
|
25
25
|
].freeze
|
|
@@ -186,7 +186,7 @@ module Bitfab
|
|
|
186
186
|
options[:limit] = bound || 10
|
|
187
187
|
end
|
|
188
188
|
|
|
189
|
-
%i[name max_concurrency experiment_group_id dataset_ids grader_ids mock attempts only_with_assertions dry_run].each do |key|
|
|
189
|
+
%i[name notes max_concurrency experiment_group_id dataset_ids grader_ids mock attempts only_with_assertions dry_run].each do |key|
|
|
190
190
|
options[key] = args[key] unless args[key].nil?
|
|
191
191
|
end
|
|
192
192
|
|
|
@@ -284,7 +284,13 @@ module Bitfab
|
|
|
284
284
|
options.on("--seed PATH", "--cases PATH") { |value| args[:seed] = value }
|
|
285
285
|
options.on("--run") { args[:run] = true }
|
|
286
286
|
options.on("--from-trace IDS") { |value| args[:from_trace] = comma_separated("--from-trace", value) }
|
|
287
|
-
options.on("--name NAME"
|
|
287
|
+
options.on("--name NAME",
|
|
288
|
+
"What this run is testing, in a few words, such as 'baseline' or 'shorter system prompt'. " \
|
|
289
|
+
"Bitfab records the commit, branch, tree state, datasets, and who ran it with every experiment, " \
|
|
290
|
+
"so do not repeat them here.") { |value| args[:name] = value }
|
|
291
|
+
options.on("--notes TEXT",
|
|
292
|
+
"Run conditions Bitfab cannot see on its own, such as an environment override or a forced feature flag. " \
|
|
293
|
+
"Kept on the experiment next to its name.") { |value| args[:notes] = value }
|
|
288
294
|
options.on("--concurrency N", Integer) do |value|
|
|
289
295
|
args[:max_concurrency] = positive_integer("--concurrency", value)
|
|
290
296
|
end
|
data/lib/bitfab/version.rb
CHANGED