Skip to content

mark metricmodule methods as experimental #2983

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

iamzainhuda
Copy link
Contributor

Summary: tsia

Reviewed By: kausv

Differential Revision: D75014609

Zain Huda and others added 3 commits May 15, 2025 09:41
Summary:
wip - hierarchical metric aggregation for paft

will add fused task aggregation in a later diff. this diff supports unfused task computation only.

pass in the devicemesh from DMPCollection or can pass in DMPCollection.sharding_pg

example output:
```
ne:
  {
     task_name: {state : tensor, state : tensor}, task_name : {state : tensor, state : tensor}
   },
mse:
   ...
```

```
'ne': {'DefaultTask': {'cross_entropy_sum': tensor([18453.3014], device='cuda:1', dtype=torch.float64), 'window_cross_entropy_sum': tensor([18453.3014], device='cuda:1', dtype=torch.float64), 'weighted_num_samples': tensor([12778.6176], device='cuda:1', dtype=torch.float64), 'window_weighted_num_samples': tensor([12778.6176], device='cuda:1', dtype=torch.float64), 'pos_labels': tensor([6420.7206], device='cuda:1', dtype=torch.float64), 'window_pos_labels': tensor([6420.7206], device='cuda:1', dtype=torch.float64), 'neg_labels': tensor([6357.8971], device='cuda:1', dtype=torch.float64), 'window_neg_labels': tensor([6357.8971], device='cuda:1', dtype=torch.float64)}}}
```

Differential Revision: D71934160
Summary:
adding a simple decorator to allow us to flag APIs as experimental for users, optional flags to specify additional information such as package versions and dates

usage:
```python
experimental
def f(x):
  ...
```

logs will show:
```
function is *experimental* and may change or be removed without notice.
```

Differential Revision: D75014138
Summary: tsia

Reviewed By: kausv

Differential Revision: D75014609
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label May 19, 2025
@facebook-github-bot
Copy link
Contributor

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

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 Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants