mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
This reverts commit 2293fe1024812d6349f6e2b3b7de82c6b73f11e4. Reverted https://github.com/pytorch/pytorch/pull/129374 on behalf of https://github.com/malfet due to failing internal ROCM builds with error: ModuleNotFoundError: No module named hipify ([comment](https://github.com/pytorch/pytorch/pull/129374#issuecomment-2562973920))
27 lines
521 B
Python
Executable File
27 lines
521 B
Python
Executable File
#!/usr/bin/env python3
|
|
|
|
import os
|
|
import sys
|
|
|
|
import yaml
|
|
|
|
|
|
# Need to import modules that lie on an upward-relative path
|
|
sys.path.append(os.path.join(sys.path[0], ".."))
|
|
|
|
import cimodel.lib.miniyaml as miniyaml
|
|
|
|
|
|
def regurgitate(depth, use_pyyaml_formatter=False):
|
|
data = yaml.safe_load(sys.stdin)
|
|
|
|
if use_pyyaml_formatter:
|
|
output = yaml.dump(data, sort_keys=True)
|
|
sys.stdout.write(output)
|
|
else:
|
|
miniyaml.render(sys.stdout, data, depth)
|
|
|
|
|
|
if __name__ == "__main__":
|
|
regurgitate(3)
|