Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ActEV
diva_evaluation_cli
Commits
e2912853
Commit
e2912853
authored
Apr 24, 2021
by
Baptiste CHOCOT
Browse files
Review docs
parent
40e38e85
Changes
19
Hide whitespace changes
Inline
Side-by-side
diva_evaluation_cli/bin/private_src/entry_points/actev_clear_logs.py
View file @
e2912853
...
...
@@ -2,6 +2,7 @@
This file should not be modified.
"""
import
os
...
...
diva_evaluation_cli/bin/private_src/entry_points/actev_exec.py
View file @
e2912853
...
...
@@ -17,11 +17,11 @@ def entry_point(file_index, activity_index, chunks, nb_videos_per_chunk,
file_index (str): Path to file index json file for test set
activity_index (str): Path to activity index json file for test set
chunks (str): Path to chunks json file
nb
-
video
-
per
-
chunk (int): Number of videos in the chunk
video
-
location (str): Path to videos content
system
-
cache
-
dir (str): Path to system cache directory
output
-
file (str): Path to merge chunks command result
chunk_result (str): Path to chunks json file after merge chunks
nb
_
video
s_
per
_
chunk (int): Number of videos in the chunk
video
_
location (str): Path to videos content
system
_
cache
_
dir (str): Path to system cache directory
output
_
file (str): Path to merge chunks command result
chunk
s
_result (str): Path to chunks json file after merge chunks
execution
config_file (str, optional): Path to config file
...
...
diva_evaluation_cli/bin/private_src/entry_points/actev_experiment_init.py
View file @
e2912853
...
...
@@ -2,6 +2,7 @@
This file should not be modified.
"""
import
os
from
diva_evaluation_cli
.
bin
.
private_src
.
implementation
.
experiment_init
.
\
...
...
diva_evaluation_cli/bin/private_src/entry_points/actev_get_system.py
View file @
e2912853
...
...
@@ -20,6 +20,7 @@ def entry_point(url, system_type, location=None, user=None, password=None,
Args:
url (str): Url to get the system
system_type (str): `git` or `archive`
location (str, optional): Path to store the system
user (str, optional): Username to access the url
password (str, optional): Password to access the url
...
...
@@ -28,6 +29,7 @@ def entry_point(url, system_type, location=None, user=None, password=None,
installed
sha (str, optional): commit SHA or tag to checkout after cloning
name (str, optional): Directory in which the system will be saved
"""
try
:
command
=
system_types
[
system_type
]()
...
...
diva_evaluation_cli/bin/private_src/entry_points/actev_status.py
View file @
e2912853
...
...
@@ -2,6 +2,7 @@
This file should not be modified.
"""
import
os
from
diva_evaluation_cli.bin.private_src.implementation.status.check_status
\
...
...
diva_evaluation_cli/bin/private_src/entry_points/actev_validate_execution.py
View file @
e2912853
...
...
@@ -28,12 +28,13 @@ def entry_point(output, reference, activity_index, file_index, result, score,
Args:
output (str): Path to experiment output json file
reference (str): Path to reference json file
file_index (str): Path to file index json file for test set
activity_index (str): Path to activity index json file for test set
file_index (str): Path to file index json file for test set
result (str): Path to result of the ActEV scorer
score (bool): Whether scoring the system output against a reference
localization (str, optional): Path to the localization output file if
it exists
"""
# go into the right directory to execute the script
current_path
=
os
.
path
.
dirname
(
__file__
)
...
...
diva_evaluation_cli/bin/private_src/entry_points/actev_validate_system.py
View file @
e2912853
...
...
@@ -2,7 +2,7 @@
This file should not be modified.
"""
import
os
from
diva_evaluation_cli
.
bin
.
private_src
.
implementation
.
validate_system
.
\
validate_system
import
validate_system
...
...
@@ -18,5 +18,6 @@ def entry_point(strict):
Checks the structure of the directory after ActEV-system-setup is run.
Checks for expected API contents, etc.
"""
validate_system
(
strict
)
diva_evaluation_cli/bin/private_src/implementation/exec/exec.py
View file @
e2912853
...
...
@@ -26,24 +26,25 @@ from diva_evaluation_cli.src.entry_points.actev_experiment_cleanup import \
entry_point
as
experiment_cleanup
def
exec
(
file_index
,
activity_index
,
chunks
,
n
umber_of_videos
,
video_location
,
def
exec
(
file_index
,
activity_index
,
chunks
,
n
b_videos_per_chunk
,
video_location
,
system_cache_dir
,
config
,
output
,
chunk_result
):
"""
Args:
file_index (str): Path to file index json file for test set
activity_index (str): Path to activity index json file for test set
chunks (str): Path to chunks json file
nb-video-per-chunk (int): Number of videos in the chunk
video-location (str): Path to videos content
system-cache-dir (str): Path to system cache directory
output-file (str): Path to merge chunks command result
nb_videos_per_chunk (int): Number of videos in the chunk
video_location (str): Path to videos content
system_cache_dir (str): Path to system cache directory
config (str): Path to config file
output (str): Path to merge chunks command result
chunk_result (str): Path to chunks json file after merge chunks
execution
config_file (str, optional): Path to config file
"""
chunks_list
=
[]
design_chunks
(
file_index
,
activity_index
,
chunks
,
n
umber_of_videos
)
design_chunks
(
file_index
,
activity_index
,
chunks
,
n
b_videos_per_chunk
)
try
:
experiment_init
(
file_index
,
activity_index
,
chunks
,
video_location
,
...
...
diva_evaluation_cli/bin/private_src/implementation/experiment_init/experiment_validation.py
View file @
e2912853
"""Experiment init module
"""
import
os
import
json
...
...
diva_evaluation_cli/src/entry_points/actev_design_chunks.py
View file @
e2912853
...
...
@@ -3,9 +3,6 @@
Implements the entry-point by using Python or any other languages.
"""
import
argparse
import
json
def
entry_point
(
file_index
,
activity_index
,
output
,
nb_videos_per_chunk
):
"""Method to complete: you have to raise an exception if an error occured
...
...
@@ -18,7 +15,7 @@ def entry_point(file_index, activity_index, output, nb_videos_per_chunk):
file_index (str): Path to file index json file for test set
activity_index (str): Path to activity index json file for test set
output (str): Path to save chunks file
nb_video_per_chunk (int): Number of videos in the chunk
nb_video
s
_per_chunk (int): Number of videos in the chunk
"""
raise
NotImplementedError
(
"You should implement the entry_point method."
)
diva_evaluation_cli/src/entry_points/actev_experiment_cleanup.py
View file @
e2912853
...
...
@@ -3,8 +3,6 @@
Implements the entry-point by using Python or any other languages.
"""
import
os
def
entry_point
(
system_cache_dir
):
"""Method to complete: you have to raise an exception if an error occured
...
...
diva_evaluation_cli/src/entry_points/actev_experiment_init.py
View file @
e2912853
...
...
@@ -3,8 +3,6 @@
Implements the entry-point by using Python or any other languages.
"""
import
os
def
entry_point
(
file_index
,
activity_index
,
chunks
,
video_location
,
system_cache_dir
,
config_file
=
None
,
...
...
@@ -28,5 +26,6 @@ def entry_point(file_index, activity_index, chunks,
prepare_localization_outputs (str, optional): If True, the system will
retain spatial localization output information during execution and
output the proposals during merge_chunks
"""
raise
NotImplementedError
(
"You should implement the entry_point method."
)
diva_evaluation_cli/src/entry_points/actev_merge_chunks.py
View file @
e2912853
...
...
@@ -3,9 +3,6 @@
Implements the entry-point by using Python or any other languages.
"""
import
argparse
import
json
def
entry_point
(
system_cache_dir
,
output_file
,
chunks_file
,
chunk_ids
,
proposals
=
None
,
localization
=
None
):
...
...
@@ -16,14 +13,14 @@ def entry_point(system_cache_dir, output_file, chunks_file, chunk_ids,
the list.
Args:
result_location (str): Path to get the result of the chunks processing
chunk_file (str): Path to generate a chunk file, that summarizes all
the processed videos/activities
system_cache_dir (str): Path to system cache directory
output_file (str): Path to the output file generated
chunks_file (str): Path to generate a chunk file, that summarizes all
the processed videos/activities
chunk_ids (:obj:`list`): List of chunk ids
system_cache_dir (str
):
P
ath to
system cache directory
proposals (str): path to generate a proposals file, that contains the
system proposals
localization (str): path to generate a localization file
proposals (str, optional
):
p
ath to
generate a proposals file, that
contains the system proposals
localization (str, optional): path to generate a localization file
"""
raise
NotImplementedError
(
"You should implement the entry_point method."
)
diva_evaluation_cli/src/entry_points/actev_post_process_chunk.py
View file @
e2912853
...
...
@@ -3,8 +3,6 @@
Implements the entry-point by using Python or any other languages.
"""
import
os
def
entry_point
(
chunk_id
,
system_cache_dir
):
"""Method to complete: you have to raise an exception if an error occured
...
...
diva_evaluation_cli/src/entry_points/actev_pre_process_chunk.py
View file @
e2912853
...
...
@@ -3,8 +3,6 @@
Implements the entry-point by using Python or any other languages.
"""
import
os
def
entry_point
(
chunk_id
,
system_cache_dir
):
"""Method to complete: you have to raise an exception if an error occured
...
...
diva_evaluation_cli/src/entry_points/actev_process_chunk.py
View file @
e2912853
...
...
@@ -3,9 +3,6 @@
Implements the entry-point by using Python or any other languages.
"""
import
os
import
re
def
entry_point
(
chunk_id
,
system_cache_dir
):
"""Method to complete: you have to raise an exception if an error occured
...
...
diva_evaluation_cli/src/entry_points/actev_reset_chunk.py
View file @
e2912853
...
...
@@ -3,8 +3,6 @@
Implements the entry-point by using Python or any other languages.
"""
import
os
def
entry_point
(
chunk_id
,
system_cache_dir
):
"""Method to complete: you have to raise an exception if an error occured
...
...
@@ -15,5 +13,6 @@ def entry_point(chunk_id, system_cache_dir):
Args:
chunk_id (int): Chunk id
system_cache_dir (str): Path to system cache directory
"""
raise
NotImplementedError
(
"You should implement the entry_point method."
)
diva_evaluation_cli/src/entry_points/actev_system_setup.py
View file @
e2912853
...
...
@@ -3,8 +3,6 @@
Implements the entry-point by using Python or any other languages.
"""
import
os
from
diva_evaluation_cli
.
bin
.
private_src
.
implementation
.
utils
.
\
actev_cli_environment
import
export_variable
,
activate_environment
...
...
@@ -18,6 +16,7 @@ def entry_point(dev=False):
Args:
dev (bool, optional): Turn on development mode (no monitoring/logging)
if set
"""
# Do not remove these two lines.
export_variable
(
'ACTEV_SYSTEM_SETUP_DEV'
,
1
if
dev
else
0
)
...
...
diva_evaluation_cli/src/entry_points/actev_train_system.py
View file @
e2912853
...
...
@@ -16,5 +16,7 @@ def entry_point(activity_index, training_data_dir, verbose=False):
Args:
activity_index (str): Path to activity index json file
training_data_dir (str): Path to training data directory
verbose (bool, optional): Ask the system for extra logs
"""
raise
NotImplementedError
(
"You should implement the entry_point method."
)
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