Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Alexis Brenon
arcades
Commits
07f9b52d
Commit
07f9b52d
authored
Jul 07, 2017
by
Alexis Brenon
Browse files
🚑
Fix arcades and logger access
parent
ce2b15cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
arcades/environment/states/datasource/labelled/AnnotatedLabelledDataProvider.lua
View file @
07f9b52d
...
...
@@ -4,27 +4,32 @@ local paths = require('paths')
local
tablex
=
require
(
'pl.tablex'
)
local
module
=
{}
local
environment
=
require
(
'environment'
)
local
environment
=
require
(
'
arcades.
environment'
)
assert
(
environment
.
states
.
datasource
.
DataSource
)
local
class
,
super
=
torch
.
class
(
'AnnotatedLabelledDataProvider'
,
'DataSource'
,
module
)
function
class
:
__init
(
args
)
super
.
__init
(
self
,
args
)
function
class
:
__init
(
args
,
dump
)
super
.
__init
(
self
,
args
,
dump
)
args
=
args
or
{};
dump
=
dump
or
{}
self
.
environment_model
=
args
.
environment_model
self
.
data_path
=
args
.
data_path
self
.
logger
:
debug
(
"Loading data from '%s'"
,
self
.
data_path
)
self
.
data
=
self
:
_parse_data
(
self
.
data_path
)
if
dump
.
data
then
self
.
data
=
dump
.
data
else
self
.
_logger
:
debug
(
"Loading data from '%s'"
,
self
.
data_path
)
self
.
data
=
self
:
_parse_data
(
self
.
data_path
)
end
--- ID (subject index, event index) of the last returned state
-- @within Attributes
-- @tfield number self.last_state[1] Subject ID
-- @tfield number self.last_state[2] Event ID
-- @table self.last_state
self
.
last_state
=
{
1
,
0
}
self
.
last_state
=
dump
.
last_state
or
{
1
,
0
}
self
.
max_tries
=
args
.
max_tries
or
1
self
.
remaining_tries
=
args
.
remaining_tries
or
self
.
max_tries
self
.
remaining_tries
=
dump
.
remaining_tries
or
self
.
max_tries
end
...
...
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