Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SENSE-PPI
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Konstantin Volzhenin
SENSE-PPI
Commits
52747bde
Commit
52747bde
authored
Jul 26, 2023
by
Konstantin Volzhenin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
0.1.6
bugfix in params.device
parent
15fc56cf
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
__init__.py
senseppi/__init__.py
+1
-1
__main__.py
senseppi/__main__.py
+7
-3
utils.py
senseppi/utils.py
+1
-1
No files found.
senseppi/__init__.py
View file @
52747bde
__version__
=
"0.1.
5
"
__version__
=
"0.1.
6
"
__author__
=
"Konstantin Volzhenin"
__author__
=
"Konstantin Volzhenin"
from
.
import
model
,
commands
,
esm2_model
,
dataset
,
utils
,
network_utils
from
.
import
model
,
commands
,
esm2_model
,
dataset
,
utils
,
network_utils
...
...
senseppi/__main__.py
View file @
52747bde
import
argparse
import
argparse
import
logging
import
logging
import
torch
from
.commands
import
*
from
.commands
import
*
from
senseppi
import
__version__
from
senseppi
import
__version__
...
@@ -32,12 +32,16 @@ def main():
...
@@ -32,12 +32,16 @@ def main():
params
=
parser
.
parse_args
()
params
=
parser
.
parse_args
()
#WARNING: due to some internal issues of torch, the mps backend is temporarily disabled
if
hasattr
(
params
,
'device'
):
if
hasattr
(
params
,
'device'
)
and
params
.
device
==
'mps'
:
# WARNING: due to some internal issues of pytorch, the mps backend is temporarily disabled
if
params
.
device
==
'mps'
:
logging
.
warning
(
'WARNING: due to some internal issues of torch, the mps backend is temporarily disabled.'
logging
.
warning
(
'WARNING: due to some internal issues of torch, the mps backend is temporarily disabled.'
'The cpu backend will be used instead.'
)
'The cpu backend will be used instead.'
)
params
.
device
=
'cpu'
params
.
device
=
'cpu'
if
params
.
device
==
'gpu'
:
torch
.
set_float32_matmul_precision
(
'high'
)
params
.
func
(
params
)
params
.
func
(
params
)
...
...
senseppi/utils.py
View file @
52747bde
...
@@ -21,7 +21,7 @@ def add_general_args(parser):
...
@@ -21,7 +21,7 @@ def add_general_args(parser):
def
determine_device
():
def
determine_device
():
if
torch
.
cuda
.
is_available
():
if
torch
.
cuda
.
is_available
():
device
=
'
cuda
'
device
=
'
gpu
'
elif
torch
.
backends
.
mps
.
is_available
()
and
torch
.
backends
.
mps
.
is_built
():
elif
torch
.
backends
.
mps
.
is_available
()
and
torch
.
backends
.
mps
.
is_built
():
device
=
'mps'
device
=
'mps'
else
:
else
:
...
...
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