8000 Some minor fixes by francoishernandez · Pull Request #143 · eole-nlp/eole · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Some minor fixes #143

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

Merged
merged 2 commits into from
Nov 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 5 additions & 1 deletion eole/config/training.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,11 @@ def _validate_running_config(self):
"all",
], '-update_vocab needs -reset_optim "states" or "all"'

if self.param_init != 0.0 and self.param_init_method == "xavier_uniform":
if (
"param_init" in self.model_fields_set
and self.param_init != 0.0
and self.param_init_method == "xavier_uniform"
):
logger.warn(
f"xavier_uniform initialization does not require param_init ({self.param_init})"
)
Expand Down
8 changes: 7 additions & 1 deletion eole/models/model_saver.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,13 @@ def cleanup(self):
step_dir_to_delete = os.path.join(
self.model_path, self.checkpoint_queue.popleft()
)
shutil.rmtree(step_dir_to_delete)
try:
shutil.rmtree(step_dir_to_delete)
except FileNotFoundError:
pass
except Exception:
raise

self.checkpoint_queue.append(self.step_dir)

def _maybe_lora(self, model):
Expand Down
Loading
0