-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* [Improve] add a version option in docs menu (#1162) * [Enhance] update dev_scripts for link checking (#1164) * [Refactoring] decompose the implementations of different metrics into several files (#1161) * [Fix] Fix PPL bug (#1172) * [Fix] Fix some known bugs. (#1200) * [Fix] Benchmark related bugs (#1236) * [Enhancement] Support rerun failed or canceled jobs in `train_benchmark.py` (#1259) * [Fix] Fix bugs in `sr test config`, `realbasicvsr config` and `pconv config` (#1167) * [Fix] fix test of Vid4 datasets bug (#1293) * [Feature] Support multi-metrics with different sample-model (#1171) * [Fix] fix GenerateSegmentIndices ut (#1302) * [Enhancement] Reduce the randomness in unit test of `stylegan3_utils.py` (#1306) * [CI] Fix GitHub windows CI (#1320) * [Fix] fix basicvsr++ mirror sequence bug (#1304) * [Fix] fix sisr-test psnr config (#1319) * [Fix] fix vsr models pytorch2onnx (#1300) * [Bug] Ensure the output type of `GenerateFacialHeatmap` is `np.float32` (#1310) * [Bug] Fix sampling behavior of `unpaired_dataset.py` and urls in cyclegan's README (#1308) * [README] Fix TTSR's README (#1325) * [CI] Update `paths-ignore` for GitHub CI (#1327) * [Bug] Save gt images in PGGAN's `forward` (#1328) * [Bug] Correct RDN number of channels (#1332) * [Bug] Revise flip transformation in some conditional gan's setting (#1331) * [Unit Test] Fix unit test of SNR (#1335) * [Bug] Revise flavr config (#1336) * [Fix] fix realesrgan ema (#1341) * [Fix] Fix bugs find during benchmark running (#1348) * [Fix] fix liif test config (#1353) * [Enhancement] Complete save_best in configs (#1349) * [Config] Revise discriminator's learning rate of TTSR to align with 0.x version (#1352) * [Fix] fix edsr configs (#1367) * [Enhancement] Add pixel value clip in visualizer (#1365) * [Bug] Fix randomness in FixedCrop + add L1 loss in Pix2Pix (#1364) * [Fix] fix realbasicvsr config (#1358) * [Enhancement] Fix PESinGAN-inter-pad setting + add SinGAN Dataset + add SinGAN demo (#1363) * [Fix] fix types of exceptions in demos (#1372) * [Enhancement] Support deterministic training in benchmark (#1356) * [Fix] Avoid cast int and float in GenDataPreprocessor (#1385) * [Config] Update metric config in ggan (#1386) * [Config] Revise batch size in wang-gp's config (#1384) * [Fix]: add type and change default number of preprocess_div2k_dataset.py (#1380) * [Feature] Support qualitative comparison tools (#1303) * [Docs] Revise docs (change PackGenInputs and GenDataSample to mmediting ones) (#1382) * [Config] Revise Pix2Pix edges2shoes config (#1391) * [Bug] fix rdn and srcnn train configs (#1392) * [Fix] Fix test/val pipeline of pegan configs (#1393) * [Fix] Modify Readme of S3 (#1398) * [Fix] Correct fid of ggan (#1397) * [Feature] support instance_aware_colorization inference (#1370) Co-authored-by: ruoning <w853133995@outlook.com> Co-authored-by: Yifei Yang <2744335995@qq.com> Co-authored-by: LeoXing1996 <xingzn1996@hotmail.com> Co-authored-by: Z-Fran <49083766+Z-Fran@users.noreply.github.com> Co-authored-by: Qunliang Xing <ryanxingql@gmail.com> Co-authored-by: Yang Gao <Gary1546308416AL@gmail.com> Co-authored-by: ruoning <44117949+ruoningYu@users.noreply.github.com>
- Loading branch information
1 parent
998df8c
commit 68fd55c
Showing
202 changed files
with
7,123 additions
and
2,538 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
# Copyright (c) MegFlow. All rights reserved. | ||
# /bin/python3 | ||
|
||
import argparse | ||
import os | ||
import re | ||
|
||
|
||
def make_parser(): | ||
parser = argparse.ArgumentParser('Doc link checker') | ||
parser.add_argument( | ||
'--http', default=False, type=bool, help='check http or not ') | ||
parser.add_argument( | ||
'--target', | ||
default='./docs', | ||
type=str, | ||
help='the directory or file to check') | ||
return parser | ||
|
||
|
||
pattern = re.compile(r'\[.*?\]\(.*?\)') | ||
|
||
|
||
def analyze_doc(home, path): | ||
print('analyze {}'.format(path)) | ||
problem_list = [] | ||
code_block = 0 | ||
with open(path) as f: | ||
lines = f.readlines() | ||
for line in lines: | ||
line = line.strip() | ||
if line.startswith('```'): | ||
code_block = 1 - code_block | ||
|
||
if code_block > 0: | ||
continue | ||
|
||
if '[' in line and ']' in line and '(' in line and ')' in line: | ||
all = pattern.findall(line) | ||
for item in all: | ||
# skip ![]() | ||
if item.find('[') == item.find(']') - 1: | ||
continue | ||
|
||
# process the case [text()]() | ||
offset = item.find('](') | ||
if offset == -1: | ||
continue | ||
item = item[offset:] | ||
start = item.find('(') | ||
end = item.find(')') | ||
ref = item[start + 1:end] | ||
|
||
if ref.startswith('http') or ref.startswith('#'): | ||
continue | ||
if '.md#' in ref: | ||
ref = ref[ref.find('#'):] | ||
fullpath = os.path.join(home, ref) | ||
if not os.path.exists(fullpath): | ||
problem_list.append(ref) | ||
else: | ||
continue | ||
if len(problem_list) > 0: | ||
print(f'{path}:') | ||
for item in problem_list: | ||
print(f'\t {item}') | ||
print('\n') | ||
raise Exception('found link error') | ||
|
||
|
||
def traverse(target): | ||
if os.path.isfile(target): | ||
analyze_doc(os.path.dirname(target), target) | ||
return | ||
for home, dirs, files in os.walk(target): | ||
for filename in files: | ||
if filename.endswith('.md'): | ||
path = os.path.join(home, filename) | ||
if os.path.islink(path) is False: | ||
analyze_doc(home, path) | ||
|
||
|
||
if __name__ == '__main__': | ||
args = make_parser().parse_args() | ||
traverse(args.target) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.