Commit 0fd5ca8d authored by Amir MOHAMMADI's avatar Amir MOHAMMADI
Browse files

Good stuff

parent 15724fb2
......@@ -250,10 +250,7 @@ class Experiment(object):
self._label = label
self.toolchain = toolchain
self._validate(
dataformat_cache,
database_cache,
algorithm_cache,
library_cache,
dataformat_cache, database_cache, algorithm_cache, library_cache,
)
return self
......@@ -295,18 +292,11 @@ class Experiment(object):
return # don't proceed with the rest of validation
self._validate(
dataformat_cache,
database_cache,
algorithm_cache,
library_cache,
dataformat_cache, database_cache, algorithm_cache, library_cache,
)
def _validate(
self,
dataformat_cache,
database_cache,
algorithm_cache,
library_cache,
self, dataformat_cache, database_cache, algorithm_cache, library_cache,
):
# checks all internal aspects of the experiment
......
......@@ -92,7 +92,9 @@ def setup_package():
for path in prefixes:
sp.check_call(["rsync", "-arz", path, prefix_folder])
sp.check_call(["rsync", "-arz", path, "/home/amir/idiap/git/beat/beat.test.prefix"])
sp.check_call(
["rsync", "-arz", path, "/home/amir/idiap/git/beat/beat.test.prefix"]
)
if DOCKER_NETWORK_TEST_ENABLED:
import docker
......
import unittest
import numpy as np
import logging
import os
import tempfile
import unittest
from collections import namedtuple
import logging
import numpy as np
import simplejson
from beat.backend.python.algorithm import Algorithm_, Analyzer_
from beat.backend.python.algorithm import Algorithm_
from beat.backend.python.algorithm import Analyzer_
from beat.backend.python.database import Database_
from beat.backend.python.database import View
from beat.backend.python.database import ViewRunner
from beat.backend.python.dataformat import DataFormat_
from beat.backend.python.database import Database_, ViewRunner, View
from beat.core.toolchain import Toolchain
from beat.core.data import CachedDataSource
from beat.core.execution import LocalExecutor
from beat.core.experiment import Experiment
from beat.core.hash import hashDataset
from beat.core.hash import toPath
from beat.core.execution import LocalExecutor
from beat.core.data import CachedDataSource
from beat.core.toolchain import Toolchain
from beat.core.utils import NumpyJSONEncoder
logger = logging.getLogger(__name__)
......@@ -28,7 +32,9 @@ def index_experiment_databases(cache_path, experiment):
)
database_index_path = os.path.join(cache_path, filename)
if not os.path.exists(database_index_path):
print(f"Index for database {infos['database'].name} not found, building it",)
print(
f"Index for database {infos['database'].name} not found, building it",
)
view = infos["database"].view(infos["protocol"], infos["set"])
view.index(database_index_path)
......@@ -62,6 +68,10 @@ def print_results(executor, analyzer):
print(f" Results:\n{r}")
config
config.set("user", "amir")
config.set("prefix", "/somewhere")
class IrisLDATest(unittest.TestCase):
def setup_data_formats(self):
self.features_type = DataFormat_(
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment