mirror of
https://github.com/ml-explore/mlx.git
synced 2025-12-16 01:49:05 +08:00
Merge branch 'ml-explore:main' into adding-Muon-optimizer
This commit is contained in:
@@ -199,6 +199,7 @@ class SocketThread {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void worker() {
|
void worker() {
|
||||||
|
int error_count = 0;
|
||||||
bool delete_recv = false;
|
bool delete_recv = false;
|
||||||
bool delete_send = false;
|
bool delete_send = false;
|
||||||
while (true) {
|
while (true) {
|
||||||
@@ -235,10 +236,11 @@ class SocketThread {
|
|||||||
task.buffer = static_cast<char*>(task.buffer) + r;
|
task.buffer = static_cast<char*>(task.buffer) + r;
|
||||||
task.size -= r;
|
task.size -= r;
|
||||||
delete_recv = task.size == 0;
|
delete_recv = task.size == 0;
|
||||||
|
error_count = 0;
|
||||||
} else if (errno != EAGAIN) {
|
} else if (errno != EAGAIN) {
|
||||||
|
error_count++;
|
||||||
log_info(
|
log_info(
|
||||||
true, "Receiving from socket", fd_, "failed with errno", errno);
|
true, "Receiving from socket", fd_, "failed with errno", errno);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!sends_.empty()) {
|
if (!sends_.empty()) {
|
||||||
@@ -248,11 +250,17 @@ class SocketThread {
|
|||||||
task.buffer = static_cast<char*>(task.buffer) + r;
|
task.buffer = static_cast<char*>(task.buffer) + r;
|
||||||
task.size -= r;
|
task.size -= r;
|
||||||
delete_send = task.size == 0;
|
delete_send = task.size == 0;
|
||||||
|
error_count = 0;
|
||||||
} else if (errno != EAGAIN) {
|
} else if (errno != EAGAIN) {
|
||||||
|
error_count++;
|
||||||
log_info(true, "Sending to socket", fd_, "failed with errno", errno);
|
log_info(true, "Sending to socket", fd_, "failed with errno", errno);
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (error_count >= 10) {
|
||||||
|
log_info(true, "Too many send/recv errors. Aborting...");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define MLX_VERSION_MAJOR 0
|
#define MLX_VERSION_MAJOR 0
|
||||||
#define MLX_VERSION_MINOR 24
|
#define MLX_VERSION_MINOR 23
|
||||||
#define MLX_VERSION_PATCH 2
|
#define MLX_VERSION_PATCH 2
|
||||||
#define MLX_VERSION_NUMERIC \
|
#define MLX_VERSION_NUMERIC \
|
||||||
(100000 * MLX_VERSION_MAJOR + 1000 * MLX_VERSION_MINOR + MLX_VERSION_PATCH)
|
(100000 * MLX_VERSION_MAJOR + 1000 * MLX_VERSION_MINOR + MLX_VERSION_PATCH)
|
||||||
|
|||||||
@@ -112,7 +112,12 @@ def extract_rings(hosts, index):
|
|||||||
break
|
break
|
||||||
if not ring:
|
if not ring:
|
||||||
break
|
break
|
||||||
|
try:
|
||||||
rings.append(normalize(concretize(ring, used_ports)))
|
rings.append(normalize(concretize(ring, used_ports)))
|
||||||
|
except RuntimeError:
|
||||||
|
if len(rings) > 0:
|
||||||
|
return rings
|
||||||
|
raise
|
||||||
|
|
||||||
return rings
|
return rings
|
||||||
|
|
||||||
|
|||||||
3
setup.py
3
setup.py
@@ -5,7 +5,6 @@ import os
|
|||||||
import platform
|
import platform
|
||||||
import re
|
import re
|
||||||
import subprocess
|
import subprocess
|
||||||
import sys
|
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from subprocess import run
|
from subprocess import run
|
||||||
|
|
||||||
@@ -173,7 +172,7 @@ if __name__ == "__main__":
|
|||||||
|
|
||||||
setup(
|
setup(
|
||||||
name="mlx",
|
name="mlx",
|
||||||
version=get_version("0.23.1"),
|
version=get_version("0.23.2"),
|
||||||
author="MLX Contributors",
|
author="MLX Contributors",
|
||||||
author_email="mlx@group.apple.com",
|
author_email="mlx@group.apple.com",
|
||||||
description="A framework for machine learning on Apple silicon.",
|
description="A framework for machine learning on Apple silicon.",
|
||||||
|
|||||||
Reference in New Issue
Block a user