instance_id
stringlengths
10
65
repo
stringlengths
5
59
pr_number
int64
1
313k
task_type
stringclasses
1 value
base_commit
stringlengths
40
40
review_commit
stringlengths
40
40
title
stringlengths
2
282
body
stringlengths
7
3k
patch
stringlengths
202
204k
n_defects
int64
1
72
n_supported
int64
1
65
n_major
int64
0
32
defects
stringlengths
140
18.8k
certifier_count
int64
allegro__hermes__383
allegro/hermes
383
defect
8bb8f8c6c9f8fceacf508699a186bd373da1ba0d
b44ccd41d07aaefee092342face89aade1f100b6
added Hermes-Retry-Count header in Consumers
also changed behavior of Retry-After not to slow down message sending when used
diff --git a/docs/docs/user/subscribing.md b/docs/docs/user/subscribing.md index 6edeb4fe5f9..27ccae7f2b6 100644 --- a/docs/docs/user/subscribing.md +++ b/docs/docs/user/subscribing.md @@ -73,7 +73,8 @@ with new status name in body (quotation marks are important!): Hermes treats any response with **2xx** status code...
2
2
0
[{"id": "G0", "claim": "The private method should be renamed from `attemptResending` to `shouldAttemptResending` so the name reads as a predicate.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The two bullet points of the Retries counter sectio...
null
allegro__hermes__519
allegro/hermes
519
defect
3285931474ec941c794d0dab3f3765a0703f0f35
3d63e8670ede1cd7555e1924c76499dc1774d2fa
Subscription EndpointAddressResolverMetadata
Introducing EndpointAddressResolverMetadata. `Map` implementation. resolves #514
diff --git a/hermes-api/src/main/java/pl/allegro/tech/hermes/api/EndpointAddressResolverMetadata.java b/hermes-api/src/main/java/pl/allegro/tech/hermes/api/EndpointAddressResolverMetadata.java new file mode 100644 index 00000000000..bb6b4344588 --- /dev/null +++ b/hermes-api/src/main/java/pl/allegro/tech/hermes/api/End...
2
1
0
[{"id": "G0", "claim": "Add a `getOrDefault` method to EndpointAddressResolverMetadata for looking up entries with a default value.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Also add typed convenience accessors such as `getStringOrDefault` or `getIn...
null
allegro__hermes__62
allegro/hermes
62
defect
6d6f1d6a924b3896f9c1f141b42a5e9847cd7818
d3d3bc40f89c46818330cdf9f93db8faa3442007
fixing #52 hermes client retry on exception
Hermes client retrying on sender exception + response refactor (builder / api).
diff --git a/hermes-client/src/main/java/pl/allegro/tech/hermes/client/HermesClient.java b/hermes-client/src/main/java/pl/allegro/tech/hermes/client/HermesClient.java index 3d376ee593f..79ecc496b5c 100644 --- a/hermes-client/src/main/java/pl/allegro/tech/hermes/client/HermesClient.java +++ b/hermes-client/src/main/java...
1
1
0
[{"id": "G0", "claim": "The null check in build() can be avoided by initializing the retryCondition field at its declaration.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
allegro__hermes__688
allegro/hermes
688
defect
bb881584c8bfe6ca237799e62d94171069f94863
69005d34a58a4f527a0fddeda99ad5b5e786a202
Selective algorithm healing
This PR solves two issues: - inconsistent distribution of assignments could happen when assignment cache was not built completely when workload balancing took place - failed creations of consumers resulted in those consumer processes being missing and never re-created In the first case, initializing the cache wi...
diff --git a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/supervisor/ConsumerFactory.java b/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/supervisor/ConsumerFactory.java index d1e8f49361c..afd70430d46 100644 --- a/hermes-consumers/src/main/java/pl/allegro/tech/hermes/consumers/super...
5
5
2
[{"id": "G0", "claim": "The monitor should print warnings when it is about to fix the runtime tree, otherwise long-term issues may go unnoticed.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "log() should not be public and the methods of Consume...
null
allegro__hermes__719
allegro/hermes
719
defect
e745c1e95869e37f59a13c3a9d3ac3f17bb0365d
083c6c5170dc1344c68d5007f577125ba5b1b2a4
Customizable owner usage hints
Owner sources may now define a usage hint that will be presented in the console when adding or editing a topic or a subscription. Also refactored autocompletion as an optional override in the `OwnerSource` interface instead of a subinterface.
diff --git a/hermes-console/static/partials/ownerSelector.html b/hermes-console/static/partials/ownerSelector.html index a422f1d8959..ad5adeba20c 100644 --- a/hermes-console/static/partials/ownerSelector.html +++ b/hermes-console/static/partials/ownerSelector.html @@ -11,9 +11,9 @@ <label ng-if="!sourceSelectModel...
1
1
0
[{"id": "G0", "claim": "The usage hint string added in management code is the first of its kind there while all the rest live in the console, so it should be part of the console instead.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
allegro__hermes__722
allegro/hermes
722
defect
2c4e1d459df563b7596959380d174597bed15ecf
a129cb046cd1f0cae7b0384037b39ea1bdfe6d08
Frontend security context initialization (authentication configuration)
This PR introduces an ability to configure [Undertow's security context](http://undertow.io/undertow-docs/undertow-docs-1.3.0/index.html#security) using custom parts. The authentication handlers chain that is created is similar to the one described in [Undertow's documentation](http://undertow.io/undertow-docs/undert...
diff --git a/hermes-common/src/main/java/pl/allegro/tech/hermes/common/config/Configs.java b/hermes-common/src/main/java/pl/allegro/tech/hermes/common/config/Configs.java index c27de9e7fe0..2af99e244a0 100644 --- a/hermes-common/src/main/java/pl/allegro/tech/hermes/common/config/Configs.java +++ b/hermes-common/src/mai...
1
1
1
[{"id": "G0", "claim": "The body of withAuthenticationHandlersChain should be surrounded with a try-catch to handle potentially unreadable exceptions such as the valueOf call for AuthenticationMode.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
allegro__hermes__760
allegro/hermes
760
defect
812a305df6f770cb232f8229b5442457cc5f4628
466fb1efff6d254e0aef02d4f3f87b3cbb35004a
added http2 client to consumers
Added basic support for http2 delivery to hermes-consumer.
diff --git a/hermes-api/src/main/java/pl/allegro/tech/hermes/api/Subscription.java b/hermes-api/src/main/java/pl/allegro/tech/hermes/api/Subscription.java index 626047c490..959210bc23 100644 --- a/hermes-api/src/main/java/pl/allegro/tech/hermes/api/Subscription.java +++ b/hermes-api/src/main/java/pl/allegro/tech/hermes...
3
3
1
[{"id": "G0", "claim": "Use an Optional call (`http2Client.map(startClient)` / `http2Client.map(stopClient)`) instead of the explicit if-blocks when starting and stopping the optional http2 client.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "...
null
allegro__hermes__781
allegro/hermes
781
defect
2416296459c17f3b59e194d24405177ee25cb32e
6100deaa111727aa9d69982b4549c0bac75bff68
Schema version aware deserialization is backward compatible
Adding fallback from schema version aware deserialization to any schema deserialization. Solves #779
diff --git a/hermes-common/src/main/java/pl/allegro/tech/hermes/common/di/CommonBinder.java b/hermes-common/src/main/java/pl/allegro/tech/hermes/common/di/CommonBinder.java index d6fbae2c508..7cdacefbe64 100644 --- a/hermes-common/src/main/java/pl/allegro/tech/hermes/common/di/CommonBinder.java +++ b/hermes-common/src/...
1
1
0
[{"id": "G0", "claim": "The root of the deserialization metrics path should be prefixed with `content` (e.g. `content.avro.deserialization`) so that future format-specific metrics like `content.json.*` would not sit under a `.json` root metric.", "category": "design", "verdict": "supported", "priority": "P2", "scope": ...
null
allegro__hermes__818
allegro/hermes
818
defect
152ef6c404757bc88a7744d154e6573036defdbd
e79cfd1abc8ba50336a2bb56f31422c9b546cfa5
Query subscriptions metrics
Added endpoint for querying subscriptions metrics.
diff --git a/hermes-api/src/main/java/pl/allegro/tech/hermes/api/SubscriptionNameWithMetrics.java b/hermes-api/src/main/java/pl/allegro/tech/hermes/api/SubscriptionNameWithMetrics.java new file mode 100644 index 0000000000..b1cf9085b7 --- /dev/null +++ b/hermes-api/src/main/java/pl/allegro/tech/hermes/api/SubscriptionN...
1
1
0
[{"id": "G0", "claim": "The metrics fields of SubscriptionNameWithMetrics should also be final.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
allegro__hermes__886
allegro/hermes
886
defect
1b7304a3ad8e0c0e92f7385ed2c4dd40120c4d9a
db8bf84063b6f6a9b5c6174bcea6eb09aa031cb2
List topics by owners
We want to be able to list topics by owners. We can do this right now by using `QueryEndpoint`, but quering requires scanning through whole Zookeeper, which is too slow (something about 1 to 15 seconds on production). Another reason that seperate endpoint is better is that we can change response structure. We may al...
diff --git a/hermes-api/src/main/java/pl/allegro/tech/hermes/api/endpoints/TopicEndpoint.java b/hermes-api/src/main/java/pl/allegro/tech/hermes/api/endpoints/TopicEndpoint.java index 735f94baa7..cfa2e0a308 100644 --- a/hermes-api/src/main/java/pl/allegro/tech/hermes/api/endpoints/TopicEndpoint.java +++ b/hermes-api/src...
2
1
1
[{"id": "G0", "claim": "The TopicOwnerCache is only loaded once on hermes-management startup and updated only on the instance that handles the change, so in a multi-node deployment other instances serve stale owner-to-topic data until they are restarted; it should be synced or periodically refreshed across nodes.", "ca...
null
allegro__hermes__888
allegro/hermes
888
defect
5f4cdb828108a5ef07b925f0c91dfcba31d2436b
aa582c56a653f9230400f7eb56d03aabb12c22ba
Listing subscriptions by their owner
This PR is analogical to https://github.com/allegro/hermes/pull/886 but except caching OwnerId to TopicName it caches OwnerId to SubscriptionName
diff --git a/hermes-api/src/main/java/pl/allegro/tech/hermes/api/endpoints/SubscriptionOwnershipEndpoint.java b/hermes-api/src/main/java/pl/allegro/tech/hermes/api/endpoints/SubscriptionOwnershipEndpoint.java new file mode 100644 index 00000000000..5685637efd6 --- /dev/null +++ b/hermes-api/src/main/java/pl/allegro/tec...
1
1
0
[{"id": "G0", "claim": "The \"Cache filled. Took {}ms\" log message should say which cache it refers to, since it appears far from the \"Starting filling Owner Id...\" message and can otherwise only be identified from the logger name.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "...
null
allegro__hermes__891
allegro/hermes
891
defect
350ed6f431816d4fdbeb5b24ca55036bf73cdaed
87b437e12940033132eb5bed2a132ec7eb14bbf4
Setting Hermes ID as empty when unwrapping avro message without given…
This PR stops generating missing Hermes ID for messages from Kafka. When message id is missing or whole metadata is empty Hermes does not generate message id at all. It is just leaved as empty. Changes: * ```unwrapContent()``` method in ```AvroMessageContentWrapper``` now sets missing message id as empty
diff --git a/hermes-common/src/main/java/pl/allegro/tech/hermes/common/message/wrapper/AvroMessageContentWrapper.java b/hermes-common/src/main/java/pl/allegro/tech/hermes/common/message/wrapper/AvroMessageContentWrapper.java index ba66ff16cd..a3bf5033cf 100644 --- a/hermes-common/src/main/java/pl/allegro/tech/hermes/co...
3
3
0
[{"id": "G0", "claim": "The empty-ID test in the common package does not clearly make sense there; the PR should define where wrapping/unwrapping can happen (possibly moving the test to consumers code), or at least add a javadoc stating that the class only wraps and unwraps and does not generate any ID.", "category": "...
null
allegro__hermes__918
allegro/hermes
918
defect
b1d4a63376e1ca394e8878ef20c5266503643acc
b4383501f1056807306e904334f4a835b3aa92aa
Feature/trace only discarded messages
Added options to trace only **discarded** messages for subscription and **error** for topic
diff --git a/docs/docs/user/publishing.md b/docs/docs/user/publishing.md index f211484364..03dbacb4b2 100644 --- a/docs/docs/user/publishing.md +++ b/docs/docs/user/publishing.md @@ -63,22 +63,25 @@ Minimal request: Other options: -Option | Description | Options | Default...
4
3
1
[{"id": "G0", "claim": "The @JsonProperty annotation on the new isFullTrackingEnabled getter in Subscription is redundant and should be removed.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The @JsonProperty annotation on the new isErrorTrackingEnabled...
null
allegro__hermes__972
allegro/hermes
972
defect
228c8e3cb0925490842c2f2ef92f35fea6acf513
248f2465d24df2be603ace7274038d70f36e6d3d
Improved subscription health problem indicators
- Removed SlowIndicator - Added parameters to enable/disable indicators - Fixed indicators to respect delivery type of subscription
diff --git a/hermes-api/src/main/java/pl/allegro/tech/hermes/api/SubscriptionHealth.java b/hermes-api/src/main/java/pl/allegro/tech/hermes/api/SubscriptionHealth.java index 0c1e207080..9196d2eb71 100644 --- a/hermes-api/src/main/java/pl/allegro/tech/hermes/api/SubscriptionHealth.java +++ b/hermes-api/src/main/java/pl/a...
3
3
0
[{"id": "G0", "claim": "Split the SubscriptionMetrics @JsonCreator constructor's parameter list into separate lines.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "Do not use wildcard imports in SubscriptionHealthCheckerTest; import the problem-...
null
allegro__hermes__975
allegro/hermes
975
defect
9a26ac31963d5370d7373b05b7800c3e0a5e6f8e
a0782ddcac597c9afd16119eee2307071294c224
Bugfix/retransmission
Fixes https://github.com/allegro/hermes/issues/978
diff --git a/hermes-common/src/main/java/pl/allegro/tech/hermes/common/kafka/KafkaTopics.java b/hermes-common/src/main/java/pl/allegro/tech/hermes/common/kafka/KafkaTopics.java index 2b776c635f..dde42b8944 100644 --- a/hermes-common/src/main/java/pl/allegro/tech/hermes/common/kafka/KafkaTopics.java +++ b/hermes-common/...
4
3
0
[{"id": "G0", "claim": "The member descriptions need not be collected into a list and can be left as a stream.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The not-suspended-subscriptions stream logic, used two times, can be extracted into a priva...
null
allegro__marathon-consul__104
allegro/marathon-consul
104
defect
885200d5e5c5cbeff8ce4a121602fdb3f187c8c3
780fb4b106f66245aa7cb43d848d62a65fc37c34
More efficient deregistering by task
Deregistering by task used to load all nodes (service instances) and loop over them in search for marathon task tag. With this change it loads all services and only loads nodes of services containing the marathon task tag. It also correctly handles the corner case when there are multiple nodes containing the same mara...
diff --git a/consul/consul.go b/consul/consul.go index 0302199..1dcc8e6 100644 --- a/consul/consul.go +++ b/consul/consul.go @@ -57,42 +57,50 @@ func (c *Consul) getServicesUsingProviderWithRetriesOnAgentFailure(provide Servi } func (c *Consul) getServicesUsingAgent(name string, agent *consulapi.Client) ([]*service...
7
2
0
[{"id": "G0", "claim": "The function dcAwareQueriesForAllDcs should be renamed to dcAwareQueriesForAllDCs, since initialisms have a consistent case in Go names.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "DeregisterByTask should use fmt.Error...
null
allegro__marathon-consul__106
allegro/marathon-consul
106
defect
ffd5855602ffe5a539cb06c5c30957cada2c2a8c
cc24c6614f2c5df11c4d98f1f27ca4bee1c7b412
Migrate to marathon task tag
Adds a script for migrating registered services to the state expected by #99, i.e. containing marathon-task tag with related marathon task ID. This script is expected to be executed on the consul cluster with services managed by marathon-consul, in all DCs separately, before updating an existing marathon-consul instan...
diff --git a/scripts/migrate_to_marathon_task_tag.go b/scripts/migrate_to_marathon_task_tag.go new file mode 100644 index 0000000..7446529 --- /dev/null +++ b/scripts/migrate_to_marathon_task_tag.go @@ -0,0 +1,158 @@ +package main + +import ( + "flag" + "fmt" + "os" + "strconv" + "strings" + + "github.com/Sirupsen/logr...
11
8
0
[{"id": "G0", "claim": "The pull request should update the README to document the new migration script.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "When aborting, the script should log with Fatal instead of Error followed by os.Exit(1).", "cate...
null
allegro__marathon-consul__120
allegro/marathon-consul
120
defect
f4d4a70bb675c8a14bdaea1fcc857530f441f6f4
a1b6468ba76cf20307dc1810a7a31eb6c17a89f2
Blacklisted Healthcheck types
Introducing `consul-ignored-healthchecks` configuration property which allows one to ignore specified types of Marathon health checks during service registration in Consul. Fixes #118
diff --git a/README.md b/README.md index 7eeb56e..dd33021 100644 --- a/README.md +++ b/README.md @@ -178,6 +178,7 @@ config-file | | Path to a JSON file to read conf consul-auth | `false` | Use Consul with authentication consul-auth-password | ...
1
1
0
[{"id": "G0", "claim": "getIgnoredHealthCheckTypes should call strings.ToUpper once on the whole configuration string before splitting it, as in the suggested `ignoredTypes := strings.Split(strings.ToUpper(c.config.IgnoredHealthChecks), \",\")`.", "category": "maintainability", "verdict": "supported", "priority": "P2",...
null
allegro__marathon-consul__17
allegro/marathon-consul
17
defect
2e4531bdc5140e851ad158b766d96852d055057b
7a37b6a9f88b973f8bd6b8ecdbe9996a4dc390c0
Create alias types for Id
Currently our code is [Stringly Typed](http://c2.com/cgi/wiki?StringlyTyped). I added ID alias type for strings.
diff --git a/apps/app.go b/apps/app.go index 1beb2ac..8904119 100644 --- a/apps/app.go +++ b/apps/app.go @@ -26,7 +26,7 @@ type AppsResponse struct { type App struct { Labels map[string]string `json:"labels"` HealthChecks []HealthCheck `json:"healthChecks"` - ID string `json:"id"` + ...
1
1
0
[{"id": "G0", "claim": "Move the Id String() method closer to the type definition (just below `type Id string`) so the file reads nicer.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
allegro__marathon-consul__190
allegro/marathon-consul
190
defect
14fcb0426741f68924b2aa9257f8fc4315cff878
fb1110e8e473e599d0a177d09036439018488eef
Recheck if service should be deregistered
When service is marked to be deregisterd during sync ask marathon for tasks to recheck if this task was not started after sync procedure started. Prevents deregistartion of tasks started after sync asked for all marathon services. It also minimize call to marathon for a price of not deregistering tasks that was kil...
diff --git a/sync/sync.go b/sync/sync.go index 7b54f68..469c8ad 100644 --- a/sync/sync.go +++ b/sync/sync.go @@ -124,25 +124,38 @@ func (s *Sync) resolveHostname() error { func (s *Sync) deregisterConsulServicesNotFoundInMarathon(marathonApps []*apps.App, services []*service.Service) (deregisterCount int, errorCount i...
2
2
1
[{"id": "G0", "claim": "A test should cover what happens when Marathon returns an error in the recheck-before-deregister path.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The findTask helper should be implemented in the apps package as a (tasks []*Ta...
null
allegro__marathon-consul__20
allegro/marathon-consul
20
defect
6e038ebbf3d9bc950937ccdbb5bd8029b7332908
dea78b082b6334bbc5404d2db3ab0d6d6ce5705e
Marathon leadership-aware sync
Scheduled Marathon-Consul sync will run: 1. only when specified node has leadership 2. always when forced
diff --git a/README.md b/README.md index e0288dc..0b310e1 100644 --- a/README.md +++ b/README.md @@ -49,6 +49,7 @@ make test - Provided HTTP healtcheck will be transferred to Consul. - Labels with `tag` value will be converted to Consul tags, `marathon` tag is added by default (e.g, `labels: ["public":"tag", "varni...
5
5
2
[{"id": "G0", "claim": "The new test helper should be renamed (e.g. NewWithDefaultConfig) so its name reflects that it just calls New with a default config.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The README should describe the difference...
null
allegro__marathon-consul__210
allegro/marathon-consul
210
defect
b1e8dd8d757cd83eb31f21d9e83ef5404c7de0dc
c44e5e981a1f050846350fc0d605a3c2a8b32a51
support for a path in marathon location
Hi, would you be open to adjusting the range of supported values of the marathon location parameter? In order to join multiple marathons (e.g. per dev-team, per project) we are discovering their (semi-random) locations through linkerd (https://linkerd.io/documentation/). This changes our --marathon-location value...
diff --git a/marathon/marathon.go b/marathon/marathon.go index 7bf545e..329fe9f 100644 --- a/marathon/marathon.go +++ b/marathon/marathon.go @@ -212,12 +212,27 @@ func (m Marathon) url(path string) string { type params map[string][]string +// urlWithQuery was altered to handle a case when marathon location has a p...
2
2
1
[{"id": "G0", "claim": "The comment above urlWithQuery describes what happened to the function rather than what and why it does; it should be rewritten, e.g. as 'urlWithQuery returns ... If location is given with path e.g. ... then ...'.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": ...
null
allegro__marathon-consul__212
allegro/marathon-consul
212
defect
8ccdebfc0dafd4ce93069965b8a75fce1d002b16
a9c138503bab1b33265972bf07ffeb885c250817
Fixes #209 | Sanitize http logs
Put HTTP authentication in Header instead of URL. This will prevent leaking credentials in logs when error is logged with authentication information.
diff --git a/marathon/marathon.go b/marathon/marathon.go index 8121ab0..a7cf9a4 100644 --- a/marathon/marathon.go +++ b/marathon/marathon.go @@ -181,6 +181,9 @@ func (m Marathon) get(url string) ([]byte, error) { metrics.Time("marathon.get", func() { response, err = m.client.Do(request) }) if err != nil { metric...
2
2
2
[{"id": "G0", "claim": "The sanitized error that get() returns should keep the HTTP response code instead of replacing the error with a fixed message.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The error overwrite duplicates logic already in log...
null
allegro__marathon-consul__215
allegro/marathon-consul
215
defect
ad55003244217b4de45efe3aec2afd04f45003af
f185bd926988a7cad5bb29123aa71bc80c4bb400
Enable tag override to allow extrnal tools adding tags
In some cases we want to add tags to services already registered in consul. This option allow external tools to add tags to existing services and order Consul to keep tags and propagate to cluster.
diff --git a/consul/consul.go b/consul/consul.go index ffec285..f5631cf 100644 --- a/consul/consul.go +++ b/consul/consul.go @@ -126,6 +126,7 @@ func consulServiceToService(consulService *consulapi.CatalogService) *service.Se Name: consulService.ServiceName, Tags: consulService.ServiceTags, RegisteringAgentAdd...
3
2
0
[{"id": "G0", "claim": "The added Service field line is not gofmt-formatted (misaligned whitespace around the type).", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The new test should use assert.True instead of assert.Equal(t, true, ...) for the...
null
allegro__marathon-consul__236
allegro/marathon-consul
236
defect
28d2ea64ae7639757681b00cbca72ed32605f147
f968309183c92f1aa64795422499131dfc752d4f
default HTTP(s) Path to / if empty
I have never programmed in Go. I am pretty sure this is the place for the change. Hopefully the syntax is correct for assigning to that variable.
diff --git a/consul/consul.go b/consul/consul.go index 198c943..1eae099 100644 --- a/consul/consul.go +++ b/consul/consul.go @@ -326,6 +326,10 @@ func (c *Consul) marathonToConsulChecks(task *apps.Task, healthChecks []apps.Hea Status: "passing", } + if check.Path == nil { + ...
3
2
2
[{"id": "G0", "claim": "Replace the `check.Path == nil` comparison with `check.Path == \"\"` because Path is not a pointer and cannot be nil.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "The pull request needs a unit test before it can be merged."...
null
allegro__marathon-consul__254
allegro/marathon-consul
254
defect
b1c1ec5b1e30a40a7a531d220cfa49036ef5831c
58b844260f03dc10b6ab4ae2852c2bd6c1916842
Remove web hamdler. (Breaking change)
This change removes the support for HTTP Callbacs. This mechanism is deprecated and will be removed in futre Marathon releases. Breaking changes: * Remove `sse-enabled` and `web-enabled` flags Fixes: #253
diff --git a/README.md b/README.md index 1984ee8..c9f4f95 100644 --- a/README.md +++ b/README.md @@ -98,23 +98,15 @@ your cert store might be different depending on your system. docker run '/etc/ssl/certs/ca-certificates.crt:/etc/ssl/certs/ca-certificates.crt' -P allegro/marathon-consul ``` -## Setting up `maratho...
2
2
1
[{"id": "G0", "claim": "Moving the events configuration from the `web` module to `sse` or `events` (the move the README note defers to the future) should be part of this change.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "The files events/web_events...
null
allegro__marathon-consul__283
allegro/marathon-consul
283
defect
a7c75c7e20f850018c6838c29a3e4c6528861765
8be14b9fe19fd7b6d371b01c7f623dbde46bba57
Support Marathon 1.5 Network API
I've manually tested this end-to-end with Marathon, Consul, and this new binary. This patch addresses issue #230 I'm able to manually compile this code using native `go run`. But I'm not able to run `make build`, etc. So maybe someone (@janisz) can test this?
diff --git a/apps/app.go b/apps/app.go index b36d1c8..ef7a4f1 100644 --- a/apps/app.go +++ b/apps/app.go @@ -28,6 +28,10 @@ type PortDefinition struct { Labels map[string]string `json:"labels"` } +type Container struct { + PortMappings []PortDefinition `json:"portMappings"` +} + type appWrapper struct { App App...
3
3
1
[{"id": "G0", "claim": "Add a comment explaining that PortDefinitions are deprecated in favour of PortMappings and why this fallback logic is needed, with a link to the Marathon release notes.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Extract...
null
allegro__marathon-consul__297
allegro/marathon-consul
297
defect
3d0bb6dc1eabd685f8982f395cbf1cd191a2a92d
ee7bbaa0af3170c4af8fc577a017a07f7d5d5504
don't search in all DCs if configured
If some datacenter is marked in Consul cluster as "failed" Marathon-Consul still asks for services and fails after getting 500 in response. This PR adds option to configure single datacenter to ask for.
diff --git a/config/config.go b/config/config.go index 79623cd..a166c88 100644 --- a/config/config.go +++ b/config/config.go @@ -79,6 +79,7 @@ func (config *Config) parseFlags() { flag.StringVar(&config.Consul.IgnoredHealthChecks, "consul-ignored-healthchecks", "", "A comma separated blacklist of Marathon health chec...
5
3
1
[{"id": "G0", "claim": "On a Consul error the code should continue with the services that were able to load, logging an error (line 119/126), instead of failing on the first error and aborting the whole run.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "cla...
null
allegro__marathon-consul__30
allegro/marathon-consul
30
defect
b643186ed980d4d944e1095eae6198ad7f7b2ec0
f2047c05556acfd73cb0c5ec8e264edc51e5a09c
Configurable Consul tag name
`consul-tag` property added - fixes #29
diff --git a/README.md b/README.md index 5f7ee8a..f840938 100644 --- a/README.md +++ b/README.md @@ -42,13 +42,12 @@ make test ## Usage -- Consul Agents should be available at every Mesos Slave, tasks will be registered at host their run on. +- Consul Agents should be available at every Mesos Slave, tasks will be ...
2
1
0
[{"id": "G0", "claim": "The new consul-tag field should also be added to the sample config (debian/config.json).", "category": "documentation", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The marathonTaskToConsulService conversion should be done in Register, leaving register t...
null
allegro__marathon-consul__50
allegro/marathon-consul
50
defect
732c7f0d4c47a690cf70625f26a83e18f0fa2e85
8019043d20cbbc6e163a5849957d5a898a1a9fbc
Getting Consul services with retries + agents cache cleanup
Some changes introduced: - getting services from Consul with retries on failure (using another random agent) - failing agents get removed from cache - agents cache size metric added solves #49
diff --git a/apps/task.go b/apps/task.go index f855cd6..5c5a6a9 100644 --- a/apps/task.go +++ b/apps/task.go @@ -2,8 +2,6 @@ package apps import ( "encoding/json" - "net" - "fmt" ) type Task struct { @@ -54,16 +52,3 @@ func (t *Task) IsHealthy() bool { } return register } - -func (t *Task) HostToIPv4() (n...
5
3
0
[{"id": "G0", "claim": "The package-level variable consulAgentsCacheSizeMetricName should be declared as a const.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The second return value added to GetAnyAgent should be documented or the return valu...
null
allegro__marathon-consul__84
allegro/marathon-consul
84
defect
f333d59df11663cf664dbdde8984d122db5cebba
c6b7eeebc4d10d6fa255bc2ab783dbc228438b97
Fixes #83 | Unregister unhealthy killed tasks
Marathon 1.1.1 introduced new event `unhealthy_task_kill_event` that occurs when task is scheduled to kill after becomes unhealthy. This change make marathon-consul aware of this event.
diff --git a/events/unhealthy_task_kill.go b/events/unhealthy_task_kill.go new file mode 100644 index 0000000..ac4093b --- /dev/null +++ b/events/unhealthy_task_kill.go @@ -0,0 +1,20 @@ +package events + +import ( + "encoding/json" + + "github.com/allegro/marathon-consul/apps" +) + +type UnhealthyTaskKilled struct { + ...
1
1
0
[{"id": "G0", "claim": "The new deregister helper should simply return err instead of using an if/else that returns err in one branch and nil in the other.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
allegro__marathon-consul__94
allegro/marathon-consul
94
defect
ca2495d2c99fd81104a8335ac1ef9ccb86baaf25
64850d86a0a54306fb719ad67f451a771977545d
Fixes some flaky tests
Some tests would randomly fail without reason, this PR should fix this.
diff --git a/consul/consul_test.go b/consul/consul_test.go index c4c17d8..2718bc6 100644 --- a/consul/consul_test.go +++ b/consul/consul_test.go @@ -74,10 +74,10 @@ func TestRegister_ForInvalidHost(t *testing.T) { func TestGetServices(t *testing.T) { t.Parallel() // create cluster of 2 consul servers - server1 := ...
1
1
0
[{"id": "G0", "claim": "Run goimports on the changed files, since the added `sync/atomic` import sits outside the stdlib import group.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}]
null
allegro__mesos-executor__111
allegro/mesos-executor
111
defect
f506fde89ba749ef41796dc12bf534b7fc6d237f
ad1f4add6eccd2c087583acdc9eed082f8147ab0
Fix deadlock on multiple kill events
After first kill event received from Mesos agent executor is stopping the goroutine that is responsible for listening to events channel. This commit changes the events channel to be buffered so sending second event will not lock the whole executor process. Also the kill logic is now based on task ID received from Mesos...
diff --git a/executor.go b/executor.go index 85dc8967..98479694 100644 --- a/executor.go +++ b/executor.go @@ -86,7 +86,8 @@ type Event struct { // additional debug message. Message string - //TODO(janisz): Create domain objects for this. + // TODO(medzin): remove abstractions, because they only obscure all the c...
2
2
1
[{"id": "G0", "claim": "The Event_SHUTDOWN case should send an event of Type: Shutdown instead of Type: Kill.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The kill message should read \"a kill event\" rather than \"an kill event\".", "category": "...
null
allegro__mesos-executor__38
allegro/mesos-executor
38
defect
cc0c4cbcd1bb2c9da1c8ab314e4be696949095d8
8d1feb4e68350feead784b95a3cf8e65520525eb
Add ability to extend log entries
This commit add a mechanism that allows to add additional elements to `servicelog.Entry` during service log scraping process. Structures implementing `servicelog.Extender` interface can be used as a decorators for the log entries channel with the help of `servicelog.Extend` function. It resolves #33
diff --git a/command.go b/command.go index 471902c3..da653ef4 100644 --- a/command.go +++ b/command.go @@ -11,11 +11,12 @@ import ( "time" log "github.com/Sirupsen/logrus" - "github.com/allegro/mesos-executor/servicelog/appender" - "github.com/allegro/mesos-executor/servicelog/scraper" "github.com/mesos/mesos-g...
1
1
0
[{"id": "G0", "claim": "The log-scraping setup in the executor's launchTask is becoming a lot of code; move the filters and extending out of the executor package (ideally into the servicelog package, starting at `case \"logstash\"`) so the case is just one line.", "category": "maintainability", "verdict": "supported", ...
null
allegro__mesos-executor__60
allegro/mesos-executor
60
defect
1856688c559f68e80cf5e56ce680274dec515237
015287e77da111f6f46eeead303b0272890bfea7
Add common tag to consul
Marathon-Consul is used to reconcile state for any differences that could happen when executor failed (e.g. OOM, agent restart). Marathon-Consul synchronizes only services registered with a common tag. It's configurable and by default equal to "marathon".
diff --git a/hook/consul/hook.go b/hook/consul/hook.go index 815de6ee..950b9d23 100644 --- a/hook/consul/hook.go +++ b/hook/consul/hook.go @@ -82,6 +82,17 @@ func (h *Hook) RegisterIntoConsul(taskInfo mesosutils.TaskInfo) error { ports := taskInfo.GetPorts() globalTags := taskInfo.GetLabelKeysByValue(consulTagValue...
1
1
0
[{"id": "G0", "claim": "The common 'marathon' tag is hard-coded and should be extracted to external configuration, starting with a follow-up issue for it.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
allegro__mesos-executor__64
allegro/mesos-executor
64
defect
965e8a034931930f24fb9ecb89a81fce7c480700
cd02864d33307f97070caf14264ff35f14a84271
Extend Sender interface by adding a resource releasing logic
We need to extend Sender interface with Release method, which allows us to release resources used by it - for example connections to hosts that are no longer in the pool.
diff --git a/xnet/writer.go b/xnet/writer.go index 41c067e5..e0235c9b 100644 --- a/xnet/writer.go +++ b/xnet/writer.go @@ -13,23 +13,33 @@ import ( log "github.com/sirupsen/logrus" ) -// InstanceProvider is the channel where updated list of desired service are published +// InstanceProvider is the channel where up...
1
1
0
[{"id": "G0", "claim": "The Send doc-comment wording \"bytes send and error (if it was any)\" is broken English and should be rephrased.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
allegro__mesos-executor__68
allegro/mesos-executor
68
defect
e0a9e197b9a7c9e5a6a59ae508a6c89639afd960
4e19e75dc08482c5ecc16e07e85bb115aca264dd
Add ability to use Logstash instances from Consul
This commit adds configuration options that enable to use local Consul agent to retrieve Logstash instances that will be used by service log appender to send scraped logs.
diff --git a/servicelog/appender/logstash.go b/servicelog/appender/logstash.go index a5a5d3c7..05793cc3 100644 --- a/servicelog/appender/logstash.go +++ b/servicelog/appender/logstash.go @@ -5,8 +5,11 @@ import ( "fmt" "io" "net" + "time" "github.com/allegro/mesos-executor/xio" + "github.com/allegro/mesos-exe...
2
1
0
[{"id": "G0", "claim": "NewConsulLogstashWriter should drop the protocol parameter and instead apply a nil check on the dialer to choose between the UDP and the TCP sender.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The split_words envconfig transfor...
null
allegro__mesos-executor__72
allegro/mesos-executor
72
defect
4e8efb8f3785755feabdd56b978d2a2d45add777
d230fd5d8a47ebecdaea90f79b3e4c136a5ee2cc
Use executorId instead of generating UUID for metrics
To allow grouping metrics by application name instead of genarating a UUID for every executor instance use it's executorId.
diff --git a/cmd/executor/main.go b/cmd/executor/main.go index d249bc60..45647efe 100644 --- a/cmd/executor/main.go +++ b/cmd/executor/main.go @@ -15,7 +15,7 @@ import ( "github.com/allegro/mesos-executor/hook" "github.com/allegro/mesos-executor/hook/consul" "github.com/allegro/mesos-executor/hook/vaas" - _ "gith...
2
2
0
[{"id": "G0", "claim": "The new Init function's parameter should be named `id` rather than `uuid`.", "category": "maintainability", "verdict": "supported", "priority": "P3", "scope": "introduced"}, {"id": "G1", "claim": "The MetricsUUID field added to GraphiteConfig is unnecessary and the executor identifier should be ...
null
allenai__olmocr__28
allenai/olmocr
28
defect
9bf3d35cdbf8e70fff9de5333944d50365990f6f
4bff92053b7b12bc7af68cdd5c80b620fc904d41
Resolved Git checks and updated readme
1. Resolved Mypy, black and isort git checks 2. Updated readme.md
diff --git a/CHANGELOG.md b/CHANGELOG.md index a4af7e839..4cade4a4e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,3 +6,5 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## Unreleased + +-...
1
1
1
[{"id": "G0", "claim": "The pull request should exclude olmocr/train/molmo/modeling_molmo.py from all checks without making significant changes to the file, since it is copied from the Hugging Face codebase and the repo does not truly own it.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "i...
null
allenai__olmoearth_pretrain__112
allenai/olmoearth_pretrain
112
defect
ae4981ed704b6eed3497cdbfaa117994bcb681ad
f7a09e1eeb780ea5369688710b96e1a1ead64943
Henryh/add overides support
Adds the ability to overide different fields in the configuration. This is based on https://omegaconf.readthedocs.io/en/latest/structured_config.html#merging-with-other-configs I added some examples of the override syntax. Call outs: - going forward we want configs to be made of simple types as much as possibl...
diff --git a/helios/data/dataloader.py b/helios/data/dataloader.py index d5617ba8c..b33c2625c 100644 --- a/helios/data/dataloader.py +++ b/helios/data/dataloader.py @@ -374,7 +374,7 @@ def __iter__(self) -> Iterator[HeliosSample]: class HeliosDataLoaderConfig(Config): """Configuration for the HeliosDataLoader."""...
4
2
1
[{"id": "G0", "claim": "The re-enabled local-rank-0 config print should also print the parameter counts (total and non-embedding) instead of leaving that commented out with no calculation available.", "category": "correctness", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "Rem...
null
allenai__olmoearth_pretrain__119
allenai/olmoearth_pretrain
119
defect
cec33ba9ec1d0bac57dd3fa0cec90efdfcfdaa23
34bb89146237ba7251e877c946ad0d22e5c69d9f
Henryh/beaker from py
This allows us to launch beaker jobs with commands like `python3 scripts/latent_mim.py launch test_run ai2/saturn-cirrascale` Whoever reviews this be sure to try following the instructions to see if there is anything missing
diff --git a/README.md b/README.md index 339f56f73..2471407da 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,7 @@ Highly Efficient Learning for Integrated Observation Systems (HELIOS) Earth system foundation model: data, training, and evaluation +launching training runs on beaker ## General Setup 1. Create ...
9
7
3
[{"id": "G0", "claim": "Add pre-commit to requirements.txt because `pre-commit install` fails in a fresh environment where pre-commit is not installed.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "Add a link to the GitHub token creation page (...
null
allenai__olmoearth_pretrain__130
allenai/olmoearth_pretrain
130
defect
377c818868057d8e569ecaf79d21db8d09d2783e
6de7c8e9642b7c7943a91c43835e30b2d939ba7a
Add adjusted InfoNCE loss
Reference: https://proceedings.neurips.cc/paper_files/paper/2023/file/48aaa5ea741ae8430bd58e25917d267d-Paper-Conference.pdf Adding weights to the negative pairs to prevent very hard negatives from getting very large weights. ![Screenshot 2025-03-05 at 11 26 19 AM](https://github.com/user-attachments/assets/e57a3cd6...
diff --git a/helios/train/loss.py b/helios/train/loss.py index 507ef6e313..25fa960a24 100644 --- a/helios/train/loss.py +++ b/helios/train/loss.py @@ -1,6 +1,7 @@ """Loss functions for training.""" import logging +import math from abc import ABC, abstractmethod from dataclasses import dataclass from typing impor...
4
3
0
[{"id": "G0", "claim": "If the logger.info calls in the new loss print on every batch, it may be better to make them logger.debug.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The code uses two different masking sentinel values, -torch.finfo(score...
null
allenai__olmoearth_pretrain__145
allenai/olmoearth_pretrain
145
defect
998a2d93d016da63f7089da738f653b8ef238325
05a8820a91e7f3ee6ab04997624d3e797ac22324
Add PASTIS evaluation dataset
- [x] Add PASTIS dataset - [x] Process PASTIS-R (S2 + S1) dataset - [x] Add PASTIS-R dataset - [x] Make evaluation epoch configurable per task - [x] Add test - [x] Run experiment NOTE: right now, I processed the PASTIS data similarly as in Presto, i.e., getting the monthly mean of Sentinel2, but this may not be...
diff --git a/helios/data/dataset.py b/helios/data/dataset.py index 8281e3bb80..e465534647 100644 --- a/helios/data/dataset.py +++ b/helios/data/dataset.py @@ -877,7 +877,6 @@ def __getitem__(self, args: GetItemArgs) -> tuple[int, HeliosSample]: # THis io is the current bottleneck of the getitem operation ...
6
6
2
[{"id": "G0", "claim": "Add a comment on _eval_s2_band_index_from_helios_name explaining why the suffix matching is necessary, perhaps with an example of a Helios band vs a band name in EVAL_S2_BAND_NAMES, and why EVAL_S2_BAND_NAMES cannot simply be changed.", "category": "documentation", "verdict": "supported", "prior...
null
allenai__olmoearth_pretrain__150
allenai/olmoearth_pretrain
150
defect
24bb63f6376ea3f18bbaf727fa7059d836d6c913
27a183ede32b0cc96623e18d4a8e68022e9b6998
Henry/faster worker spawns
1. Enabled faster startup times 30 seconds to 6 seconds per worker with 4 workers (gets better with more workers) by moving the samples list out of the dataset class so it doesn't get pickled into every worker. 2. Subsetting in get item. Subsetting after collation means that really big tensors are in the worker queue ...
diff --git a/helios/data/dataloader.py b/helios/data/dataloader.py index 6b17fa74c..6c67778c6 100644 --- a/helios/data/dataloader.py +++ b/helios/data/dataloader.py @@ -21,6 +21,7 @@ get_rank, get_world_size, ) +import multiprocessing as mp from olmo_core.utils import get_default_device, roundrobin, threade...
32
24
6
[{"id": "G0", "claim": "The patch sizes need to be configured and passed in instead of hardcoded as np.arange(1, 8).", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The forkserver preload should list only torch, or the preload could be deleted since it no...
null
allenai__olmoearth_pretrain__155
allenai/olmoearth_pretrain
155
defect
229b6fd1210b41940141ebd3615ee606b726fc21
6fb4d16a8815ed2c74577919d19046a5c26fd9d9
Mae
Adding in MAE training module and script and relevant classes to enable it
diff --git a/Dockerfile b/Dockerfile index b8807814a..78db339ad 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,5 +21,6 @@ RUN pip install --no-cache-dir -r requirements.txt COPY helios/ /stage/helios/ COPY scripts/latent_mim.py /stage/latent_mim.py COPY scripts/galileo.py /stage/galileo.py +COPY scripts/mae.py /sta...
7
4
3
[{"id": "G0", "claim": "The MAE module docstring says \"Simple set up of latent predictor\", which is inaccurate for an MAE whose decoder feeds an extra reconstructor layer rather than mirroring SatMAE.", "category": "documentation", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim"...
null
allenai__olmoearth_pretrain__163
allenai/olmoearth_pretrain
163
defect
a0fc3c4843ca239b314ee6b3f5f03df9d93831af
c9b12d451761edac3c0c048ba02bf62d341063da
FSDP-first-Pass
Initial Implementation of FSDP - Enables FSDP with a single not configurable wrapping strategy TODO: is to test and try different wrapping strategies - Enables Batch Size 32 per GPU whereas DDP only allows 16 for a 1.1 billion parameter model - Currently still very slow to do forward pass with 1B model - Uses FSD...
diff --git a/helios/data/dataset.py b/helios/data/dataset.py index 432cfaddf..296241daf 100644 --- a/helios/data/dataset.py +++ b/helios/data/dataset.py @@ -21,6 +21,8 @@ from olmo_core.config import Config, DType from olmo_core.distributed.utils import get_fs_local_rank from pyproj import Transformer +from torch.di...
3
3
0
[{"id": "G0", "claim": "The commented-out `# fully_shard(self.norm, **fsdp_kwargs)` line in FlexiHelios.apply_fsdp should either be removed or be given an explanatory comment.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The per-model-size con...
null
allenai__olmoearth_pretrain__168
allenai/olmoearth_pretrain
168
defect
a0fc3c4843ca239b314ee6b3f5f03df9d93831af
8c88715b22446831652bb2ae890adcfae3cdc3ac
Obvious simplifications
- Move transform to base helios train module - move eval batch to helios train module and remove eval loss - rmeove update target encoder to helios train module
diff --git a/helios/nn/galileo.py b/helios/nn/galileo.py index ced1957ef..a381b69a4 100644 --- a/helios/nn/galileo.py +++ b/helios/nn/galileo.py @@ -6,7 +6,6 @@ import torch.nn as nn from olmo_core.config import Config -from helios.data.transform import Transform, TransformConfig from helios.nn.flexihelios import ...
1
1
0
[{"id": "G0", "claim": "Since every debug script sets flip_and_rotate, maybe the transform type should be pushed into the defaults (of the train module) at some point rather than set in each script.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
allenai__olmoearth_pretrain__179
allenai/olmoearth_pretrain
179
defect
fa4d2f796ab5b74a0085f451d939e2943f68dc36
95917a73c2c1bc14da80893e0978345d1ad4933e
Reduce syncs
Reduce syncs in: - masking - patch resizing need to test: - always running embedding instead of testing if tokens are seen by encoder
diff --git a/helios/nn/flexi_patch_embed.py b/helios/nn/flexi_patch_embed.py index b29d956fe..32174a11d 100644 --- a/helios/nn/flexi_patch_embed.py +++ b/helios/nn/flexi_patch_embed.py @@ -5,16 +5,13 @@ """ import logging -from collections.abc import Iterable, Sequence +from collections.abc import Iterable from ty...
2
1
0
[{"id": "G0", "claim": "Remove the stale comment '# At this point when we flip the mask 1 means keep 0 means remove' above the sort in remove_masked_tokens to avoid confusion.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "pre_existing"}, {"id": "G1", "claim": "Introduce additional...
null
allenai__olmoearth_pretrain__184
allenai/olmoearth_pretrain
184
defect
fa4d2f796ab5b74a0085f451d939e2943f68dc36
ff074bdbd4eecad430349e697f66ac980ec61110
Contrastive loss term
See here for motivation: https://docs.google.com/presentation/d/1zeDlEqFMxBhOujxtFMDDfKEe6v07n2HpDhNWKT-fgv8/edit?usp=sharing
diff --git a/helios/train/loss.py b/helios/train/loss.py index e843eaac8..ecb354441 100644 --- a/helios/train/loss.py +++ b/helios/train/loss.py @@ -514,6 +514,50 @@ def compute( return F.cross_entropy(pred, target.squeeze()) +@LOSS_REGISTRY.register("InfoNCE") +class InfoNCELoss(Loss): + """Loss functi...
4
4
2
[{"id": "G0", "claim": "There should be a linear layer between the pooled latents and the contrastive loss, per the CROMA paper.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The change should apply different masks to the same microbatch (instead of alt...
null
allenai__olmoearth_pretrain__187
allenai/olmoearth_pretrain
187
defect
9a1e289871a153dfbab5cfc813ca804e75e99253
9f967f843888dcf84408d613e9abdca22c12160c
Henryh/add modality x space time masking
This pull request introduces several updates across the codebase with a focus on enhancing masking strategies, adding utility methods, and improving error handling. The most significant changes include the addition of a new `ModalityCrossMaskingStrategy` and its variants, utility functions for bandset indices, and impr...
diff --git a/helios/data/constants.py b/helios/data/constants.py index 0f38cfc95..790394939 100644 --- a/helios/data/constants.py +++ b/helios/data/constants.py @@ -131,6 +131,10 @@ def bandsets_as_indices(self) -> list[list[int]]: offset += num_bands return indices + def get_channel_indices_...
3
3
1
[{"id": "G0", "claim": "Instead of logging zero decoder-token counts and falling back to AllDiscriminationLoss when all counts are 1, it would be better to just exclude latlon.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The new helper get_channel_ind...
null
allenai__olmoearth_pretrain__191
allenai/olmoearth_pretrain
191
defect
359207584db359f3bac082954e6f342a36c54b47
4c44db3d74bd9818f7e58195948cc010ee31f646
Train on multiple datasets v2
Updated to use a dataset wrapper around list of existing HeliosDatasets. here is the previous closed pr for reference: https://github.com/allenai/helios/pull/172
diff --git a/helios/data/concat.py b/helios/data/concat.py new file mode 100644 index 000000000..7a4a7ba9b --- /dev/null +++ b/helios/data/concat.py @@ -0,0 +1,126 @@ +"""Concat dataset for Helios.""" + +import bisect +import hashlib +import logging +from dataclasses import dataclass +from typing import Any + +import n...
2
1
1
[{"id": "G0", "claim": "Add unit tests for the new HeliosConcatDataset in helios/data/concat.py.", "category": "testing", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Remove the work_dir and fs_local_rank methods from the helios dataset if, as a glance at olmo_core suggests, ...
null
allenai__olmoearth_pretrain__213
allenai/olmoearth_pretrain
213
defect
75bd8cd5f3bf1896e4c06dface14c2ab16d93577
a47c8a406855b0da1f83c0fb139124831ae23a33
Add SICKLE dataset
Test run: https://beaker.org/ex/01JSSNN73BP1TKRBDTDPYFVVKM, https://wandb.ai/eai-ai2/helios-debug/runs/6wevswr3
diff --git a/helios/data/dataset.py b/helios/data/dataset.py index d0757287c1..3693a4f4cc 100644 --- a/helios/data/dataset.py +++ b/helios/data/dataset.py @@ -179,7 +179,12 @@ def batch_size(self) -> int: @property def height(self) -> int: """Get the height of the data.""" - height_width_time_...
7
6
1
[{"id": "G0", "claim": "Reduce the sickle evaluation interval in the latent_mim debug script to 20 epochs and add sickle to the galileo debug script.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The is_multilabel attribute should be consistent between ...
null
allenai__olmoearth_pretrain__227
allenai/olmoearth_pretrain
227
defect
4e1293610b79c1f1e9f4a884c1563d37026907ac
f520351dff1898ad4aa0591f032f8147fd51d828
Henryh/create 4k naip dataset
-adapt h5 and sample creation to allow 4k by 4k Naip imagery -introduce a tile_size_scale_factor attribute to modalities and grid tiles to indicate the expected dimensions of that modality (should allow us to do expected shape for filling missing modality and things like this) DOES NOT enable training on naip_10
diff --git a/helios/data/constants.py b/helios/data/constants.py index f13696829..0f38cfc95 100644 --- a/helios/data/constants.py +++ b/helios/data/constants.py @@ -103,6 +103,7 @@ class ModalitySpec: band_sets: the band sets of the modality, ie the units of tokenization. is_multitemporal: whether the...
4
4
1
[{"id": "G0", "claim": "The image_tile_size_factor need not be a new explicit field; it can be calculated from the existing explicit attributes as ModalitySpec.tile_resolution_factor divided by the band set's resolution_factor.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"...
null
allenai__olmoearth_pretrain__254
allenai/olmoearth_pretrain
254
defect
0acf3743298c333de6e15e042be11eb2c58168de
2a44055dbd2b801e2b1cb5dcfefa57ad1d94172b
Henryh/128 datasets
Enables creation of datasets where each sample has a tile size split up from the base image tile size and also lets you do zstd via command line
diff --git a/helios/dataset/convert_to_h5py.py b/helios/dataset/convert_to_h5py.py index e78e34be4..6f6d9006f 100644 --- a/helios/dataset/convert_to_h5py.py +++ b/helios/dataset/convert_to_h5py.py @@ -8,6 +8,7 @@ from typing import Any import h5py +import hdf5plugin import numpy as np import pandas as pd from ei...
1
1
0
[{"id": "G0", "claim": "The comment should be reworded so it is not specific to a 2x2 grid.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
allenai__olmoearth_pretrain__274
allenai/olmoearth_pretrain
274
defect
7262f9653ab4840c712e1693866b44c37e756cd6
ff0b57c84296fdc3158d67f1f09fb9bd0857463d
Henryh/fix timestamps
This pull request updates the handling of missing timesteps to ensure that every sample has some valid encoded and decoded tokens. This enabled the galileo contrastive repro. I also cleaned up some unused code and simplified some functions as well ### Dataset Processing Enhancements: * Added the `timesteps_with_at_...
diff --git a/helios/data/dataset.py b/helios/data/dataset.py index 3ca5d6585..35d84693d 100644 --- a/helios/data/dataset.py +++ b/helios/data/dataset.py @@ -217,22 +217,36 @@ def time(self) -> int: @property def valid_time(self) -> int: """Get the minimum number of valid time steps in a batch. - - ...
6
5
1
[{"id": "G0", "claim": "The _get_valid_start_ts helper (a @staticmethod on the sample container) should be moved into the dataset class.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The filled_timesteps list built inside _fill_missing_timesteps should ...
null
allenai__olmoearth_pretrain__275
allenai/olmoearth_pretrain
275
defect
2a925697a71131faf0117fd3484e3257fadedb98
51a21850a3eb21d9f9b7b027913bf0384e8a9c00
Experiments with NAIP at 2.5 m/pixel
This has #232 merged in. The naip_10 modality is changed to 2.5 m/pixel rather than creating a new modality, that doesn't seem good, in general I think we should make it easier to add new "modalities" especially for ones not used in eval. Besides NAIP stuff, I added FixedModalityMaskingStrategy which allows using on...
diff --git a/data/norm_configs/computed.json b/data/norm_configs/computed.json index 65520938d..708eecd78 100644 --- a/data/norm_configs/computed.json +++ b/data/norm_configs/computed.json @@ -93,6 +93,32 @@ "var": 178051124770.29294 } }, + "naip_10": { + "B": { + "count": 78577664, + "mean...
5
5
2
[{"id": "G0", "claim": "A comment should be added documenting NAIP_10's spatial resolution next to the image_tile_size_factor=4 setting.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The mock NAIP_10 batch shape should be (1024, 1024, 1, 4) inste...
null
allenai__olmoearth_pretrain__331
allenai/olmoearth_pretrain
331
defect
71bb2d3da095680e52fffa6a8dc8784885fd57dc
fb4e85fe5e11148150af02225f35727fd971b389
Henryh/fix dataset percentage bug
- Fix bug where the dataset percentage changes when job is pre-empted or restarted - In the original results for dataset percentage pre-emption almost never happened so those results still hold. https://beaker.allen.ai/orgs/ai2/workspaces/earth-systems/work/01K3M5GZTFS597VVC28Z22AA9J?taskId=01K3M5GZV1S0KCAVM97T4QE...
diff --git a/helios/data/dataloader.py b/helios/data/dataloader.py index b7bb03085..709b55d2d 100644 --- a/helios/data/dataloader.py +++ b/helios/data/dataloader.py @@ -60,6 +60,7 @@ def __init__( persistent_workers: bool = True, multiprocessing_context: str = "spawn", num_dataset_repeats_per...
1
1
0
[{"id": "G0", "claim": "It would be clearer to do the `if self.dataset_percentage < 1.0` check once further down, initializing `data_percentage_rng = get_rng(self.seed)` and the sub-sampling code there, instead of checking the condition first and then `data_percentage_rng is not None` later.", "category": "maintainabil...
null
allenai__olmoearth_pretrain__354
allenai/olmoearth_pretrain
354
defect
928099fc9163fc5e6416ee69d9a6bdcdb10dd59f
a195f68a767735c44612485958730682bdb2df91
Add Presto to evals
Successful run with dataset standardization: https://beaker.allen.ai/orgs/ai2/workspaces/earth-systems/work/01K5H6KP7AKKABVEXA5QYB84TB?taskId=01K5H6KP8471CQT0F1HG76VP5W&jobId=01K5H6KPBV7EDWY81Z69ERFA63
diff --git a/helios/evals/eval_wrapper.py b/helios/evals/eval_wrapper.py index 3ef635791..4d57466a0 100644 --- a/helios/evals/eval_wrapper.py +++ b/helios/evals/eval_wrapper.py @@ -8,7 +8,14 @@ from torch import nn from helios.evals.datasets.configs import TaskType -from helios.evals.models import Croma, DINOv2, DI...
4
4
3
[{"id": "G0", "claim": "Add the class variable (as tessera.py has) to PrestoWrapper so that the evals run for presto are filtered to those that are sensible for it.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "Suggestion: enable the wrapper to loop thr...
null
allenai__olmoearth_pretrain__360
allenai/olmoearth_pretrain
360
defect
9e8fd847f1d07c09428c22d50d622cee6adfb05b
0382d79b102ab750e78d05a88539591b839e076c
Henryh/phase1cleanup
Phase 1 Experiments Fixes some masking bugs and adds tests Removes latlon as mandatory from the dataset so it is excluded from masking unless it is a training modality - No encoded tokens were selected if the only encoded modality had no encoded tokens - Sometimes there were no decoded tokens selected if overla...
diff --git a/tests/unit/train/test_masking.py b/tests/unit/train/test_masking.py index 66de3d82f..9958f7e4b 100644 --- a/tests/unit/train/test_masking.py +++ b/tests/unit/train/test_masking.py @@ -1403,22 +1403,22 @@ def test_select_encoded_decoded_bandsets_no_overlap(self) -> None: expected_encoded_decoded_ba...
4
4
1
[{"id": "G0", "claim": "Running scripts/2025_09_10_phase1/script_chm_cdl_worldcereal.py via --module_path fails with ModuleNotFoundError: No module named 'script'; add the folder to sys.path or make it a package and use relative imports.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "i...
null
allenai__olmoearth_pretrain__366
allenai/olmoearth_pretrain
366
defect
b847a5f7c3bf7739e1397e87a70e7e98c02a78dc
1f28798f664f8c04859c5eba2ed89b088942d43f
Log test results
Running here: https://beaker.allen.ai/orgs/ai2/workspaces/earth-systems/work/01K6DSDD7876MSVB3G4EC2XFJD?taskId=01K6DSDD7PJTBHAR4KZ010SQF4&jobId=01K6DSDDB9Z577WYWG2B1PGJG9 I've checked that all eval datasets support a "test" split
diff --git a/helios/evals/knn.py b/helios/evals/knn.py index 7e4d2e1ff..9eae851b0 100644 --- a/helios/evals/knn.py +++ b/helios/evals/knn.py @@ -15,15 +15,28 @@ def run_knn( config: EvalDatasetConfig, train_embeddings: torch.Tensor, train_labels: torch.Tensor, + val_embeddings: torch.Tensor, + val_...
1
1
1
[{"id": "G0", "claim": "Add a way to configure whether the evaluators run on the test set and whether the test results are logged, so that test data is not always evaluated and logged during model selection.", "category": "design", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
allenai__olmoearth_pretrain__368
allenai/olmoearth_pretrain
368
defect
a1e278879f7c85b8d5739a1ac97fc41efa549d6b
01add39e25e11e775dd4bc52a1bf3179f7400cd1
Add script to compute min/max stats for non-geobench eval datasets
- Created compute_eval_dataset_minmax.py to compute min/max per band for all modalities - Processes all non-geobench datasets: mados, sen1floods11, pastis, pastis128, breizhcrops, sickle, cropharvest - Added --max-samples CLI flag for smoke testing - Output saved to helios/evals/datasets/minmax_stats.json Panopti...
diff --git a/helios/evals/datasets/breizhcrops.py b/helios/evals/datasets/breizhcrops.py index b47f4348b..7aa46c062 100644 --- a/helios/evals/datasets/breizhcrops.py +++ b/helios/evals/datasets/breizhcrops.py @@ -15,6 +15,7 @@ from .constants import EVAL_S2_BAND_NAMES, EVAL_TO_HELIOS_S2_BANDS from .normalize import...
3
2
1
[{"id": "G0", "claim": "The min/max stats dict is loaded for every eval dataset; since it is pretty small, load it once and keep it in memory instead.", "category": "performance", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The cropharvest band mapping in compute_eval_datase...
null
allenai__olmoearth_pretrain__378
allenai/olmoearth_pretrain
378
defect
9f336c2ca6602b7fbf17e69e2a6af53a12b5e4be
a5c0ab0187d42f0c24f1db0bc9e9e02e36185fb7
Ablations
| | Name | Description | Priority | Evals Running | | --- | --- | --- | --- | --- | | 1 | phase2.0_base_no_contrastive | Contrastive weight set to 0 | High | yes | | 2 | phase2.0_base_random_masking | random masking | High | | | 3 | phase2.0_base_mae | MAE instead of contrastive loss | Normal | yes | | 4 | phase2...
diff --git a/helios/nn/latent_mim.py b/helios/nn/latent_mim.py index c03ba6d05..39e967e1e 100644 --- a/helios/nn/latent_mim.py +++ b/helios/nn/latent_mim.py @@ -126,6 +126,7 @@ class LatentMIMConfig(Config): encoder_config: Config decoder_config: Config reconstructor_config: Config | None = None + rei...
4
2
1
[{"id": "G0", "claim": "Passing the bound method self.model.target_encoder._init_weights to torch.nn.Module.apply() fails at runtime (TypeError/AttributeError) and relies on a private method.", "category": "correctness", "verdict": "opposed", "priority": "P3", "scope": "introduced"}, {"id": "G4", "claim": "The reinitia...
null
allenai__olmoearth_pretrain__444
allenai/olmoearth_pretrain
444
defect
408fd0d1731fe77a908b1ee2df361f5f0c7326f6
acc5d1baece3b2726689e4a74c1b6611352652a6
MAC measurements
<!-- CURSOR_SUMMARY --> > [!NOTE] > Adds FLOPs/MACs profiling tool, corrects AnySat patch-size computation (now static) with a unit test, and updates Satlas to use adaptive min-resolution resizing. > > - **Tools**: > - Add `scripts/tools/20251111_flops.py` to compute averaged MACs/FLOPs per task across multiple mode...
diff --git a/olmoearth_pretrain/evals/models/anysat/anysat.py b/olmoearth_pretrain/evals/models/anysat/anysat.py index 7a004ba1c..149b7b0cc 100644 --- a/olmoearth_pretrain/evals/models/anysat/anysat.py +++ b/olmoearth_pretrain/evals/models/anysat/anysat.py @@ -134,7 +134,8 @@ def calculate_day_of_year(timestamp: torch....
3
1
0
[{"id": "G0", "claim": "The new satlas resizing logic preserves original dimensions that are >= min_image_resolution (32) even when they are not divisible by the patch size (8), which will cause runtime errors for Swin Transformer backbones on inputs like 33 or 35.", "category": "correctness", "verdict": "uncertain", "...
null
allenai__olmoearth_pretrain__501
allenai/olmoearth_pretrain
501
defect
cfe0a4109fab39435b35d33372a86022a1fc3c35
4b29c6f200916450aa90031a9734fb9583cb834e
NDVI + time explicit masking
This PR implements 2 changes: - [x] Adds NDVI as a modality. This is computed in the dataset from the S2 bands - [x] Adds a "time-random decode" masking strategy. This is the same as the random decode masking strategy, with an additional "time" mask. For the encode-decode modalities, we randomly pick between a rand...
diff --git a/olmoearth_pretrain/data/constants.py b/olmoearth_pretrain/data/constants.py index ffbad3a29..cbb7d9458 100644 --- a/olmoearth_pretrain/data/constants.py +++ b/olmoearth_pretrain/data/constants.py @@ -485,6 +485,14 @@ class Modality: ignore_when_parsing=False, ) + NDVI = ModalitySpec( + ...
3
3
1
[{"id": "G0", "claim": "NDVI should be normalized to roughly the 0-1 range like the existing modalities, for consistency, though the reviewer notes it may not make a big difference.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "claim": "The class docstring ...
null
allenai__olmoearth_pretrain__504
allenai/olmoearth_pretrain
504
defect
cfe0a4109fab39435b35d33372a86022a1fc3c35
43966a6603b3e540afe5ee96a167260fb41f5219
Add configurable primary eval metric with namespace separation
## Motivation Previously, all eval metrics for every task were logged flat under `eval/{task_name}/{metric_name}`, making the wandb dashboard noisy and hard to filter. For tasks like bigearthnet (43-class multilabel), the primary metric was recently changed to accuracy when it used to be f1 and there was no way to o...
diff --git a/olmoearth_pretrain/evals/finetune/evaluate.py b/olmoearth_pretrain/evals/finetune/evaluate.py index de1558569..5c489b358 100644 --- a/olmoearth_pretrain/evals/finetune/evaluate.py +++ b/olmoearth_pretrain/evals/finetune/evaluate.py @@ -41,11 +41,25 @@ def eval_cls( preds_np = preds.numpy() ...
4
3
1
[{"id": "G0", "claim": "Add a classification_metrics helper mirroring segmentation_metrics so classification metrics are computed from preds and labels in one place, removing the duplicated computation across evaluate.py and linear_probe.py.", "category": "maintainability", "verdict": "supported", "priority": "P2", "sc...
null
allenai__olmoearth_pretrain__63
allenai/olmoearth_pretrain
63
defect
f9ce5dd1675ff8ab0b2409da3621bcd01608e299
b155902d714ebfea83c13c9048ad145ae8581720
Henryh/ignore missing modalities
Major Changes to Note - MaskedHeliosSample and TokensAndMasks will be None if the modality isn't present - to use only certain modalities we pass a supported modalities list to the parser, dataset and model (this is redundant for now) - Inside flexihelios, we are only going to use named tuples as an api between sep...
diff --git a/helios/data/constants.py b/helios/data/constants.py index dab8034d1..b9a04b1ee 100644 --- a/helios/data/constants.py +++ b/helios/data/constants.py @@ -97,6 +97,7 @@ class ModalitySpec: tile_resolution_factor: int band_sets: Sequence[BandSet] is_multitemporal: bool + ignore_when_parsing: ...
8
4
1
[{"id": "G0", "claim": "The training hyperparameters in train_batch (patch_size, encode_ratio, decode_ratio) are hardcoded rather than dynamic and configurable; the reviewer notes this issue is fixed in the separate configuration PR #65.", "category": "design", "verdict": "uncertain", "priority": "P2", "scope": "pre_ex...
null
allenai__olmoearth_pretrain__65
allenai/olmoearth_pretrain
65
defect
f9ce5dd1675ff8ab0b2409da3621bcd01608e299
e7407c7b8be9a307a7de4f3c10e7376ffb669dcd
Make dataloader & model configurable
Issue #64, add configuration & validate - [x] make dataset & dataloader configurable - [x] make model configurable - [x] fix hardcoded patch_size in multiple places - [x] make train_module model agnostic
diff --git a/helios/constants.py b/helios/constants.py deleted file mode 100644 index 06499faaa9..0000000000 --- a/helios/constants.py +++ /dev/null @@ -1,3 +0,0 @@ -"""Constants shared across the helios package.""" - -BASE_GSD = 10 # What unit is this in? diff --git a/helios/data/constants.py b/helios/data/constants....
3
1
0
[{"id": "G0", "claim": "Consider moving the dataset type check (the isinstance check) out of build() into validate(), if the type checker still accepts validate being called from build.", "category": "design", "verdict": "opposed", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The samples field in He...
null
allenai__olmoearth_pretrain__9
allenai/olmoearth_pretrain
9
defect
439f5c9f7eac04c9aef7db76f7b5457a59f3f9eb
2ac5806cd8eb0165798fdb274991a93549266e8e
Henryh/integrate naip osm wc
- enable loading naip, worldcover, and osm - add per modality collate function - deduplicate and reorganize some constants
diff --git a/helios/constants.py b/helios/constants.py new file mode 100644 index 000000000..5d12462fb --- /dev/null +++ b/helios/constants.py @@ -0,0 +1,34 @@ +"""Constants shared across the helios package.""" + +from typing import Literal + +NAIP_BANDS = ["R", "G", "B", "IR"] + +S2_BANDS = [ + "B01", + "B02", +...
4
1
0
[{"id": "G0", "claim": "The variation-type grouping constants (VARIATION_TYPES / DATA_SOURCE_TO_VARIATION_TYPE) are no longer needed since data sources are treated as separate modes, and the grouping by characteristics should be dropped.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope"...
null
allenai__open-instruct__1011
allenai/open-instruct
1,011
defect
3dc4a2398e5037cc64fd34f70cec3f1773017563
a7611ddfa9aa185794b8df0ce6fa9daf228ec812
Small refactor to prepare for the `backfill-prompts` PR
Changelog: 1. Passes `args.verbose` through to LLMRayActor to silence logs 2. Adds `make_request_id` and `_extract_base_request_id` functions to unify common patterns 3. Changes `_insert_result_to_queue` so that it blocks, and removes the upper bound on queue size for eval results (which was sometimes blocking). ...
diff --git a/open_instruct/grpo_fast.py b/open_instruct/grpo_fast.py index b7de1e1557..806c752c7b 100644 --- a/open_instruct/grpo_fast.py +++ b/open_instruct/grpo_fast.py @@ -2033,6 +2033,7 @@ def create_model_and_optimizer( actor_manager=actor_manager, inference_batch_size=args.inference_batch_size, ...
4
1
1
[{"id": "G0", "claim": "Passing metadata[\"sampling_params\"] (whose n is forced to 1 for tool processing) instead of metadata[\"original_sampling_params\"] to _finalize_outputs makes it process only a single generated sample even when the original request asked for multiple.", "category": "correctness", "verdict": "su...
null
allenai__open-instruct__1021
allenai/open-instruct
1,021
defect
9107188ca300608cff2800724d7e062748d13162
8aa743724f14e3457ceb1bada58bec665c06f3f4
Updates beaker-py version to >2.
Fixes #677. Experiments: 1. Debug run: [Beaker](https://beaker.allen.ai/orgs/ai2/workspaces/open-instruct-dev/work/01K5F36YT37SA581PS800W106W?taskId=01K5F36YT9GDE8CFT804EN00M3&jobId=01K5F36YY1VQFCK6RN2B30K4CB) 2. Tool run: [Beaker](https://beaker.allen.ai/orgs/ai2/workspaces/open-instruct-dev/work/01K5F3G9F71ZND...
diff --git a/mason.py b/mason.py index 371f95ac01..487075e05d 100644 --- a/mason.py +++ b/mason.py @@ -846,9 +846,9 @@ def make_task_spec(args, full_command: str, i: int, beaker_secrets: str, whoami: raise ValueError("GCP clusters do not have the dev filesystem, please use a proper image") if args.hostn...
1
1
1
[{"id": "G0", "claim": "Running mason.py crashes with `AttributeError: module 'beaker' has no attribute 'TaskSpec'` because the beaker-py v2 upgrade leaves the old `beaker.TaskSpec` call in place.", "category": "correctness", "verdict": "supported", "priority": "P0", "scope": "introduced"}]
null
allenai__open-instruct__1038
allenai/open-instruct
1,038
defect
d880e86102bd16f35960ba1b3e48f2c6cd5a7be2
3dfcb81970fc39eefa8d3052f616ee003d28b70d
Logs MFU for the learner to wandb
Previously we were only calculating MFU for the actors.
diff --git a/open_instruct/grpo_fast.py b/open_instruct/grpo_fast.py index dc1676bed0..ec8529608d 100644 --- a/open_instruct/grpo_fast.py +++ b/open_instruct/grpo_fast.py @@ -1372,54 +1372,68 @@ def calculate_utilization_metrics( response_lengths: list[int], total_generation_time: float, samples_per_prom...
1
1
1
[{"id": "G0", "claim": "The change to `accumulate_inference_batches` returning four values is probably breaking some of the tests, which need updating to unpack the extra return values (e.g. more `_, _` in calls).", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}]
null
allenai__open-instruct__1071
allenai/open-instruct
1,071
defect
3704b715f98d670f007f8c14652cdcbd82f3ddc9
315416198994b145e52a7a62010012a4ca65d5ae
Removes invalid `string.replace`
Previously, we would get this warning when running `large_test_script.sh` (example: [Beaker](https://beaker.allen.ai/orgs/ai2/workspaces/open-instruct-dev/work/01K75CR3R3B0H2WZFK00CAK3VM)): ``` /stage/open_instruct/math_utils.py:320: SyntaxWarning: invalid escape sequence '\%' string = string.replace("\%", "") ...
diff --git a/open_instruct/math_utils.py b/open_instruct/math_utils.py index 5e6cd78477..34bdd73f0a 100644 --- a/open_instruct/math_utils.py +++ b/open_instruct/math_utils.py @@ -317,7 +317,6 @@ def strip_string(string): # remove percentage string = string.replace("\\%", "") - string = string.replace("\%...
1
1
1
[{"id": "G0", "claim": "The new tests verify Python's built-in string.replace rather than calling the strip_string function the pull request changed, leaving strip_string unverified; the test should call strip_string and its expected outputs need to account for all the transformations strip_string performs.", "category...
null
allenai__open-instruct__1115
allenai/open-instruct
1,115
defect
7ba4cd0122647863b66dd4a41040d329bec7a9a2
7a8c92ceb09ea04843d1659e7e3b0aa4349b9ee2
Moved tests into separate files
Previously, the tests didn't run, as they were in `if __name__ == '__main__'` blocks, and not in separate `test_$FILENAME.py` files. This PR also refactors the `test_rl_utils.py` file to be more concise; I also fix a few errors so the tests pass (they were failing in `main`). In particular, there were two bugs: ...
diff --git a/open_instruct/dataset_processor.py b/open_instruct/dataset_processor.py index 62f31d0522..d88d22ef91 100644 --- a/open_instruct/dataset_processor.py +++ b/open_instruct/dataset_processor.py @@ -568,14 +568,3 @@ def __call__(self, batch: list[dict]): GROUND_TRUTHS_KEY: ground_truths, ...
1
1
0
[{"id": "G0", "claim": "The test functions left behind in rl_utils.py after the __main__ block was removed are dead code and should also be moved to a separate test file.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}]
null
allenai__open-instruct__1116
allenai/open-instruct
1,116
defect
ecc947e1a773ec7bf4e217c7c7297c30a76cefd6
d9683656f5c9b8caf4fba1e77bc9510d5f27c77e
Make sure that dataset_transformation tests actually run in CI
Previously, they only ran when someone manually ran them. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Runs dataset_transformation unit tests in CI with a new test suite and updated workflow, and factors dataset config construction into a reusable helper. > > - **CI**: > - Use `8-Core-XL-Runner-Ubuntu-Latest` and pass ...
diff --git a/open_instruct/dataset_transformation.py b/open_instruct/dataset_transformation.py index f88da72109..6c1f8c2605 100644 --- a/open_instruct/dataset_transformation.py +++ b/open_instruct/dataset_transformation.py @@ -1807,198 +1807,3 @@ def get_cached_dataset_tulu( dataset_config_seed=dataset_config_...
2
1
1
[{"id": "G0", "claim": "The RLVR test's transform_fn_args omits max_token_length, which alters the filtering behavior and could mismatch the cached gold dataset, leading to test failures or incorrect validation.", "category": "correctness", "verdict": "uncertain", "priority": "P1", "scope": "introduced"}, {"id": "G1", ...
null
allenai__open-instruct__1135
allenai/open-instruct
1,135
defect
456d6a1d9a0988304b14537e42f46099d59a28f8
faab9defbd0744572906ae6c462a4a419511cce1
Remove interleaved thinking for MT thinking model
<!-- CURSOR_SUMMARY --> > [!NOTE] > Adds an OLMo chat template that removes intermediate <think> content from prior assistant turns and introduces scripts to export and test chat templates. > > - **Chat templates**: > - Add `olmo_thinker_remove_intermediate_thinking` in `open_instruct/dataset_transformation.py` to s...
diff --git a/open_instruct/dataset_transformation.py b/open_instruct/dataset_transformation.py index 2aa34f878b..971220b4ea 100644 --- a/open_instruct/dataset_transformation.py +++ b/open_instruct/dataset_transformation.py @@ -403,6 +403,12 @@ def visualize_token_role(tokens: list[int], masks: list[int], tokenizer: Pre...
3
1
0
[{"id": "G0", "claim": "The </think>-splitting stripping logic in the new template discards content that precedes the <think> tag and drops any content between multiple </think> tags, so the rendered assistant turns silently lose text; both reviewers ask for parsing that preserves the surrounding content (and, per M002...
null
allenai__open-instruct__1161
allenai/open-instruct
1,161
defect
da87d77d898857e8319325e7c8efb119acc1dc9c
0aad4ac84624ed2fe0364781222ae8fa2f6264af
Correct loss accumulation for grpo_fast
Fixes up loss accumulation, see https://allenai.slack.com/archives/C08A1L22QMQ/p1764523483258119 for experiments. Swaps default to tokenwise loss, which correctly divides the loss by the total number of valid tokens in the batch, rather then just in the current minibatch (incorrect when there are different numbers o...
diff --git a/open_instruct/grpo_fast.py b/open_instruct/grpo_fast.py index a54713009d..776fb878f4 100644 --- a/open_instruct/grpo_fast.py +++ b/open_instruct/grpo_fast.py @@ -252,8 +252,10 @@ class Args: """the length of the pack (you should prob set to the max length of the model)""" masked_mean_axis: int | ...
6
6
2
[{"id": "G0", "claim": "When masked_mean_denominator=\"token\" with a non-None masked_mean_axis, the loss computation double-normalizes (per-sample sums divided by total_batch_tokens then averaged again), producing wrong gradients.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introdu...
null
allenai__open-instruct__1174
allenai/open-instruct
1,174
defect
5c002257a237c570fe19660d6ff697d80dfa8bf8
a954f43a2c9e41ee99b1c063b09d203d925ebb50
replenish prompts directly after accumulating
successful [single GPU on beaker](https://beaker.allen.ai/orgs/ai2/workspaces/open-instruct-dev/work/01KA21TQT0YGQFJ5EPM8CF0JX9?taskId=01KA21TQT642Q8D9AWQZBPZCJW&jobId=01KA21TQY6SYPK15FAJ0QXDJ1C) moves prompt loading into `accumulate_inference_batches`: - when `replenish_prompts=True` we add a prompt on the prompt...
diff --git a/open_instruct/grpo_fast.py b/open_instruct/grpo_fast.py index 0119321cfb..eddc4d5264 100644 --- a/open_instruct/grpo_fast.py +++ b/open_instruct/grpo_fast.py @@ -539,20 +539,6 @@ def __post_init__(self): ) -def next_batch(dataset_indices: list[int], dataset: datasets.Dataset) -> Batch: - ...
5
2
1
[{"id": "G0", "claim": "When replenish_prompts=True, the code indexes dataset[dataset_index] but dataset is not a parameter of accumulate_inference_batches nor passed through data_preparation_thread, which will cause a NameError when prompt replenishment is enabled.", "category": "correctness", "verdict": "supported", ...
null
allenai__open-instruct__1183
allenai/open-instruct
1,183
defect
af268bed58c59034716bacf5278d01aa528d4257
98e7976ee532707e0dd24fc7ceac25fb9c28a4f3
pass in `model_name_or_path` that is only augusta and it works
copies down the tokenizer, tokenizer_config, and config to weka in order to do dataset preprocessing <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Enable dataset preprocessing with gs:// models by auto-downloading tokenizer/config from GCS and add multi-file GCS download utility with tests. > > - **Open Instruct integrati...
diff --git a/mason.py b/mason.py index 4ce339eb9e..9b1a51efca 100644 --- a/mason.py +++ b/mason.py @@ -441,7 +441,12 @@ def make_internal_command(command: list[str], args: argparse.Namespace, whoami: is_open_instruct_training = any(cmd in command for cmd in OPEN_INSTRUCT_COMMANDS) if is_open_instruct_training...
8
5
1
[{"id": "G0", "claim": "The try/except block only catches ValueError, but an IndexError can occur when --model_name_or_path is provided as the last argument in filtered_command, crashing the script; it should catch both exceptions to handle this edge case gracefully.", "category": "correctness", "verdict": "opposed", "...
null
allenai__open-instruct__1190
allenai/open-instruct
1,190
defect
f799155987d76e20e957f9339e74458a46f5292e
44033ef28ee635bf52f0708f880072fe5189af02
fix batch indexing error
<!-- CURSOR_SUMMARY --> > [!NOTE] > Make Batch slicing None-safe and include decoded_responses/scores, add unit tests, and track total_prompts in batch stats. > > - **Model utils (`open_instruct/model_utils.py`)**: > - Update `Batch.__getitem__` to be None-safe and include `decoded_responses` and `scores` in all ind...
diff --git a/open_instruct/model_utils.py b/open_instruct/model_utils.py index 9b6384faa0..b98b4a08d4 100644 --- a/open_instruct/model_utils.py +++ b/open_instruct/model_utils.py @@ -67,8 +67,10 @@ def __getitem__(self, key: slice | int | list[int]) -> "Batch": queries=self.queries[key], ...
4
3
2
[{"id": "G0", "claim": "The __getitem__ method contains a significant amount of duplicated code for handling the different key types (slice, integer, list of integers) and should be refactored to reduce duplication.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "pre_existing"}, {"i...
null
allenai__open-instruct__1222
allenai/open-instruct
1,222
defect
70b0472af73bd6428e14c5d73abebbabaaeb4997
6bd64bfb9275150256e4410f6390d4bd75ce417b
increase prompt_Q size to account for eval prompts and small fixes
increase prompt_Q to accomodate local eval prompts remove generate_metrics_Q rename param_prompt_Q to prompt_Q only do `maybe_evaluate` if eval_dataset is not None <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Renames `param_prompt_Q` to `prompt_Q`, sizes the prompt queue to also hold eval prompts, removes `generate_metr...
diff --git a/open_instruct/grpo_fast.py b/open_instruct/grpo_fast.py index 3aa000c349..bfcbe06921 100644 --- a/open_instruct/grpo_fast.py +++ b/open_instruct/grpo_fast.py @@ -1702,7 +1702,7 @@ def accumulate_inference_batches( no_resampling_pass_rate: float | None = None, iter_dataloader: ShufflingIterator | ...
3
2
0
[{"id": "G0", "claim": "For consistency with the param_prompt_Q to prompt_Q rename, the queues_to_monitor key \"Param Prompt Queue\" should also be updated (e.g. to \"Prompt Queue\") so the monitoring dashboard displays the correct queue name.", "category": "maintainability", "verdict": "supported", "priority": "P2", "...
null
allenai__open-instruct__1240
allenai/open-instruct
1,240
defect
2d9ba7d0988a6155ca79c90e4cf8815348ffc162
678caef4d00792f75bdec81d43926685e5c0f124
Refactors `PolicyTrainerRayProcess` so that the `train` method uses a dict of data
This lets us clean it up by using comprehensions and loops instead of making repeated calls. Also switches the variables in `train` to use Shazeer style [shape suffixes](https://medium.com/@NoamShazeer/shape-suffixes-good-coding-style-f836e72e24fd). Runs: - Single GPU GRPO: [Beaker](https://beaker.allen.ai/...
diff --git a/open_instruct/grpo_fast.py b/open_instruct/grpo_fast.py index 25829a75bc..8dde777540 100644 --- a/open_instruct/grpo_fast.py +++ b/open_instruct/grpo_fast.py @@ -616,12 +616,12 @@ def prepare_collated_data_for_workers( ) collated_data.append( { - "collated_...
3
3
2
[{"id": "G0", "claim": "The refactoring removed the `args = self.args` binding from `train` but left bare `args.loss_denominator` (and `args.load_ref_policy`) references, so calling `train` raises a NameError before any training step executes; use `self.args` (or restore the alias).", "category": "correctness", "verdic...
null
allenai__open-instruct__1250
allenai/open-instruct
1,250
defect
70beeac44b8083b601b2cd3f7ca023c5170212f2
8c4069a1c642395decc54da08b70c6b606377d9f
Added a better error message when `ray_get_with_progress` times out.
Also added a test to verify what happens during a timeout. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Enhances `utils.ray_get_with_progress` to surface the provided description in timeout errors and adds a Ray-based test verifying the behavior. > > - **Utilities**: > - Improve `utils.ray_get_with_progress` timeout h...
diff --git a/open_instruct/utils.py b/open_instruct/utils.py index eacb3497e7..9c8ea61a70 100644 --- a/open_instruct/utils.py +++ b/open_instruct/utils.py @@ -158,10 +158,13 @@ def ray_get_with_progress( if enable: futures_iter = tqdm(futures_iter, total=len(ray_futures), desc=desc, bar_format="{l_bar}{ba...
2
1
1
[{"id": "G0", "claim": "The except block catches the built-in TimeoutError, but on Python versions before 3.11 concurrent.futures raises a distinct TimeoutError, so the handler would not trigger and the timeout would surface as an unhandled exception; it should explicitly catch futures.TimeoutError.", "category": "corr...
null
allenai__open-instruct__1252
allenai/open-instruct
1,252
defect
70beeac44b8083b601b2cd3f7ca023c5170212f2
a621ee4a16083b3e8fcbf38070f40ed4a8bb5c43
Warn on low disk space during checkpointing
## Summary - add disk space usage check before checkpointing to warn and notify via Slack - introduce reusable Slack messaging helper and tests ## Testing - uv run pytest open_instruct/test_utils.py -k slack *(fails: network dependency download error for torch wheel)* ------ [Codex Task](https://chatgpt.com/codex/tas...
diff --git a/open_instruct/grpo_fast.py b/open_instruct/grpo_fast.py index 0ed8e8df3e..eeba094bc2 100644 --- a/open_instruct/grpo_fast.py +++ b/open_instruct/grpo_fast.py @@ -132,6 +132,45 @@ logger = logger_utils.setup_logger(__name__) INVALID_LOGPROB = 1.0 +DISK_USAGE_WARNING_THRESHOLD = 0.85 + + +def warn_if_low...
4
3
2
[{"id": "G0", "claim": "The new function `warn_if_low_disk_space` and its constant `DISK_USAGE_WARNING_THRESHOLD` are general utilities and would be better placed in `open_instruct/utils.py` alongside other helpers, with the call site updated accordingly.", "category": "maintainability", "verdict": "uncertain", "priori...
null
allenai__open-instruct__1268
allenai/open-instruct
1,268
defect
713329b68931b15aee5246f735f6018c24d3f87b
4ed751e5e524e57b24d548414943b68b1d090a71
Fix disk usage
<!-- CURSOR_SUMMARY --> > [!NOTE] > Moves disk-space warning logic into utils with better handling and updates trainer checkpointing and tests to use it. > > - **Utils**: > - Add `utils.warn_if_low_disk_space(path, threshold=..., send_slack_alerts=...)` with OSError handling and optional Slack alerts. > - Introduc...
diff --git a/open_instruct/grpo_fast.py b/open_instruct/grpo_fast.py index 8fd37c515a..20c60c1364 100644 --- a/open_instruct/grpo_fast.py +++ b/open_instruct/grpo_fast.py @@ -135,37 +135,6 @@ INVALID_LOGPROB = 1.0 CHECKPOINT_COMPLETE_MARKER = ".checkpoint_complete" -DISK_USAGE_WARNING_THRESHOLD = 0.85 -CLOUD_PATH_P...
3
2
2
[{"id": "G0", "claim": "The unit tests in open_instruct/test_utils.py still call warn_if_low_disk_space from its old location grpo_fast.py instead of utils, so the test suite will fail.", "category": "testing", "verdict": "supported", "priority": "P0", "scope": "introduced"}, {"id": "G1", "claim": "Test cases should be...
null
allenai__open-instruct__1287
allenai/open-instruct
1,287
defect
53a38a638385eb45728b5dd7c29238da406eb2a9
68a2d992427f74bbf1940c3f18536ee7e8a71e02
Add ModelDims.from_hf_config helper and tests
Adds a `from_hf_config` c'tor for `ModelDims` with some basic tests. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > Introduce HF-based `ModelDims.from_hf_config`, improve sliding-window/`num_layers` handling, and make device detection CUDA-safe with corresponding tests. > > - **Utils**: > - **`ModelDims`**: > - Add ...
diff --git a/open_instruct/test_utils.py b/open_instruct/test_utils.py index 79dd2a5778..608f1e86cc 100644 --- a/open_instruct/test_utils.py +++ b/open_instruct/test_utils.py @@ -18,6 +18,7 @@ import time import unittest from unittest import mock +from types import SimpleNamespace import pytest import ray @@ -63...
4
4
2
[{"id": "G0", "claim": "When a HuggingFace config exposes sliding_window but lacks layer_types (e.g. Mistral), from_hf_config leaves num_sliding_window_layers at 0, so all-sliding-window models are reported as having no sliding layers and MFU/FLOPs calculations are skewed.", "category": "correctness", "verdict": "suppo...
null
allenai__open-instruct__1309
allenai/open-instruct
1,309
defect
ce20f5b8e6bad73217d082c8bb9c82a26f54b0cb
b15fe2c590420a2e7d2f94be28938fe1ab7880f2
Add sequence parallel via DeepSpeed Ulysses
Adds support for sequence parallel training via deepspeed ulysses, following this great guide: https://www.deepspeed.ai/tutorials/ulysses-alst-sequence-parallelism/ Basically, this just leverages features in HF transformers + deepspeed, and then edits the dataloader accordingly. This allows us to train on much longe...
diff --git a/open_instruct/grpo_fast.py b/open_instruct/grpo_fast.py index 2030a35821..5f3b7b58c5 100644 --- a/open_instruct/grpo_fast.py +++ b/open_instruct/grpo_fast.py @@ -32,10 +32,14 @@ import os import pathlib from concurrent import futures +from datetime import timedelta os.environ["NCCL_CUMEM_ENABLE"] = "...
17
13
4
[{"id": "G0", "claim": "The sequence-parallel splitting is inefficient — it redundantly gathers data all ranks already hold, computes every rank's shards when only one is used, and bounces tensors to CPU and back to GPU — so each rank should compute only its own shard and split before the device transfer.", "category":...
null
allenai__open-instruct__1326
allenai/open-instruct
1,326
defect
216f94b7f4e66d347c25e91dacd25db16df3f610
9d16d8d51dd0ffae303005e911936d6a6ab35310
Inline data prep actor naming in StreamingDataLoader and GRPO
### Motivation - Centralize and enforce the singleton name for the data preparation actor via the module-level `DATA_PREP_ACTOR_NAME` constant so callers do not pass literal names around. - Remove redundant plumbing and helpers that passed or returned the actor name to reduce API surface and accidental mismatches. - Si...
diff --git a/open_instruct/data_loader.py b/open_instruct/data_loader.py index 141aedea72..a531558fb6 100644 --- a/open_instruct/data_loader.py +++ b/open_instruct/data_loader.py @@ -45,6 +45,8 @@ logger = logging.getLogger(__name__) +DATA_PREP_ACTOR_NAME = "data_prep_singleton" + def build_index_mapping(datase...
1
1
0
[{"id": "G0", "claim": "The nested `ray.get(ray.get_actor(...).get_state.remote())` call saving the DataPreparationActor state is dense and would be clearer to first get the actor handle and then call `.get_state.remote()` on it.", "category": "readability", "verdict": "supported", "priority": "P2", "scope": "introduce...
null
allenai__open-instruct__1335
allenai/open-instruct
1,335
defect
c45f8482dbe74da84fcff18a51e9e2505b2afa05
bb3c26416bebd43305355693d856862476f5c6a3
Add parsers
Adds tool parsers + tests, and some basic dataclasses to support them. Currently stand-alone, future PRs will wire this in explicitly.
diff --git a/open_instruct/tools/parsers.py b/open_instruct/tools/parsers.py new file mode 100644 index 0000000000..5ec5bb5e83 --- /dev/null +++ b/open_instruct/tools/parsers.py @@ -0,0 +1,105 @@ +""" +Tool parsers for extracting tool calls from model output. + +Includes: +- Base ToolParser ABC +- OpenInstructLegacyToo...
4
4
2
[{"id": "G0", "claim": "ToolParser.format_tool_outputs' default implementation calls self.format_tool_calls, which is not defined anywhere, so calling it raises an AttributeError; it should instead call a per-output format_tool_output method, added as an abstract method on the base class and implemented in the subclass...
null
allenai__open-instruct__1337
allenai/open-instruct
1,337
defect
da16700a03dc5aaa5bfe209c6ff0cd4e0ece6909
b3552fdb78967d21e2b6200ea139b4821122068f
New tools + utils
Add the new tool base class and a single instantiation of it (pythoncodetool) to make it clear how it gets used. Also add related tests.
diff --git a/open_instruct/tools/new_tools.py b/open_instruct/tools/new_tools.py new file mode 100644 index 0000000000..47fe47798d --- /dev/null +++ b/open_instruct/tools/new_tools.py @@ -0,0 +1,113 @@ +""" +Basic tools that are built-in to open-instruct. +""" + +import time +import traceback +from dataclasses import a...
19
19
2
[{"id": "G0", "claim": "Non-2xx HTTP responses are not handled and `res[\"output\"]` can raise KeyError, and exceptions during the API call are not recorded in the ToolOutput error field, making error reporting inconsistent.", "category": "correctness", "verdict": "supported", "priority": "P1", "scope": "introduced"}, ...
null
allenai__open-instruct__1345
allenai/open-instruct
1,345
defect
41d4a62b6f223299bcd747c08d1c0c62024d8b41
dcac43db5f2ef7bf098977dbb9ae8a7a66bcaf61
Add serper search
Adds a serper search tool (google search). Also adds a utility function for making API calls, since this is a common pattern for tools.
diff --git a/open_instruct/tools/new_tools.py b/open_instruct/tools/new_tools.py index 2c19b3928e..e313eeea44 100644 --- a/open_instruct/tools/new_tools.py +++ b/open_instruct/tools/new_tools.py @@ -3,6 +3,7 @@ """ import asyncio +import os import time from dataclasses import dataclass from typing import ClassVa...
4
4
1
[{"id": "G0", "claim": "The ToolOutput construction is repetitive across the try and except blocks, and if an unexpected exception not caught by the specific except clauses occurs, result may be left unassigned, leading to an UnboundLocalError when _log_tool_call is called; refactor to initialize output/error/timed_out...
null
allenai__open-instruct__1346
allenai/open-instruct
1,346
defect
41d4a62b6f223299bcd747c08d1c0c62024d8b41
c57b94adb97257a2f8cc8014647adf1d63c5ea54
Add jina tool
Adds a tool for using the jina browse tool (web page browsing). Also generalizes the http request util even more.
diff --git a/open_instruct/tools/new_tools.py b/open_instruct/tools/new_tools.py index 2c19b3928e..ed00d6c22d 100644 --- a/open_instruct/tools/new_tools.py +++ b/open_instruct/tools/new_tools.py @@ -3,6 +3,7 @@ """ import asyncio +import os import time from dataclasses import dataclass from typing import ClassVa...
5
3
1
[{"id": "G0", "claim": "Combine the nested `async with` statements into a single `async with ... as session, session.get(...) as response:` line instead of suppressing the SIM117 rule with a `noqa`.", "category": "maintainability", "verdict": "uncertain", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": ...
null
allenai__open-instruct__1351
allenai/open-instruct
1,351
defect
35a03445e7fa4084ef57943cc2de759d9f2c4285
ab1d8d651537c2c0399fd4c19461aba02fb7ebb9
HFDataloader refactoring in preparation for DPO.
This is part of a series of PRs that are implementing the new Olmo-core based DPO. In this PR, we refactor `HFDataloader`: - Add to_device() function for moving batch tensors to a device - Add collator parameter for custom batch collation - Add device parameter for automatic tensor placement - Fix fs_local_ran...
diff --git a/open_instruct/data_loader.py b/open_instruct/data_loader.py index 141aedea72..9a4997560c 100644 --- a/open_instruct/data_loader.py +++ b/open_instruct/data_loader.py @@ -16,7 +16,7 @@ import os import threading import time -from collections.abc import Iterable, Iterator +from collections.abc import Call...
7
7
1
[{"id": "G0", "claim": "The docstring for the collator parameter should clarify that when collator is None the default is to wrap examples in a dict of the form {'examples': [example_1, ...]}.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "A warni...
null
allenai__open-instruct__1364
allenai/open-instruct
1,364
defect
64fdf09af0465fa6e85744b60894fdc77bf4ac12
4597a66246a8b4f8eec62ef5b7b22e3d53d58c25
Fix main bug
I thought I had fixed this, but turns out there were some other issues. Generally simplified the code such that we don't allow `tools` to be `None`.
diff --git a/open_instruct/grpo_fast.py b/open_instruct/grpo_fast.py index dc2e2bba95..11bbcedbe0 100644 --- a/open_instruct/grpo_fast.py +++ b/open_instruct/grpo_fast.py @@ -1504,16 +1504,15 @@ def setup_datasets( def create_tools( - tools: list[str] | None, tool_call_names: list[str] | None = None, tool_confi...
2
1
0
[{"id": "G0", "claim": "ToolsConfig should hold a list of a dataclass combining tool, tool_call_name and config instead of parallel lists, so the same-length requirement is enforced naturally.", "category": "design", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The length-val...
null
allenai__open-instruct__1368
allenai/open-instruct
1,368
defect
64fdf09af0465fa6e85744b60894fdc77bf4ac12
f4d1edcc9f8d54cd6dd836db03e01987227022d0
Add SLURM scripts for OLMo SFT with resume support
Hey, This PR adds SLURM-compatible scripts for running OLMo SFT training on clusters without Beaker/cloud infrastructure, as discussed with @hamishivi in #1325. Moreover, tokenizing large SFT datasets can take >12 hours (even with over 300 cpu processes). Many SLURM clusters enforce preemptive scheduling and limi...
diff --git a/open_instruct/test_checkpoint.py b/open_instruct/test_checkpoint.py new file mode 100644 index 0000000000..14bb029377 --- /dev/null +++ b/open_instruct/test_checkpoint.py @@ -0,0 +1,275 @@ +#!/usr/bin/env python +"""Tests for checkpoint functions in convert_sft_data_for_olmocore.py + +Run from project root...
7
7
1
[{"id": "G0", "claim": "The pytest command in the test file's docstring points at the wrong path; it should be open_instruct/test_checkpoint.py.", "category": "documentation", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "The sys.path manipulation in the test file is unnecessa...
null
allenai__open-instruct__1370
allenai/open-instruct
1,370
defect
64fdf09af0465fa6e85744b60894fdc77bf4ac12
e969523ebe6106d2c674e3f688d014e17aaa0790
Now, tests run locally on Macbooks
Since we updated `vllm`, we have been unable to run our tests locally on a Macbook. By moving importants around and adding a `conftest.py` file, now we can!
diff --git a/open_instruct/grpo_fast.py b/open_instruct/grpo_fast.py index dc2e2bba95..3b88405699 100644 --- a/open_instruct/grpo_fast.py +++ b/open_instruct/grpo_fast.py @@ -1307,63 +1307,6 @@ def compute_token_weights(metrics_list: list[dict[str, float]]) -> list[float]: return [1.0 / len(metrics_list)] * len(me...
2
1
1
[{"id": "G0", "claim": "The new global `addopts` ignore glob excludes every `*_gpu.py` file from collection in all pytest runs, so GPU tests (e.g. via scripts/train/debug/run_gpu_tests.sh) would collect zero tests and never run in CI or on GPU nodes; the ignore should be scoped to local dev or overridden in the GPU tes...
null
allenai__open-instruct__1374
allenai/open-instruct
1,374
defect
91701f33c825a09d7f221cc100c6077da2721f3e
c760cf9a4aac101d630c8492e0ef2efdc9411efb
Refactor DPO cache utils into dpo_utils.py
A few changes in prep for #1358: - Move `build_reference_logprobs_cache` and `compute_reference_logprobs_cache_hash` from `dpo_tune_cache.py` to `dpo_utils.py` for reuse across different training frameworks - Add `DPOLossType` enum and `config_to_json_serializable` helper - Refactor `build_reference_logprobs_cache...
diff --git a/open_instruct/dpo_tune_cache.py b/open_instruct/dpo_tune_cache.py index d30deb6621..6bb9691fd9 100644 --- a/open_instruct/dpo_tune_cache.py +++ b/open_instruct/dpo_tune_cache.py @@ -25,14 +25,12 @@ import deepspeed # isort: on -import hashlib import json import math import pathlib import random...
1
1
0
[{"id": "G0", "claim": "Consider using the config_to_json_serializable helper to process the entire cache_key dictionary in compute_reference_logprobs_cache_hash instead of manually handling the type conversion for dpo_loss_type, for consistency, robustness, and maintainability.", "category": "maintainability", "verdic...
null
allenai__open-instruct__1384
allenai/open-instruct
1,384
defect
a9cceb1ca68bcdffafef414237b03856c6627e37
b73ec91d3fd1bbb0112612aad33382345aedc10a
Add generic MCP tool support
Adds MCP tool support! This tool is a bit unique relative to other tools. Here, we connect to some server, which may contain multiple tools *within* it. We auto-discover these tools and expose them all to the model. We may also connect to multiple mcp servers too, so long as their tool names don't clash. I have a basic...
diff --git a/open_instruct/grpo_fast.py b/open_instruct/grpo_fast.py index 0b71f5de10..cd7da6fc8f 100644 --- a/open_instruct/grpo_fast.py +++ b/open_instruct/grpo_fast.py @@ -102,7 +102,7 @@ ) from open_instruct.rl_utils import Timer, masked_mean from open_instruct.tools.parsers import create_tool_parser -from open_...
2
2
0
[{"id": "G0", "claim": "The actor-creation logic in create_tools is duplicated between the if and else blocks; refactor it (e.g. collect configs then loop once) to reduce repetition.", "category": "maintainability", "verdict": "supported", "priority": "P2", "scope": "introduced"}, {"id": "G1", "claim": "expand_tools ma...
null
allenai__open-instruct__1388
allenai/open-instruct
1,388
defect
f5ea9792df58f766fc4f7b920cdc063b4556388d
8b83b9606ea39255bd1b2b9672f0cd4248ea9987
Add retry logic and configurable concurrency to tool API calls
## Summary - Add retry behavior to `make_api_request` using tenacity, making it more robust. - Add `max_concurrency` parameter to `BaseToolConfig`, allowing per-tool configuration of Ray actor concurrency. This allows a form of rate limiting on a per-tool basis (since it effectively controls the number of concurrent ...
diff --git a/CHANGELOG.md b/CHANGELOG.md index dab56abed4..887475455f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ All notable changes to this project will be documented in this file. ### Added +- Added retry logic with exponential backoff to `make_api_request` for tool API calls (retries on timeou...
6
6
2
[{"id": "G0", "claim": "The retry condition uses the too-broad aiohttp.ClientError and would retry on all 4xx client errors (e.g. 404) instead of only 429/5xx and network errors, contradicting the function's documentation; it should use aiohttp.ClientConnectionError plus _RetryableHTTPError.", "category": "correctness"...
null
allenai__open-instruct__1397
allenai/open-instruct
1,397
defect
0f8912f53b029fbcc41a5c9ad5d51a38f9b49366
3a8a1372907731a8b84a4f7f4dd56ddf7cfbe1a4
Add GRPO callbacks for OLMo-core Trainer (GRPO olmo-core: PR 3 of 5)
Adds callbacks for GRPO training with OLMo-core's Trainer: - `VLLMWeightSyncCallback`: syncs weights to vLLM engines after each step - `RefPolicyUpdateCallback`: Polyak averaging for reference policy updates Based on PR #1412 (GRPOTrainModule) GPU_TESTS=[01KFKCWJQKNEB71EZSA93XRKWF](https://beaker.org/orgs/ai2/w...
diff --git a/open_instruct/benchmark_generators.py b/open_instruct/benchmark_generators.py index 1518275b7e..dbbf0c8a47 100644 --- a/open_instruct/benchmark_generators.py +++ b/open_instruct/benchmark_generators.py @@ -27,7 +27,7 @@ import vllm from ray.util import queue as ray_queue -from open_instruct import data...
7
5
2
[{"id": "G0", "claim": "When loss_denominator is left at its default value (\"token\"), train_batch divides the loss tensor by a string, which raises a TypeError at runtime and aborts training; the \"token\" value should be special-cased to normalize by the number of response tokens.", "category": "correctness", "verdi...
null
allenai__open-instruct__1406
allenai/open-instruct
1,406
defect
67468eba288dba91e1d04dc181539922fa6060bc
cb8614b8963da7a20d65fd6f0c381b2afaa2efb4
Add rollout saving to GRPO training
Implement the save_traces flag to save all generated RL rollouts to disk during GRPO training. For each generation, saves prompt_tokens, response_tokens, advantage, reward, step, sample_idx, prompt_idx, dataset, finish_reason, ground_truth, and tool_info. - Add rollouts_save_path arg with default /weka/oe-adapt-defa...
diff --git a/open_instruct/data_loader.py b/open_instruct/data_loader.py index cb2e8f9301..9e4840cdcb 100644 --- a/open_instruct/data_loader.py +++ b/open_instruct/data_loader.py @@ -12,8 +12,11 @@ # See the License for the specific language governing permissions and # limitations under the License. +import datetim...
3
2
1
[{"id": "G0", "claim": "Catching a generic Exception in get_git_commit can hide other programming errors; it should catch specific exceptions like subprocess.CalledProcessError or FileNotFoundError instead.", "category": "maintainability", "verdict": "supported", "priority": "P1", "scope": "introduced"}, {"id": "G1", "...
null