Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bob.learn.boosting
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
bob
bob.learn.boosting
Commits
d217a76e
Commit
d217a76e
authored
10 years ago
by
Manuel Günther
Browse files
Options
Downloads
Patches
Plain Diff
Based get_config on bob.extension
parent
a3ffeed9
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
bob/learn/boosting/__init__.py
+6
-16
6 additions, 16 deletions
bob/learn/boosting/__init__.py
bob/learn/boosting/version.cpp
+3
-7
3 additions, 7 deletions
bob/learn/boosting/version.cpp
with
9 additions
and
23 deletions
bob/learn/boosting/__init__.py
+
6
−
16
View file @
d217a76e
...
...
@@ -5,6 +5,11 @@ import bob.io.base
import
bob.extension
bob
.
extension
.
load_bob_library
(
'
bob.learn.boosting
'
,
__file__
)
# versioning
from
.
import
version
from
.version
import
module
as
__version__
from
.version
import
api
as
__api_version__
# include loss functions
from
.
import
LossFunction
# Just to get the documentation for it
from
.ExponentialLoss
import
ExponentialLoss
...
...
@@ -26,23 +31,8 @@ from ._library import weighted_histogram
def
get_config
():
"""
Returns a string containing the configuration information.
"""
return
bob
.
extension
.
get_config
(
__name__
,
version
.
externals
,
version
.
api
)
import
pkg_resources
from
.version
import
externals
packages
=
pkg_resources
.
require
(
__name__
)
this
=
packages
[
0
]
deps
=
packages
[
1
:]
retval
=
"
%s: %s [api=0x%04x] (%s)
\n
"
%
(
this
.
key
,
this
.
version
,
version
.
api
,
this
.
location
)
retval
+=
"
- c/c++ dependencies:
\n
"
for
k
in
sorted
(
externals
):
retval
+=
"
- %s: %s
\n
"
%
(
k
,
externals
[
k
])
retval
+=
"
- python dependencies:
\n
"
for
d
in
deps
:
retval
+=
"
- %s: %s (%s)
\n
"
%
(
d
.
key
,
d
.
version
,
d
.
location
)
return
retval
.
strip
()
# gets sphinx autodoc done right - don't remove it
__all__
=
[
_
for
_
in
dir
()
if
not
_
.
startswith
(
'
_
'
)]
This diff is collapsed.
Click to expand it.
bob/learn/boosting/version.cpp
+
3
−
7
View file @
d217a76e
...
...
@@ -160,10 +160,8 @@ static PyObject* create_module (void) {
auto
m_
=
make_safe
(
m
);
///< protects against early returns
/* register version numbers and constants */
if
(
PyModule_AddIntConstant
(
m
,
"api"
,
BOB_LEARN_BOOSTING_API_VERSION
)
<
0
)
return
0
;
if
(
PyModule_AddStringConstant
(
m
,
"module"
,
BOB_EXT_MODULE_VERSION
)
<
0
)
return
0
;
if
(
PyModule_AddIntConstant
(
m
,
"api"
,
BOB_LEARN_BOOSTING_API_VERSION
)
<
0
)
return
0
;
if
(
PyModule_AddStringConstant
(
m
,
"module"
,
BOB_EXT_MODULE_VERSION
)
<
0
)
return
0
;
PyObject
*
externals
=
build_version_dictionary
();
if
(
!
externals
)
return
0
;
...
...
@@ -176,9 +174,7 @@ static PyObject* create_module (void) {
return
0
;
}
Py_INCREF
(
m
);
return
m
;
return
Py_BuildValue
(
"O"
,
m
);
}
PyMODINIT_FUNC
BOB_EXT_ENTRY_NAME
(
void
)
{
...
...
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