import tensorflow as tf

from src.autoencoders.optimizer import OptimizerAE, OptimizerVAE
from src.autoencoders.preprocessing import *
import networkx as nx
import numpy as np
from collections import namedtuple
import os
import scipy.sparse as sp
import tensorflow as tf
import time

os.environ['TF_CPP_MIN_LOG_LEVEL'] = '3'
tf.compat.v1.logging.set_verbosity(tf.compat.v1.logging.ERROR)

flags = namedtuple('FLAGS', ['dataset', 'task', 'model', 'dropout', 'epochs', 'features', 'learning_rate', 
    'hidden', 'dimension', 'nb_run', 'prop_val', 'prop_test', 'validation', 'verbose', 'kcore', 'k', 'nb_iterations'])

FLAGS = flags('custom', 'link_prediction', 'gcn_ae', 0., 200, False, 0.01, 32, 16, 1, 5., 10., False, True, False, 2, 10)


def fit_model(g, model_name):
    # Lists to collect average results
    mean_roc = []
