Skip to content

Simplify chain comparisons, remove redundant parentheses - #3912

Merged
tjruwase merged 4 commits into
deepspeedai:masterfrom
digger-yu:patch1
Jul 19, 2023
Merged

tjruwase merged 4 commits into
deepspeedai:masterfrom
digger-yu:patch1

Conversation

@digger-yu

Copy link
Copy Markdown
Contributor

Simplify chain comparisons, remove redundant parentheses

Make code easier to read

Modify detail infor
deepspeed/compression/scheduler.py
deepspeed/elasticity/elasticity.py
deepspeed/runtime/zero/partition_parameters.py
deepspeed/runtime/zero/stage3.py
deepspeed/runtime/zero/stage_1_and_2.py
deepspeed/utils/timer.py

please check

@mrwyattii

Copy link
Copy Markdown
Contributor

@digger-yu could you please run the pre-commit and commit changes to get the formatting test to pass?
pre-commit run --all-files

@digger-yu

digger-yu commented Jul 12, 2023 •

Copy link
Copy Markdown
Contributor Author

@mrwyattii i check the Formatting log, i think formatting test is ok

https://pipelines.actions.githubusercontent.com/serviceHosts/fc371294-f4c1-434a-a300-e0ba12a073aa/_apis/pipelines/1/runs/71777/signedlogcontent/2?urlExpires=2023-07-12T06%3A16%3A10.3321593Z&urlSigningMethod=HMACV1&urlSignature=wfrUBnsuItC7AQ%2FdS4dr2P5%2FsAPQlaHzEe17NYEihic%3D

2023-07-12T00:23:10.8608503Z Check hooks apply to the repository......................................Passed
2023-07-12T00:23:11.3915791Z Check for useless excludes...............................................Passed
2023-07-12T00:23:11.7902498Z Check for case conflicts.................................................Passed
2023-07-12T00:23:12.1964063Z Check JSON...............................................................Passed
2023-07-12T00:23:12.5223128Z Check for broken symlinks................................................Passed
2023-07-12T00:23:12.9284816Z Check Yaml...............................................................Passed
2023-07-12T00:23:13.3163183Z Detect Destroyed Symlinks................................................Passed
2023-07-12T00:23:13.3946894Z Fix End of Files.........................................................Passed
2023-07-12T00:23:13.4660679Z fix UTF-8 byte order marker..............................................Passed
2023-07-12T00:23:13.5405995Z Fix python encoding pragma...............................................Passed
2023-07-12T00:23:13.7134579Z Mixed line ending........................................................Passed
2023-07-12T00:23:13.7796211Z Fix requirements.txt.....................................................Passed
2023-07-12T00:23:13.9409973Z Trim Trailing Whitespace.................................................Passed
2023-07-12T00:23:59.7568787Z yapf.....................................................................Failed
2023-07-12T00:23:59.7570107Z - hook id: yapf
2023-07-12T00:23:59.7570806Z - files were modified by this hook
2023-07-12T00:24:00.3859979Z clang-format.............................................................Passed
2023-07-12T00:24:00.5367014Z check-torchdist..........................................................Passed
2023-07-12T00:24:05.0630152Z check-license............................................................Passed
2023-07-12T00:24:05.6127313Z codespell................................................................Passed
2023-07-12T00:24:21.4055913Z flake8...................................................................Passed
2023-07-12T00:24:21.7231801Z check-torchcuda..........................................................Passed
2023-07-12T00:24:21.7607073Z ##[error]Process completed with exit code 1.

@mrwyattii

Copy link
Copy Markdown
Contributor

@digger-yu the pre-commit is modifying files for formatting:

2023-07-12T00:23:59.7568787Z yapf.....................................................................Failed
2023-07-12T00:23:59.7570107Z - hook id: yapf
2023-07-12T00:23:59.7570806Z - files were modified by this hook

Please check with git status which files are modified and commit those changes. Thanks!

@digger-yu

digger-yu commented Jul 13, 2023 •

Copy link
Copy Markdown
Contributor Author

@mrwyattii please check again , this time all check passed

root@server:~/git/DeepSpeed# pre-commit run --all-files
Check hooks apply to the repository......................................Passed
Check for useless excludes...............................................Passed
Check for case conflicts.................................................Passed
Check JSON...............................................................Passed
Check for broken symlinks................................................Passed
Check Yaml...............................................................Passed
Detect Destroyed Symlinks................................................Passed
Fix End of Files.........................................................Passed
fix UTF-8 byte order marker..............................................Passed
Fix python encoding pragma...............................................Passed
Mixed line ending........................................................Passed
Fix requirements.txt.....................................................Passed
Trim Trailing Whitespace.................................................Passed
yapf.....................................................................Passed
clang-format.............................................................Passed
check-torchdist..........................................................Passed
check-license............................................................Passed
codespell................................................................Passed
flake8...................................................................Passed
check-torchcuda..........................................................Passed

@tjruwase
tjruwase added this pull request to the merge queue Jul 19, 2023
Merged via the queue into deepspeedai:master with commit fc8de76 Jul 19, 2023
@digger-yu
digger-yu deleted the patch1 branch July 19, 2023 03:22
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