Improve debugging experience (#1512)
* Create CONTRIBUTING.md (#1472) Creating contributing guidelines * Update CONTRIBUTING.md improved sentence * Improve logging control in `unsloth_compile_transformers` by conditionally redirecting stdout based on UNSLOTH_DISABLE_LOGGER environment variable --------- Co-authored-by: Michael Han <107991372+shimmyshimmer@users.noreply.github.com> Co-authored-by: Nino Risteski <95188570+NinoRisteski@users.noreply.github.com>
This commit is contained in:
parent
8cf3e6fa2b
commit
9940583287
1 changed files with 3 additions and 1 deletions
|
|
@ -446,7 +446,9 @@ class FastVisionModel(FastBaseVisionModel):
|
|||
|
||||
if not was_disabled: enable_progress_bars()
|
||||
|
||||
with contextlib.redirect_stdout(open(os.devnull, "w")):
|
||||
with contextlib.redirect_stdout(
|
||||
open(os.devnull, "w") if os.environ.get("UNSLOTH_DISABLE_LOGGER", "0") != "1" else sys.stdout
|
||||
):
|
||||
patch_loss_functions(torch_compile = False)
|
||||
model_types = unsloth_compile_transformers(
|
||||
model_name = model_name,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue