def build_model_autotrain(model_name):
    if (model_name == 'gcn'):
        from grb.model.torch import GCN

        def params_search(trial):
            model_params = {'hidden_features': trial.suggest_categorical('hidden_features', [32, 64, 128, 256]), 'n_layers': trial.suggest_categorical('n_layers', [2, 3, 4, 5]), 'dropout': trial.suggest_categorical('dropout', [0.5, 0.6, 0.7, 0.8])}
            other_params = {'lr': trial.suggest_categorical('lr', [0.01, 0.001, 0.005, 0.0001]), 'n_epoch': 5000, 'early_stop': True, 'early_stop_patience': 500}
            return (model_params, other_params)
        return (GCN, params_search)
    if (model_name == 'graphsage'):
        from grb.model.torch import GraphSAGE

        def params_search(trial):
            model_params = {'hidden_features': trial.suggest_categorical('hidden_features', [32, 64, 128, 256]), 'n_layers': trial.suggest_categorical('n_layers', [2, 3, 4, 5]), 'dropout': trial.suggest_categorical('dropout', [0.5, 0.6, 0.7, 0.8])}
            other_params = {'lr': trial.suggest_categorical('lr', [0.01, 0.001, 0.005, 0.0001]), 'n_epoch': 5000, 'early_stop': True, 'early_stop_patience': 500}
            return (model_params, other_params)
        return (GraphSAGE, params_search)
    if (model_name == 'sgcn'):
        from grb.model.torch import SGCN

        def params_search(trial):
            model_params = {'hidden_features': trial.suggest_categorical('hidden_features', [32, 64, 128, 256]), 'n_layers': trial.suggest_categorical('n_layers', [2, 3, 4, 5]), 'dropout': trial.suggest_categorical('dropout', [0.5, 0.6, 0.7, 0.8])}
            other_params = {'lr': trial.suggest_categorical('lr', [0.01, 0.001, 0.005, 0.0001]), 'n_epoch': 5000, 'early_stop': True, 'early_stop_patience': 500}
            return (model_params, other_params)
        return (SGCN, params_search)
    if (model_name == 'tagcn'):
        from grb.model.torch import TAGCN

        def params_search(trial):
            model_params = {'hidden_features': trial.suggest_categorical('hidden_features', [32, 64, 128, 256]), 'n_layers': trial.suggest_categorical('n_layers', [2, 3, 4, 5]), 'k': trial.suggest_categorical('k', [2, 3, 4, 5]), 'dropout': trial.suggest_categorical('dropout', [0.5, 0.6, 0.7, 0.8])}
            other_params = {'lr': trial.suggest_categorical('lr', [0.01, 0.001, 0.005, 0.0001]), 'n_epoch': 5000, 'early_stop': True, 'early_stop_patience': 500}
            return (model_params, other_params)
        return (TAGCN, params_search)
    if (model_name == 'appnp'):
        from grb.model.torch import APPNP

        def params_search(trial):
            model_params = {'hidden_features': trial.suggest_categorical('hidden_features', [32, 64, 128, 256]), 'n_layers': trial.suggest_categorical('n_layers', [2, 3, 4, 5]), 'k': trial.suggest_categorical('k', [2, 3, 4, 5]), 'dropout': trial.suggest_categorical('dropout', [0.5, 0.6, 0.7, 0.8])}
            other_params = {'lr': trial.suggest_categorical('lr', [0.01, 0.001, 0.005, 0.0001]), 'n_epoch': 5000, 'early_stop': True, 'early_stop_patience': 500}
            return (model_params, other_params)
        return (APPNP, params_search)
    if (model_name == 'gin'):
        from grb.model.torch import GIN

        def params_search(trial):
            model_params = {'hidden_features': trial.suggest_categorical('hidden_features', [32, 64, 128, 256]), 'n_layers': trial.suggest_categorical('n_layers', [2, 3, 4, 5]), 'dropout': trial.suggest_categorical('dropout', [0.5, 0.6, 0.7, 0.8])}
            other_params = {'lr': trial.suggest_categorical('lr', [0.01, 0.001, 0.005, 0.0001]), 'n_epoch': 5000, 'early_stop': True, 'early_stop_patience': 500}
            return (model_params, other_params)
        return (GIN, params_search)
    if (model_name == 'gat'):
        from grb.model.dgl import GAT

        def params_search(trial):
            model_params = {'hidden_features': trial.suggest_categorical('hidden_features', [32, 64, 128, 256]), 'n_layers': trial.suggest_categorical('n_layers', [2, 3, 4, 5]), 'n_heads': trial.suggest_categorical('n_heads', [2, 4, 6, 8]), 'dropout': trial.suggest_categorical('dropout', [0.5, 0.6, 0.7, 0.8])}
            other_params = {'lr': trial.suggest_categorical('lr', [0.01, 0.001, 0.005, 0.0001]), 'n_epoch': 5000, 'early_stop': True, 'early_stop_patience': 500}
            return (model_params, other_params)
        return (GAT, params_search)
