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 cats.effect.{IO, Timer} | |
import fs2.{Pull, Stream} | |
import org.http4s._ | |
import org.http4s.ServerSentEvent.EventId | |
import org.http4s.client.Client | |
import org.http4s.headers.{`Cache-Control`, Accept} | |
import scala.concurrent.duration._ | |
import SseClient._ | |
final class SseClient private ( |
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
from datetime import datetime | |
from torch.utils.tensorboard import SummaryWriter | |
from datasets import load_dataset | |
from transformers import AutoTokenizer, AutoModelForSequenceClassification, TrainingArguments, Trainer | |
import numpy as np | |
import torch | |
from sklearn.metrics import f1_score, roc_auc_score, accuracy_score | |
from transformers import EvalPrediction | |
# Load 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
//> using scala "3" | |
import scala.compiletime.{erasedValue, summonInline, constValue, error} | |
import scala.deriving.Mirror | |
import scala.collection.Factory | |
import scala.annotation.implicitNotFound | |
import scala.util.NotGiven | |
import Field.TypeForLabel | |
infix type =:!=[A, B] = NotGiven[A =:= B] |