mirror of
https://github.com/Doctorado-ML/beflask.git
synced 2025-08-15 07:05:51 +00:00
Update requirements
This commit is contained in:
@@ -28,7 +28,7 @@ def index():
|
||||
benchmarks = [current_user.benchmark]
|
||||
for benchmark in benchmarks:
|
||||
os.chdir(benchmark.folder)
|
||||
benchmark.num_files = len(Files.get_all_results(hidden=False))
|
||||
benchmark.num_files = len(Files().get_all_results(hidden=False))
|
||||
os.chdir(current_user.benchmark.folder)
|
||||
else:
|
||||
benchmarks = []
|
||||
|
@@ -46,7 +46,7 @@ def select():
|
||||
# Get a list of files in a directory
|
||||
files = {}
|
||||
os.chdir(current_user.benchmark.folder)
|
||||
names = Files.get_all_results(hidden=False)
|
||||
names = Files().get_all_results(hidden=False)
|
||||
for name in names:
|
||||
report = StubReport(os.path.join(Folders.results, name))
|
||||
report.report()
|
||||
@@ -139,9 +139,7 @@ def report(file_name):
|
||||
|
||||
|
||||
def process_data(file_name, compare, data):
|
||||
report = StubReport(
|
||||
os.path.join(Folders.results, file_name), compare=compare
|
||||
)
|
||||
report = StubReport(os.path.join(Folders.results, file_name))
|
||||
new_list = []
|
||||
for result in data["results"]:
|
||||
symbol = report._compute_status(result["dataset"], result["score"])
|
||||
@@ -216,7 +214,7 @@ def dataset_report(dataset):
|
||||
app_config = dotenv_values(".env")
|
||||
dt = Datasets()
|
||||
data = dt.get_attributes(dataset)
|
||||
names = Files.get_all_results(hidden=False)
|
||||
names = Files().get_all_results(hidden=False)
|
||||
results = {}
|
||||
for name in names:
|
||||
try:
|
||||
|
@@ -1,27 +1,27 @@
|
||||
from beflask.models import Benchmark, db, User
|
||||
from beflask import app
|
||||
|
||||
_, app = app.create_app()
|
||||
app = app.create_app()
|
||||
|
||||
with app.app_context():
|
||||
db.drop_all()
|
||||
db.create_all()
|
||||
b = Benchmark(
|
||||
name="discretizbench",
|
||||
folder="/Users/rmontanana/Code/discretizbench",
|
||||
folder="/home/rmontanana/Code/discretizbench",
|
||||
description="Experiments with local discretization and Bayesian "
|
||||
"classifiers",
|
||||
)
|
||||
db.session.add(b)
|
||||
b = Benchmark(
|
||||
name="odtebench",
|
||||
folder="/Users/rmontanana/Code/odtebench",
|
||||
folder="/home/rmontanana/Code/odtebench",
|
||||
description="Experiments with STree and Ensemble classifiers",
|
||||
)
|
||||
db.session.add(b)
|
||||
b = Benchmark(
|
||||
name="covbench",
|
||||
folder="/Users/rmontanana/Code/covbench",
|
||||
folder="/home/rmontanana/Code/covbench",
|
||||
description="Experiments with COVID-19 dataset",
|
||||
)
|
||||
db.session.add(b)
|
||||
|
@@ -1,4 +1,5 @@
|
||||
import pytest
|
||||
from sys import platform
|
||||
from beflask import app as application
|
||||
from flask_login import FlaskLoginClient
|
||||
from beflask.models import Benchmark, User, db
|
||||
@@ -76,22 +77,28 @@ def guest_password():
|
||||
def db_seed(db, admin_user, admin_password):
|
||||
db.drop_all()
|
||||
db.create_all()
|
||||
if platform == "linux" or platform == "linux2":
|
||||
prefix = "/home"
|
||||
elif platform == "darwin":
|
||||
prefix = "/Users"
|
||||
else:
|
||||
prefix = "/home"
|
||||
b = Benchmark(
|
||||
name="discretizbench",
|
||||
folder="/Users/rmontanana/Code/discretizbench",
|
||||
folder=f"{prefix}/rmontanana/Code/discretizbench",
|
||||
description="Experiments with local discretization and Bayesian"
|
||||
"classifiers",
|
||||
)
|
||||
db.session.add(b)
|
||||
b = Benchmark(
|
||||
name="odtebench",
|
||||
folder="/Users/rmontanana/Code/odtebench",
|
||||
folder=f"{prefix}/rmontanana/Code/odtebench",
|
||||
description="Experiments with STree and Ensemble classifiers",
|
||||
)
|
||||
db.session.add(b)
|
||||
b = Benchmark(
|
||||
name="covbench",
|
||||
folder="/Users/rmontanana/Code/covbench",
|
||||
folder=f"{prefix}/rmontanana/Code/covbench",
|
||||
description="Experiments with COVID-19 dataset",
|
||||
)
|
||||
db.session.add(b)
|
||||
|
Reference in New Issue
Block a user