Commit a35da89
Fix Pyre missing annotations in test_disjoint_bandit_container.py
Summary:
## Instructions about RACER Diffs:
**Commandeer this diff (recommended) or land with accept2ship tag.**
*This feature is still in BETA and we are continuously improving it. Your constructive feedback would help improving RACER and highly appreciated.*
This diff was pre-created by Racer AI agent for your convenience on top of T235393804. How-to-code instruction is provided by oncall [Zhijia Zhang](https://www.internalfb.com/profile/view/405511865743720). For questions or suggestions please post in [RACER Maintainer](https://fb.workplace.com/groups/742040101615185) group.
You will receive **FULL CREDIT** (ETS) for this diff if you either:
- [**Recommended**]Commandeer and land this diff after another reviewer's approval
- Accept it and ship it after required approvals are provided.
Once landed, feel free to claim the associated task and the EYS project.
This diff fixes pyre-missing-annotations warnings identified by Quality Insight from [Monetization codehub](https://fburl.com/quality/0kw8oby2)
- If you are happy with the changes, commandeer it if minor edits are needed. (**we encourage commandeer to get the diff credit**)
- If you are not happy with the changes, please comment on the diff with clear actions and send it back to the author. Racer will pick it up and re-generate.
- If you really feel the Racer is not helping with this change (alas, some complex changes are hard for AI) feel free to abandon this diff.
- **For M10N reviewers:** as you review AI-generated diffs, we ask you to give them the same priority as human-generated diffs, and take action in a timely manner by either accepting, rejecting, or resigning as a reviewer. For diffs that don't meet the quality bar (e.g. code doesn't compile, not readable or introduces functionality regressions), we ask that you use the following hashtags to provide clear signals to improve our tools - `#monlowqualitydiff` `#monwrongreviewerdiff`
## Summary:
Fixed pyre-missing-annotations warnings in `fbcode/pearl/test/unit/with_pytorch/test_disjoint_bandit_container.py` by adding type annotations to the `PolicyLearnerWrapper` class methods:
1. Added `DisjointBanditContainer` and `ActionSpace` type annotations to the `__init__` method parameters and `-> None` return type
2. Added `torch.Tensor` type annotation to the `forward` method parameter and `-> Action` return type
3. Added necessary imports for `Action` and `ActionSpace` types
The changes are minimal and only add the missing type annotations without modifying any functionality or logic.
---
> Generated by [RACER](https://www.internalfb.com/wiki/RACER_(Risk-Aware_Code_Editing_and_Refactoring)/), powered by [Confucius](https://www.internalfb.com/wiki/Confucius/Analect/Shared_Analects/Confucius_Code_Assist_(CCA)/)
[Session](https://www.internalfb.com/confucius?session_id=310414de-9208-11f0-a075-37b88107939a&tab=Chat), [Trace](https://www.internalfb.com/confucius?session_id=310414de-9208-11f0-a075-37b88107939a&tab=Trace)
Differential Revision: D82289854
fbshipit-source-id: 3eea08caedee6e41003f36ba1f0e3994d01f38c31 parent 176c41c commit a35da89
1 file changed
Lines changed: 6 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
17 | 19 | | |
18 | 20 | | |
19 | 21 | | |
| |||
294 | 296 | | |
295 | 297 | | |
296 | 298 | | |
297 | | - | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
298 | 302 | | |
299 | 303 | | |
300 | 304 | | |
301 | 305 | | |
302 | | - | |
| 306 | + | |
303 | 307 | | |
304 | 308 | | |
305 | 309 | | |
| |||
0 commit comments