Skip to content
This repository was archived by the owner on Oct 31, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .circleci/ci-requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
yapf
20 changes: 20 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
version: 2.1
orbs:
python: circleci/[email protected]

jobs:
linting:
executor: python/default
steps:
- checkout
- python/install-packages:
pip-dependency-file: .circleci/ci-requirements.txt
pkg-manager: pip
- run:
name: Run tests
command: yapf -d --recursive rlmeta

workflows:
main:
jobs:
- linting
9 changes: 9 additions & 0 deletions rlmeta/core/rescalers.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ def recover(self, x: torch.Tensor) -> torch.Tensor:
"""


class PassthroughRescaler(Rescaler):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we consider to rename it as IdentityRescaler ?


def rescale(self, x: torch.Tensor) -> torch.Tensor:
return x

def recover(self, x: torch.Tensor) -> torch.Tensor:
return x


class RMSRescaler(Rescaler):

def __init__(self, size: Union[int, Tuple[int]]) -> None:
Expand Down