text_plain_output_1.png
from absl import flags

from gezi import tqdm

import gezi

import glob

import os

from IPython.display import display
import tensorflow as tf
import torch
from absl import flags
FLAGS = flags.FLAGS
from transformers import AutoTokenizer
from datasets import Dataset
from src import config
from src.util import *
from src.get_preds import *
from src.eval import *
import melt as mt
import numpy as np
import glob
import gc
from numba import cuda
from gezi import tqdm
import gezi
import husky
import lele

gezi.init_flags()
model_root = '../input'
model_dirs = [x for x in glob.glob(f'{model_root}/feedback-model*') if os.path.isdir(x)]
model_dirs = [f'../input/feedback-model{i}' for i in range(len(model_dirs))]
model_dir = model_dirs[0]

tf_models = []
first_models = []
ic(first_models)
model_dirs = gezi.unique_list([*tf_models, *first_models, *model_dirs])
m = model_dirs
used_model_indexes = list(range(len(model_dirs)))
used_model_indexes = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 17]
used_model_indexes = [23]
model_dirs = [m[i] for i in used_model_indexes]
used_tf_models = [x for x in model_dirs if x in tf_models]
num_tf_models = len(used_tf_models)

mns = []
for i, model_dir in tqdm(enumerate(model_dirs), total=len(model_dirs)):
    gezi.restore_configs(model_dir)
    mns.append(os.path.basename(FLAGS.model_dir))
    assert 'online' in FLAGS.model_dir
mns