This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # train_grpo.py | |
| import re | |
| import torch | |
| from datasets import load_dataset, Dataset | |
| from transformers import AutoTokenizer, AutoModelForCausalLM | |
| from peft import LoraConfig | |
| from trl import GRPOConfig, GRPOTrainer | |
| # Load and prep dataset |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React, { ChangeEvent, useState, FC } from 'react'; | |
| interface OptionType { | |
| value: string; | |
| label: string; | |
| } | |
| interface DropdownProps { | |
| options: OptionType[]; | |
| value: string; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import torch | |
| import torch.nn as nn | |
| import torch.optim as optim | |
| from sklearn.model_selection import train_test_split | |
| from sklearn.metrics import accuracy_score, f1_score, classification_report | |
| class ELM(nn.Module): | |
| def __init__(self, input_dim, hidden_dim, output_dim): | |
| super(ELM, self).__init__() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Install and load the progress package | |
| if (!requireNamespace("progress")) install.packages("progress") | |
| library(progress) | |
| # Generate datasets with different ticket types and status | |
| set.seed(456) | |
| tickets1 <- data.frame(TicketType = sample(c("Type A", "Type B", "Type C", "Type D"), size = 100, replace = TRUE), | |
| Status = sample(c("Open", "Closed"), size = 10, replace = TRUE)) | |
| set.seed(42) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.