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
module Main exposing (main) | |
-- Record Schemas | |
type alias SecondLayer = | |
{ target_value : String } | |
type alias FirstLayer = | |
{ l2_value : SecondLayer } |
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
module Main exposing (..) | |
import Html exposing (Html, div, section, button, text) | |
import Html.Attributes exposing () | |
import Html.Events exposing (onClick) | |
import Browser exposing (sandbox) | |
-- Type Schemas |
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
module Main exposing (..) | |
import Html exposing (Html, div, section, button, text) | |
import Html.Attributes exposing (style) | |
import Html.Events exposing (onClick) | |
import Browser exposing (sandbox) | |
-- Type Schemas | |
type alias NestedRecord = |
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
def box_describe(df_copy): | |
df_stats = df_copy.describe().T | |
df_stats.rename(columns = { | |
'25%': 'q1', | |
'50%': 'q2', | |
'75%': 'q3' | |
}, inplace = True) | |
df_stats['iqr'] = df_stats['q3'] - df_stats['q1'] | |
df_stats['lower_fence'] = df_stats['q1'] - (1.5 * df_stats['iqr']) # Lower Fence |
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 |