Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
Data Generator
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Automatic Text Recognition
Data Generator
Commits
5d328548
Commit
5d328548
authored
3 years ago
by
Martin
Browse files
Options
Downloads
Patches
Plain Diff
add username to default cache path to avoid conflicts with other user caches
parent
32de35af
No related branches found
No related tags found
No related merge requests found
Pipeline
#74324
passed
3 years ago
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
kaldi_data_generator/main.py
+4
-1
4 additions, 1 deletion
kaldi_data_generator/main.py
with
4 additions
and
1 deletion
kaldi_data_generator/main.py
+
4
−
1
View file @
5d328548
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
# -*- coding: utf-8 -*-
# -*- coding: utf-8 -*-
import
argparse
import
argparse
import
getpass
import
os
import
os
import
random
import
random
from
collections
import
Counter
from
collections
import
Counter
...
@@ -620,6 +621,8 @@ class KaldiPartitionSplitter:
...
@@ -620,6 +621,8 @@ class KaldiPartitionSplitter:
def
create_parser
():
def
create_parser
():
user_name
=
getpass
.
getuser
()
parser
=
argparse
.
ArgumentParser
(
parser
=
argparse
.
ArgumentParser
(
description
=
"
Script to generate Kaldi or kraken training data from annotations from Arkindex
"
,
description
=
"
Script to generate Kaldi or kraken training data from annotations from Arkindex
"
,
formatter_class
=
argparse
.
ArgumentDefaultsHelpFormatter
,
formatter_class
=
argparse
.
ArgumentDefaultsHelpFormatter
,
...
@@ -802,7 +805,7 @@ def create_parser():
...
@@ -802,7 +805,7 @@ def create_parser():
parser
.
add_argument
(
parser
.
add_argument
(
"
--cache_dir
"
,
"
--cache_dir
"
,
type
=
Path
,
type
=
Path
,
default
=
Path
(
"
/tmp/kaldi_data_generator/cache/
"
),
default
=
Path
(
f
"
/tmp/kaldi_data_generator
_
{
user_name
}
/cache/
"
),
help
=
"
Cache dir where to save the full size downloaded images. Change it to force redownload.
"
,
help
=
"
Cache dir where to save the full size downloaded images. Change it to force redownload.
"
,
)
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment