Skip to content

[hyperactor] extensible configuration with attributes #229

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from

Conversation

mariusae
Copy link
Member

@mariusae mariusae commented Jun 11, 2025

Stack from ghstack (oldest at bottom):

Implement hyperactor configuration with an attribute dictionary. This makes the configuration extensible -- downstream crates can define their own keys -- and provides a uniform way to define, access, store, and load hyperactor related configuration.

The base hyperactor configuration is defined in terms of a set of keys in the config crate. The config crate also implements defaults for these. (As a future change, we should consider including defaults in the base attribute dictionary implementation.)

We also provide an improved overloading API for tests, wherein individual keys can be directly overriden, and correctly ensures that tests are serialized:

let config = config::global::lock();
let _guard = config.override_key(crate::config::MESSAGE_ACK_EVERY_N_MESSAGES, 1);

Differential Revision: D76426286

Implement hyperactor configuration with an attribute dictionary. This makes the configuration extensible -- downstream crates can define their own keys -- and provides a uniform way to define, access, store, and load hyperactor related configuration.

The base hyperactor configuration is defined in terms of a set of keys in the config crate. The config crate also implements defaults for these. (As a future change, we should consider including defaults in the base attribute dictionary implementation.)

We also provide an improved overloading API for tests, wherein individual keys can be directly overriden, and correctly ensures that tests are serialized:

```
let config = config::global::lock();
let _guard = config.override_key(crate::config::MESSAGE_ACK_EVERY_N_MESSAGES, 1);
```

Differential Revision: [D76426286](https://our.internmc.facebook.com/intern/diff/D76426286/)

[ghstack-poisoned]
mariusae added a commit that referenced this pull request Jun 11, 2025
Implement hyperactor configuration with an attribute dictionary. This makes the configuration extensible -- downstream crates can define their own keys -- and provides a uniform way to define, access, store, and load hyperactor related configuration.

The base hyperactor configuration is defined in terms of a set of keys in the config crate. The config crate also implements defaults for these. (As a future change, we should consider including defaults in the base attribute dictionary implementation.)

We also provide an improved overloading API for tests, wherein individual keys can be directly overriden, and correctly ensures that tests are serialized:

```
let config = config::global::lock();
let _guard = config.override_key(crate::config::MESSAGE_ACK_EVERY_N_MESSAGES, 1);
```

Differential Revision: [D76426286](https://our.internmc.facebook.com/intern/diff/D76426286/)

ghstack-source-id: 289668836
Pull Request resolved: #229
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 11, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76426286

Implement hyperactor configuration with an attribute dictionary. This makes the configuration extensible -- downstream crates can define their own keys -- and provides a uniform way to define, access, store, and load hyperactor related configuration.

The base hyperactor configuration is defined in terms of a set of keys in the config crate. The config crate also implements defaults for these. (As a future change, we should consider including defaults in the base attribute dictionary implementation.)

We also provide an improved overloading API for tests, wherein individual keys can be directly overriden, and correctly ensures that tests are serialized:

```
let config = config::global::lock();
let _guard = config.override_key(crate::config::MESSAGE_ACK_EVERY_N_MESSAGES, 1);
```

Differential Revision: [D76426286](https://our.internmc.facebook.com/intern/diff/D76426286/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76426286

Implement hyperactor configuration with an attribute dictionary. This makes the configuration extensible -- downstream crates can define their own keys -- and provides a uniform way to define, access, store, and load hyperactor related configuration.

The base hyperactor configuration is defined in terms of a set of keys in the config crate. The config crate also implements defaults for these. (As a future change, we should consider including defaults in the base attribute dictionary implementation.)

We also provide an improved overloading API for tests, wherein individual keys can be directly overriden, and correctly ensures that tests are serialized:

```
let config = config::global::lock();
let _guard = config.override_key(crate::config::MESSAGE_ACK_EVERY_N_MESSAGES, 1);
```

Differential Revision: [D76426286](https://our.internmc.facebook.com/intern/diff/D76426286/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76426286

Implement hyperactor configuration with an attribute dictionary. This makes the configuration extensible -- downstream crates can define their own keys -- and provides a uniform way to define, access, store, and load hyperactor related configuration.

The base hyperactor configuration is defined in terms of a set of keys in the config crate. The config crate also implements defaults for these. (As a future change, we should consider including defaults in the base attribute dictionary implementation.)

We also provide an improved overloading API for tests, wherein individual keys can be directly overriden, and correctly ensures that tests are serialized:

```
let config = config::global::lock();
let _guard = config.override_key(crate::config::MESSAGE_ACK_EVERY_N_MESSAGES, 1);
```

Differential Revision: [D76426286](https://our.internmc.facebook.com/intern/diff/D76426286/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D76426286

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in d80b143.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Meta Open Source bot. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants