Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add custom_ds_n CLI arg #187

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Change to Path types
  • Loading branch information
reaganjlee committed Apr 13, 2023
commit b0f6d1771374fe6b4d24ff50212ad09fd2656234
2 changes: 1 addition & 1 deletion elk/evaluation/evaluate.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Eval(Serializable):
num_gpus: int = -1
skip_baseline: bool = False
concatenated_layer_offset: int = 0
custom_ds_n: Optional[str] = None
custom_ds_n: Optional[Path] = None

def execute(self):
datasets = self.data.prompts.datasets
Expand Down
2 changes: 1 addition & 1 deletion elk/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ class Run(ABC):
cfg: Union["Elicit", "Eval"]
out_dir: Optional[Path] = None
dataset: DatasetDict = field(init=False)
custom_ds_n: Optional[str] = None
custom_ds_n: Optional[Path] = None
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

random unimportant thing: because we now require Python >= 3.10, we can replace Union[X, Y] with X | Y and Optional[X] with X | None in type annotations


def __post_init__(self):
# Extract the hidden states first if necessary
Expand Down
2 changes: 1 addition & 1 deletion elk/training/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class Elicit(Serializable):
# if nonzero, appends the hidden states of layer concatenated_layer_offset before
debug: bool = False
out_dir: Optional[Path] = None
custom_ds_n: str = None
custom_ds_n: Optional[Path] = None

def execute(self):
train_run = Train(cfg=self, out_dir=self.out_dir, custom_ds_n=self.custom_ds_n)
Expand Down