-
Notifications
You must be signed in to change notification settings - Fork 473
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2291 from karagg/llm
[LLM] add ci script
- Loading branch information
Showing
29 changed files
with
13 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,19 @@ | ||
def get_diff(file1,file2): | ||
# get diff rate bewteen two files | ||
def get_diff(file1, file2): | ||
with open(file1, 'r') as f1, open(file2, 'r') as f2: | ||
lines1 = f1.read().splitlines() | ||
lines2 = f2.read().splitlines() | ||
assert len(lines1)==len(lines2) | ||
total_lines=len(lines1) | ||
diff_lines=0 | ||
assert len(lines1) == len(lines2) | ||
total_lines = len(lines1) | ||
diff_lines = 0 | ||
|
||
for i in range(total_lines): | ||
if lines1[i]!=lines2[i]: | ||
diff_lines=diff_lines+1 | ||
if lines1[i] != lines2[i]: | ||
diff_lines = diff_lines + 1 | ||
|
||
diff_rate = f"{diff_lines}/{total_lines}" | ||
if diff_lines==0: | ||
is_diff=0 | ||
if diff_lines == 0: | ||
is_diff = 0 | ||
else: | ||
is_diff=1 | ||
return is_diff,diff_rate | ||
is_diff = 1 | ||
return is_diff, diff_rate |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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