Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
zamba-predict
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Scientific Computing
jobs and pipelines
zamba-predict
Commits
c41444d1
Verified
Commit
c41444d1
authored
6 years ago
by
ck85nori
Browse files
Options
Downloads
Patches
Plain Diff
adds chunk input script
parent
6f74416e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.md
+11
-0
11 additions, 0 deletions
README.md
chunk-input.sh
+47
-0
47 additions, 0 deletions
chunk-input.sh
with
58 additions
and
0 deletions
README.md
+
11
−
0
View file @
c41444d1
# zamba predict job pipeline
## chunk input
Zamba does not scale out. We can, however, reduce the turnaround time by chunking the input videos and submitting one job per chunk.
```
bash
bash chunk-input.sh
\
/data/GROUP/videos
\
/data/GROUP/videos-chunked-10
\
10
```
This diff is collapsed.
Click to expand it.
chunk-input.sh
0 → 100644
+
47
−
0
View file @
c41444d1
#!/bin/bash
# -----------------------------------------------------------------------------
# command line arguments
# -----------------------------------------------------------------------------
[[
$#
-eq
3
]]
||
{
echo
"usage:
$(
basename
"
$0
"
)
input_dir output_dir chunk_size"
>
&2
exit
1
}
input_dir
=
$1
output_dir
=
$2
chunk_size
=
$3
[[
-d
$input_dir
]]
||
{
echo
"
$(
basename
"
$0
"
)
:
$input_dir
does not exist"
>
&2
exit
1
}
[[
$chunk_size
-gt
0
]]
||
{
echo
"
$(
basename
"
$0
"
)
: chunk size should be greater than 0"
>
&2
exit
1
}
# -----------------------------------------------------------------------------
# create chunked dirs
# -----------------------------------------------------------------------------
current_chunk
=
1
current_element
=
1
find
"
$input_dir
"
-type
f |
while
read
-r
file
;
do
if
[[
$current_element
-eq
1
]]
;
then
chunk_dir
=
"
$output_dir
/chunk-
$current_chunk
"
mkdir
-p
"
$chunk_dir
"
fi
ln
-t
"
$chunk_dir
"
"
$file
"
if
[[
$current_element
-lt
$chunk_size
]]
;
then
current_element
=
$((
current_element
+
1
))
else
current_element
=
1
current_chunk
=
$((
current_chunk
+
1
))
fi
done
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