Skip to content
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

Change style for splitting on commas #3078

Merged
merged 2 commits into from
Mar 7, 2024
Merged

Change style for splitting on commas #3078

merged 2 commits into from
Mar 7, 2024

Conversation

b-chu
Copy link
Contributor

@b-chu b-chu commented Mar 1, 2024

What does this PR do?

Splits imports in the following way

from composer.algorithms.low_precision_groupnorm.low_precision_groupnorm import (LowPrecisionGroupNorm,
                                                                                 apply_low_precision_groupnorm)
from composer.algorithms.low_precision_groupnorm.low_precision_groupnorm import (
    LowPrecisionGroupNorm,
    apply_low_precision_groupnorm,
)

Changes function arguments in the following way:

    freeze_percentage = _freeze_schedule(current_duration=current_duration,
                                         freeze_start=freeze_start,
                                         freeze_level=freeze_level)
    freeze_percentage = _freeze_schedule(
        current_duration=current_duration,
        freeze_start=freeze_start,
        freeze_level=freeze_level,
    )

What issue(s) does this change relate to?

Before submitting

  • Have you read the contributor guidelines?
  • Is this change a documentation change or typo fix? If so, skip the rest of this checklist.
  • Was this change discussed/approved in a GitHub issue first? It is much more likely to be merged if so.
  • Did you update any related docs and document your change?
  • Did you update any related tests and add any new tests related to your change? (see testing)
  • Did you run the tests locally to make sure they pass?
  • Did you run pre-commit on your change? (see the pre-commit section of prerequisites)

@b-chu b-chu force-pushed the style branch 4 times, most recently from 8d1a5b3 to 5ee552e Compare March 7, 2024 18:50
Splits imports in the following way
```
from composer.algorithms.low_precision_groupnorm.low_precision_groupnorm import (LowPrecisionGroupNorm,
                                                                                 apply_low_precision_groupnorm)
```
```
from composer.algorithms.low_precision_groupnorm.low_precision_groupnorm import (
    LowPrecisionGroupNorm,
    apply_low_precision_groupnorm,
)
```

Changes function arguments in the following way:
```
    freeze_percentage = _freeze_schedule(current_duration=current_duration,
                                         freeze_start=freeze_start,
                                         freeze_level=freeze_level)
```
```
    freeze_percentage = _freeze_schedule(
        current_duration=current_duration,
        freeze_start=freeze_start,
        freeze_level=freeze_level,
    )
```
@b-chu b-chu marked this pull request as ready for review March 7, 2024 19:24
@b-chu b-chu requested review from a team as code owners March 7, 2024 19:24
Copy link
Contributor

@mvpatel2000 mvpatel2000 left a comment

Choose a reason for hiding this comment

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

LGTM, one weird format

composer/datasets/utils.py Show resolved Hide resolved
@b-chu b-chu merged commit 83cb5c1 into dev Mar 7, 2024
28 checks passed
@b-chu b-chu deleted the style branch March 7, 2024 21:27
j316chuck pushed a commit that referenced this pull request May 16, 2024
* Change style for splitting on commas

Splits imports in the following way
```
from composer.algorithms.low_precision_groupnorm.low_precision_groupnorm import (LowPrecisionGroupNorm,
                                                                                 apply_low_precision_groupnorm)
```
```
from composer.algorithms.low_precision_groupnorm.low_precision_groupnorm import (
    LowPrecisionGroupNorm,
    apply_low_precision_groupnorm,
)
```

Changes function arguments in the following way:
```
    freeze_percentage = _freeze_schedule(current_duration=current_duration,
                                         freeze_start=freeze_start,
                                         freeze_level=freeze_level)
```
```
    freeze_percentage = _freeze_schedule(
        current_duration=current_duration,
        freeze_start=freeze_start,
        freeze_level=freeze_level,
    )
```

* Add trailing commas through ruff
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants