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 hyperparamter sweep to sweep.py; Fall back to eig when eigh fails #235

Merged
merged 15 commits into from
May 5, 2023
Merged
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
Next Next commit
add save_reporter_stats CLA
  • Loading branch information
AlexTMallen committed Apr 27, 2023
commit dca33b306f4f52eb8943beeb948dabce0b321de2
2 changes: 1 addition & 1 deletion elk/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class Run(ABC, Serializable):

concatenated_layer_offset: int = 0
debug: bool = False
min_gpu_mem: int | None = None
min_gpu_mem: int | None = None # in bytes
num_gpus: int = -1
out_dir: Path | None = None
disable_cache: bool = field(default=False, to_dict=False)
Expand Down
5 changes: 3 additions & 2 deletions elk/training/eigen_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class EigenReporterConfig(ReporterConfig):
neg_cov_weight: float = 0.5

num_heads: int = 1
save_reporter_stats: bool = False

def __post_init__(self):
if not (0 <= self.neg_cov_weight <= 1):
Expand Down Expand Up @@ -312,8 +313,8 @@ def closure():

opt.step(closure)

def save(self, path: Path | str, save_stats=False):
def save(self, path: Path | str):
# TODO: this method will save separate JSON and PT files
if not save_stats:
if not self.config.save_reporter_stats:
self.delete_stats()
super().save(path)