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
Megatron-LM
Commits
b8e0129f
Commit
b8e0129f
authored
Dec 26, 2019
by
Mohammad Shoeybi
Browse files
reverted init in data_utils
parent
43dd21f7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
26 deletions
+2
-26
megatron/data_utils/__init__.py
megatron/data_utils/__init__.py
+2
-26
No files found.
megatron/data_utils/__init__.py
View file @
b8e0129f
...
@@ -39,30 +39,6 @@ def should_split(split):
...
@@ -39,30 +39,6 @@ def should_split(split):
"""
"""
return
max
(
split
)
/
sum
(
split
)
!=
1.
return
max
(
split
)
/
sum
(
split
)
!=
1.
def
get_split
(
args
):
"""
Get dataset splits from comma separated string list
"""
splits
=
[]
if
args
.
split
.
find
(
','
)
!=
-
1
:
splits
=
[
float
(
s
)
for
s
in
args
.
split
.
split
(
','
)]
elif
args
.
split
.
find
(
'/'
)
!=
-
1
:
splits
=
[
float
(
s
)
for
s
in
args
.
split
.
split
(
'/'
)]
else
:
splits
=
[
float
(
args
.
split
)]
split_total
=
sum
(
splits
)
if
split_total
<
1.
:
splits
.
append
(
1
-
split_total
)
while
len
(
splits
)
<
3
:
splits
.
append
(
0.
)
splits
=
splits
[:
3
]
if
args
.
valid_data
is
not
None
:
splits
[
1
]
=
0.
if
args
.
test_data
is
not
None
:
splits
[
2
]
=
0.
final_sum
=
sum
(
splits
)
return
[
s
/
final_sum
for
s
in
splits
]
def
get_ext
(
path
):
def
get_ext
(
path
):
"""gets path extension"""
"""gets path extension"""
return
os
.
path
.
splitext
(
path
)[
1
]
return
os
.
path
.
splitext
(
path
)[
1
]
...
...
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