Ksjsjjdj commited on
Commit
bb40b17
·
verified ·
1 Parent(s): 90373e4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -76,7 +76,7 @@ class CustomTrainerCallback(TrainerCallback):
76
  job.progress = 0.1 + (prog * 0.8)
77
  if state.global_step % 1 == 0:
78
  loss = state.log_history[-1].get('loss', 'N/A') if state.log_history else '...'
79
- job.add_log(f"Step {state.global_step}/{state.max_steps} | Loss: {loss}")
80
  return control
81
 
82
  def on_save(self, args, state, control, **kwargs):
@@ -236,7 +236,7 @@ def background_train_task(job_id, hf_token, model_name, new_repo_name, lora_r, l
236
  report_to="none",
237
  fp16=True if torch.cuda.is_available() else False,
238
  disable_tqdm=True,
239
- dataloader_num_workers=cpu_count,
240
  dataloader_pin_memory=True,
241
  torch_compile=True if os.name == 'posix' else False
242
  )
@@ -361,7 +361,7 @@ def load_from_url(request: gr.Request):
361
  pass
362
  return gr.update(selected="launch_tab"), ""
363
 
364
- with gr.Blocks(title="Nucleus Enterprise"):
365
  with gr.Column():
366
  gr.Markdown("# ⚛️ NUCLEUS ENTERPRISE")
367
  gr.Markdown("Autonomous LLM Foundry | V5.0 Stable")
 
76
  job.progress = 0.1 + (prog * 0.8)
77
  if state.global_step % 1 == 0:
78
  loss = state.log_history[-1].get('loss', 'N/A') if state.log_history else '...'
79
+ job.add_log(f"Training Step {state.global_step}/{state.max_steps} | Loss: {loss}")
80
  return control
81
 
82
  def on_save(self, args, state, control, **kwargs):
 
236
  report_to="none",
237
  fp16=True if torch.cuda.is_available() else False,
238
  disable_tqdm=True,
239
+ dataloader_num_workers=4,
240
  dataloader_pin_memory=True,
241
  torch_compile=True if os.name == 'posix' else False
242
  )
 
361
  pass
362
  return gr.update(selected="launch_tab"), ""
363
 
364
+ with gr.Blocks(title="Nucleus Enterprise") as demo:
365
  with gr.Column():
366
  gr.Markdown("# ⚛️ NUCLEUS ENTERPRISE")
367
  gr.Markdown("Autonomous LLM Foundry | V5.0 Stable")