def build_model_autotrain(model_name):
    if (model_name == 'gcn'):
        from grb.model.torch import GCN

        def params_search(trial):
            model_params = {'hidden_features': trial.suggest_categorical('hidden_features', [32, 64, 128, 256]), 'n_layers': trial.suggest_categorical('n_layers', [2, 3, 4, 5]), 'dropout': trial.suggest_categorical('dropout', [0.5, 0.6, 0.7, 0.8])}
            other_params = {'lr': trial.suggest_categorical('lr', [0.01, 0.001, 0.005, 0.0001]), 'n_epoch': 5000, 'early_stop': True, 'early_stop_patience': 500}
            return (model_params, other_params)
        return (GCN, params_search)
    if (model_name == 'graphsage'):
        from grb.model.torch import GraphSAGE

        def params_search(trial):
            model_params = {'hidden_features': trial.suggest_categorical('hidden_features', [32, 64, 128, 256]), 'n_layers': trial.suggest_categorical('n_layers', [2, 3, 4, 5]), 'dropout': trial.suggest_categorical('dropout', [0.5, 0.6, 0.7, 0.8])}
            other_params = {'lr': trial.suggest_categorical('lr', [0.01, 0.001, 0.005, 0.0001]), 'n_epoch': 5000, 'early_stop': True, 'early_stop_patience': 500}
            return (model_params, other_params)
        return (GraphSAGE, params_search)
    if (model_name == 'sgcn'):
        from grb.model.torch import SGCN

        def params_search(trial):
            model_params = {'hidden_features': trial.suggest_categorical('hidden_features', [32, 64, 128, 256]), 'n_layers': trial.suggest_categorical('n_layers', [2, 3, 4, 5]), 'dropout': trial.suggest_categorical('dropout', [0.5, 0.6, 0.7, 0.8])}
            other_params = {'lr': trial.suggest_categorical('lr', [0.01, 0.001, 0.005, 0.0001]), 'n_epoch': 5000, 'early_stop': True, 'early_stop_patience': 500}
            return (model_params, other_params)
        return (SGCN, params_search)
    if (model_name == 'tagcn'):
        from grb.model.torch import TAGCN

        def params_search(trial):
            model_params = {'hidden_features': trial.suggest_categorical('hidden_features', [32, 64, 128, 256]), 'n_layers': trial.suggest_categorical('n_layers', [2, 3, 4, 5]), 'k': trial.suggest_categorical('k', [2, 3, 4, 5]), 'dropout': trial.suggest_categorical('dropout', [0.5, 0.6, 0.7, 0.8])}
            other_params = {'lr': trial.suggest_categorical('lr', [0.01, 0.001, 0.005, 0.0001]), 'n_epoch': 5000, 'early_stop': True, 'early_stop_patience': 500}
            return (model_params, other_params)
        return (TAGCN, params_search)
    if (model_name == 'appnp'):
        from grb.model.torch import APPNP

        def params_search(trial):
            model_params = {'hidden_features': trial.suggest_categorical('hidden_features', [32, 64, 128, 256]), 'n_layers': trial.suggest_categorical('n_layers', [2, 3, 4, 5]), 'k': trial.suggest_categorical('k', [2, 3, 4, 5]), 'dropout': trial.suggest_categorical('dropout', [0.5, 0.6, 0.7, 0.8])}
            other_params = {'lr': trial.suggest_categorical('lr', [0.01, 0.001, 0.005, 0.0001]), 'n_epoch': 5000, 'early_stop': True, 'early_stop_patience': 500}
            return (model_params, other_params)
        return (APPNP, params_search)
    if (model_name == 'gin'):
        from grb.model.torch import GIN

        def params_search(trial):
            model_params = {'hidden_features': trial.suggest_categorical('hidden_features', [32, 64, 128, 256]), 'n_layers': trial.suggest_categorical('n_layers', [2, 3, 4, 5]), 'dropout': trial.suggest_categorical('dropout', [0.5, 0.6, 0.7, 0.8])}
            other_params = {'lr': trial.suggest_categorical('lr', [0.01, 0.001, 0.005, 0.0001]), 'n_epoch': 5000, 'early_stop': True, 'early_stop_patience': 500}
            return (model_params, other_params)
        return (GIN, params_search)
    if (model_name == 'gat'):
        from grb.model.dgl import GAT

        def params_search(trial):
            model_params = {'hidden_features': trial.suggest_categorical('hidden_features', [32, 64, 128, 256]), 'n_layers': trial.suggest_categorical('n_layers', [2, 3, 4, 5]), 'n_heads': trial.suggest_categorical('n_heads', [2, 4, 6, 8]), 'dropout': trial.suggest_categorical('dropout', [0.5, 0.6, 0.7, 0.8])}
            other_params = {'lr': trial.suggest_categorical('lr', [0.01, 0.001, 0.005, 0.0001]), 'n_epoch': 5000, 'early_stop': True, 'early_stop_patience': 500}
            return (model_params, other_params)
        return (GAT, params_search)