MailboxError: transport failed Jupyter Notebook Miniconda

I’m trying to train a model and get a MailboxError: Transport Failed, and even after searching and looking around, I have no idea how to resolve the error.

Does anyone have any idea how to solve this? :frowning:

I use Jupyter Notebook and log in with miniconda. I can only login with my personla API, whenever I try to relogin with my group’s API I can’t login, but I would expect those two things to be unrelated.

This is the code I’m trying to run:

Define loss and metrics

wandb.init(project=“loss_curve”)
loss = torch.nn.MSELoss(reduction=“mean”)
metrics = {“f1”: torchmetrics.classification.F1Score(task=‘binary’, num_classes=1, average=“macro”)}

Run training

train_history, val_history = training_loop(
model=model,
loss=loss,
optimizer=optimizer,
train_loader=train_loader,
val_loader=val_loader,
init_epoch=init_epoch,
n_epochs=100,
metrics_dict=metrics,
save_path=“model.ckpt”
)

And the full error code:

Problem at: C:\Users\Monik\AppData\Local\Temp\ipykernel_9676\2064901393.py 2

MailboxError Traceback (most recent call last)
Cell In[16], line 2
1 # Define loss and metrics
----> 2 wandb.init(project=“loss_curve”)
3 loss = torch.nn.MSELoss(reduction=“mean”)
4 metrics = {“f1”: torchmetrics.classification.F1Score(task=‘binary’, num_classes=1, average=“macro”)}

File ~\miniconda3\envs\myenv\lib\site-packages\wandb\sdk\wandb_init.py:1200, in init(job_type, dir, config, project, entity, reinit, tags, group, name, notes, magic, config_exclude_keys, config_include_keys, anonymous, mode, allow_val_change, resume, force, tensorboard, sync_tensorboard, monitor_gym, save_code, id, fork_from, settings)
1198 if logger is not None:
1199 logger.exception(str(e))
→ 1200 raise e
1201 except KeyboardInterrupt as e:
1202 assert logger

File ~\miniconda3\envs\myenv\lib\site-packages\wandb\sdk\wandb_init.py:1181, in init(job_type, dir, config, project, entity, reinit, tags, group, name, notes, magic, config_exclude_keys, config_include_keys, anonymous, mode, allow_val_change, resume, force, tensorboard, sync_tensorboard, monitor_gym, save_code, id, fork_from, settings)
1179 except_exit = wi.settings._except_exit
1180 try:
→ 1181 run = wi.init()
1182 except_exit = wi.settings._except_exit
1183 except (KeyboardInterrupt, Exception) as e:

File ~\miniconda3\envs\myenv\lib\site-packages\wandb\sdk\wandb_init.py:812, in _WandbInit.init(self)
810 run_start_handle = backend.interface.deliver_run_start(run._run_obj)
811 # TODO: add progress to let user know we are doing something
→ 812 run_start_result = run_start_handle.wait(timeout=30)
813 if run_start_result is None:
814 run_start_handle.abandon()

File ~\miniconda3\envs\myenv\lib\site-packages\wandb\sdk\lib\mailbox.py:281, in MailboxHandle.wait(self, timeout, on_probe, on_progress, release, cancel)
279 if self._keepalive and self._interface:
280 if self._interface._transport_keepalive_failed():
→ 281 raise MailboxError(“transport failed”)
283 found, abandoned = self._slot._get_and_clear(timeout=wait_timeout)
284 if found:
285 # Always update progress to 100% when done

MailboxError: transport failed

would it be possible to try resetting your login credentials?

  1. run rm ~/.netrc in your terminal. In general, we store user credentials in the .netrc file. Removing this file would prompt you to put in your API key upon relogin.
  2. calling wandb login --relogin in your terminal and entering those credentials

do you still reach the same error after resetting these? additionally, what SDK version are you running?

Since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!