Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
text-generation-inference
Commits
5b9de4a1
Unverified
Commit
5b9de4a1
authored
Jul 13, 2023
by
OlivierDehaene
Committed by
GitHub
Jul 13, 2023
Browse files
fix(server): blacklist local files (#609)
Close #589 #602
parent
c8b077be
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
server/text_generation_server/utils/convert.py
server/text_generation_server/utils/convert.py
+8
-0
No files found.
server/text_generation_server/utils/convert.py
View file @
5b9de4a1
...
...
@@ -94,6 +94,14 @@ def convert_files(pt_files: List[Path], sf_files: List[Path], discard_names: Lis
# We do this instead of using tqdm because we want to parse the logs with the launcher
for
i
,
(
pt_file
,
sf_file
)
in
enumerate
(
zip
(
pt_files
,
sf_files
)):
# Skip blacklisted files
if
(
"arguments"
in
pt_file
.
name
or
"args"
in
pt_file
.
name
or
"training"
in
pt_file
.
name
):
continue
start
=
datetime
.
datetime
.
now
()
convert_file
(
pt_file
,
sf_file
,
discard_names
)
elapsed
=
datetime
.
datetime
.
now
()
-
start
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment