Код: Выделить всё
training = BashOperator(
task_id=f"training",
bash_command=f"echo 'wait for VM initialization' && sleep 60 && "
f"gcloud config set account xx && "
f"gcloud compute ssh {SERVICE_ACCOUNT.split('@')[0]}@{x} "
f"--tunnel-through-iap "
f"--ssh-flag='-o ServerAliveInterval=60' "
f"--ssh-flag='-o ServerAliveCountMax=5' "
f"--command {train_cmd}",
retry_delay=timedelta(minutes=2),
)
Код: Выделить всё
print("fitting model")
tr.model_fit()
Код: Выделить всё
def model_fit(self):
self.model = YouTubeRanking(
task="ranking",
data_info=self.data_info,
embed_size=16,
n_epochs=7,
lr=1e-4,
batch_size=512,
use_bn=True,
hidden_units=(128, 64, 32),
self.model.fit(
self.train_data,
neg_sampling=True,
verbose=0,
shuffle=True,
eval_data=self.test_data,
metrics=["loss"],
)
Код: Выделить всё
client_loop: send disconnect: Broken pipe
Подробнее здесь: https://stackoverflow.com/questions/798 ... roken-pipe
Мобильная версия