Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
las3_pub
/
simso
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
cec32de9
authored
May 21, 2015
by
Maxime Chéramy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove cls argument in SchedulerInfo.
parent
5e3ed0dc
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
simso/core/Scheduler.py
+7
-7
No files found.
simso/core/Scheduler.py
View file @
cec32de9
...
...
@@ -15,7 +15,7 @@ class SchedulerInfo(object):
SchedulerInfo groups the data that characterize a Scheduler (such as the
scheduling overhead) and do the dynamic loading of the scheduler.
"""
def
__init__
(
self
,
name
=
''
,
cls
=
None
,
overhead
=
0
,
overhead_activate
=
0
,
def
__init__
(
self
,
name
=
''
,
overhead
=
0
,
overhead_activate
=
0
,
overhead_terminate
=
0
,
fields
=
None
):
"""
Args:
...
...
@@ -27,7 +27,6 @@ class SchedulerInfo(object):
"""
self
.
_name
=
name
self
.
_filename
=
None
self
.
_cls
=
cls
self
.
overhead
=
overhead
self
.
overhead_activate
=
overhead_activate
self
.
overhead_terminate
=
overhead_terminate
...
...
@@ -86,14 +85,14 @@ class SchedulerInfo(object):
fp
,
pathname
,
description
=
imp
.
find_module
(
name
,
[
path
])
if
path
not
in
sys
.
path
:
sys
.
path
.
append
(
path
)
self
.
_cl
s
=
getattr
(
imp
.
load_module
(
name
,
fp
,
pathname
,
cla
s
=
getattr
(
imp
.
load_module
(
name
,
fp
,
pathname
,
description
),
name
)
fp
.
close
()
return
clas
except
ImportError
as
e
:
print
(
"ImportError: "
,
e
)
print
(
"name: "
,
name
,
"path: "
,
path
)
return
self
.
_cls
return
None
def
instantiate
(
self
,
model
):
"""
...
...
@@ -103,8 +102,9 @@ class SchedulerInfo(object):
- `model`: The :class:`Model <simso.core.Model.Model>` object
\
that is passed to the constructor.
"""
cls
=
self
.
get_cls
()
return
cls
(
model
,
self
)
clas
=
self
.
get_cls
()
if
clas
:
return
clas
(
model
,
self
)
class
Scheduler
(
object
):
...
...
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