Upload folder using huggingface_hub
Browse files- Dockerfile +2 -2
- app.py +0 -1
- model.onnx +2 -2
- neural_engine/src/main.rs +2 -2
Dockerfile
CHANGED
|
@@ -41,8 +41,8 @@ RUN mkdir -p Neurex_Engine && \
|
|
| 41 |
cp model.onnx Neurex_Engine/ || true && \
|
| 42 |
cp vocab.json Neurex_Engine/ || true
|
| 43 |
|
| 44 |
-
# Download the massive
|
| 45 |
-
RUN curl -L -o ./
|
| 46 |
|
| 47 |
# Make engines executable
|
| 48 |
RUN chmod +x Neurex_Engine/Neurex && \
|
|
|
|
| 41 |
cp model.onnx Neurex_Engine/ || true && \
|
| 42 |
cp vocab.json Neurex_Engine/ || true
|
| 43 |
|
| 44 |
+
# Download the massive model.onnx.data from our model repository directly into the root folder (where model.onnx is)
|
| 45 |
+
RUN curl -L -o ./model.onnx.data https://huggingface.co/dpv007/Neurex-Weights/resolve/main/model.onnx.data
|
| 46 |
|
| 47 |
# Make engines executable
|
| 48 |
RUN chmod +x Neurex_Engine/Neurex && \
|
app.py
CHANGED
|
@@ -119,7 +119,6 @@ async def make_move(req: MoveRequest):
|
|
| 119 |
print("ERROR: Rust engine is not loaded.")
|
| 120 |
return JSONResponse({'ai_move': None, 'eval': 0.0})
|
| 121 |
|
| 122 |
-
# MCTS runs 150 simulations
|
| 123 |
result = await rust_engine_pool.play(board, chess.engine.Limit(time=req.time_limit), info=chess.engine.INFO_ALL)
|
| 124 |
ai_move = result.move.uci()
|
| 125 |
|
|
|
|
| 119 |
print("ERROR: Rust engine is not loaded.")
|
| 120 |
return JSONResponse({'ai_move': None, 'eval': 0.0})
|
| 121 |
|
|
|
|
| 122 |
result = await rust_engine_pool.play(board, chess.engine.Limit(time=req.time_limit), info=chess.engine.INFO_ALL)
|
| 123 |
ai_move = result.move.uci()
|
| 124 |
|
model.onnx
CHANGED
|
@@ -1,3 +1,3 @@
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
-
oid sha256:
|
| 3 |
-
size
|
|
|
|
| 1 |
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6a4c289f756799c983b4abb69849015416a8c03d4039eed21b0bb9c8e9c6e362
|
| 3 |
+
size 110555
|
neural_engine/src/main.rs
CHANGED
|
@@ -482,11 +482,11 @@ fn main() {
|
|
| 482 |
let num_threads = std::thread::available_parallelism().map(|n| n.get()).unwrap_or(4).min(8);
|
| 483 |
let mut sessions: Vec<Option<Session>> = Vec::new();
|
| 484 |
for _ in 0..num_threads {
|
| 485 |
-
let sess = if Path::new("
|
| 486 |
Some(Session::builder().unwrap()
|
| 487 |
.with_optimization_level(GraphOptimizationLevel::Level3).unwrap()
|
| 488 |
.with_intra_threads(1).unwrap()
|
| 489 |
-
.commit_from_file("
|
| 490 |
} else {
|
| 491 |
None
|
| 492 |
};
|
|
|
|
| 482 |
let num_threads = std::thread::available_parallelism().map(|n| n.get()).unwrap_or(4).min(8);
|
| 483 |
let mut sessions: Vec<Option<Session>> = Vec::new();
|
| 484 |
for _ in 0..num_threads {
|
| 485 |
+
let sess = if Path::new("model.onnx").exists() {
|
| 486 |
Some(Session::builder().unwrap()
|
| 487 |
.with_optimization_level(GraphOptimizationLevel::Level3).unwrap()
|
| 488 |
.with_intra_threads(1).unwrap()
|
| 489 |
+
.commit_from_file("model.onnx").unwrap())
|
| 490 |
} else {
|
| 491 |
None
|
| 492 |
};
|