Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
poldeepner2
Manage
Activity
Members
Labels
Plan
Issues
29
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Information extraction
poldeepner2
Commits
b8d24205
Commit
b8d24205
authored
2 years ago
by
Michał Marcińczuk
Browse files
Options
Downloads
Patches
Plain Diff
Pass list of paths.
parent
e4006d1a
Branches
Branches containing commit
1 merge request
!41
Dev v07
Pipeline
#6149
failed with stage
in 3 minutes and 53 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
train-batch.py
+8
-5
8 additions, 5 deletions
train-batch.py
with
8 additions
and
5 deletions
train-batch.py
+
8
−
5
View file @
b8d24205
...
...
@@ -22,7 +22,12 @@ def load_configurations(path: str) -> Dict[str, Union[str, List[str]]]:
def
generate_cmds_list
(
params
:
Dict
[
str
,
Union
[
str
,
List
[
str
]]])
->
List
[
List
[
str
]]:
lists
=
[[]]
for
key
,
values
in
params
.
items
():
if
isinstance
(
values
,
list
):
if
key
.
endswith
(
"
/list
"
):
key
=
key
[:
-
5
]
for
ll
in
lists
:
for
value
in
values
:
ll
.
extend
([
f
"
--
{
key
}
"
,
value
])
elif
isinstance
(
values
,
list
):
new_lists
=
[]
for
value
in
values
:
for
ll
in
lists
:
...
...
@@ -33,6 +38,7 @@ def generate_cmds_list(params: Dict[str, Union[str, List[str]]]) -> List[List[st
ll
.
append
(
f
"
--
{
key
}
"
)
if
values
is
not
None
:
ll
.
append
(
str
(
values
))
print
(
lists
)
return
lists
...
...
@@ -57,7 +63,4 @@ if __name__ == '__main__':
for
cmd
in
cmds
:
args
=
parser
.
parse_args
(
cmd
)
print
(
args
)
try
:
train_model
(
args
)
except
KeyError
as
error
:
print
(
error
)
train_model
(
args
)
This diff is collapsed.
Click to expand it.
Preview
0%
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