Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
stylegan2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
dsenkin
stylegan2
Commits
3b872988
Commit
3b872988
authored
Jan 6, 2020
by
Shawn Presser
Browse files
Options
Downloads
Patches
Plain Diff
Add support for macOS
parent
eecd09cc
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
dnnlib/submission/submit.py
+4
-9
4 additions, 9 deletions
dnnlib/submission/submit.py
with
4 additions
and
9 deletions
dnnlib/submission/submit.py
+
4
−
9
View file @
3b872988
...
...
@@ -119,10 +119,8 @@ def get_path_from_template(path_template: str, path_type: PathType = PathType.AU
if
path_type
==
PathType
.
AUTO
:
if
platform
.
system
()
==
"
Windows
"
:
path_type
=
PathType
.
WINDOWS
elif
platform
.
system
()
==
"
Linux
"
:
path_type
=
PathType
.
LINUX
else
:
raise
RuntimeError
(
"
Unknown platform
"
)
path_type
=
PathType
.
LINUX
path_template
=
path_template
.
replace
(
"
<USERNAME>
"
,
get_user_name
())
...
...
@@ -160,15 +158,12 @@ def get_user_name():
return
_user_name_override
elif
platform
.
system
()
==
"
Windows
"
:
return
os
.
getlogin
()
el
if
platform
.
system
()
==
"
Linux
"
:
el
se
:
try
:
import
pwd
return
pwd
.
getpwuid
(
os
.
geteuid
()).
pw_name
import
pwd
# pylint: disable=import-error
return
pwd
.
getpwuid
(
os
.
geteuid
()).
pw_name
# pylint: disable=no-member
except
:
return
"
unknown
"
else
:
raise
RuntimeError
(
"
Unknown platform
"
)
def
make_run_dir_path
(
*
paths
):
"""
Make a path/filename that resides under the current submit run_dir.
...
...
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