Apply pre-commit

This commit is contained in:
hyunwoongko
2023-02-08 03:50:27 +09:00
parent 44c555cad1
commit cb722768f7
3 changed files with 100 additions and 2 deletions
+98
View File
@@ -0,0 +1,98 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="AutoImportSettings">
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
<list default="true" id="03de95b1-b04e-4800-8686-c5d4efd04107" name="Changes" comment="">
<change beforePath="$PROJECT_DIR$/model/supervised_finetuning/efficiency_utils.py" beforeDir="false" afterPath="$PROJECT_DIR$/model/supervised_finetuning/efficiency_utils.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/model/supervised_finetuning/trainer.py" beforeDir="false" afterPath="$PROJECT_DIR$/model/supervised_finetuning/trainer.py" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
<option name="HIGHLIGHT_NON_ACTIVE_CHANGELIST" value="false" />
<option name="LAST_RESOLUTION" value="IGNORE" />
</component>
<component name="ComposerSettings">
<execution />
</component>
<component name="FileTemplateManagerImpl">
<option name="RECENT_TEMPLATES">
<list>
<option value="Python Script" />
</list>
</option>
</component>
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
<component name="MacroExpansionManager">
<option name="directoryName" value="dvackpjo" />
</component>
<component name="MarkdownSettingsMigration">
<option name="stateVersion" value="1" />
</component>
<component name="ProjectId" id="2LN3dGjbiB2s6cNyu9EW2bS0crY" />
<component name="ProjectViewState">
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showExcludedFiles" value="false" />
<option name="showLibraryContents" value="true" />
<option name="showVisibilityIcons" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"RunOnceActivity.OpenProjectViewOnStart": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"WebServerToolWindowFactoryState": "false",
"last_opened_file_path": "/Users/hyunwoongko/Github/Open-Assistant/model/supervised_finetuning",
"node.js.detected.package.eslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"project.structure.last.edited": "Project",
"project.structure.proportion": "0.0",
"project.structure.side.proportion": "0.0",
"vue.rearranger.settings.migration": "true"
}
}]]></component>
<component name="RecentsManager">
<key name="CopyFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/model/supervised_finetuning" />
</key>
<key name="MoveFile.RECENT_KEYS">
<recent name="$PROJECT_DIR$/model/reward/instructor" />
</key>
</component>
<component name="RunManager">
<configuration default="true" type="Application" factoryName="Application">
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">
<task active="true" id="Default" summary="Default task">
<changelist id="03de95b1-b04e-4800-8686-c5d4efd04107" name="Changes" comment="" />
<created>1675697798532</created>
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1675697798532</updated>
<workItem from="1675697799923" duration="7089000" />
</task>
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
<component name="Vcs.Log.Tabs.Properties">
<option name="TAB_STATES">
<map>
<entry key="MAIN">
<value>
<State />
</value>
</entry>
</map>
</option>
</component>
</project>
@@ -1,7 +1,7 @@
import functools
import torch
from transformers.activations import QuickGELUActivation, NewGELUActivation, FastGELUActivation, GELUActivation
from transformers.activations import FastGELUActivation, GELUActivation, NewGELUActivation, QuickGELUActivation
def rsetattr(obj, attr, val):
+1 -1
View File
@@ -5,11 +5,11 @@ from typing import Any, Dict, List, Optional, Tuple, Union
import bitsandbytes
import torch
from efficiency_utils import fuse_gelu
from torch import nn
from transformers import PreTrainedModel, Trainer, TrainingArguments
from transformers.training_args import OptimizerNames
from utils import get_dataset, get_loss, get_metrics, get_model, get_tokenizer, read_yamls
from efficiency_utils import fuse_gelu
def compute_metrics(eval_pred, preprocess_fns, metrics):