-
Notifications
You must be signed in to change notification settings - Fork 589
Description
BUG REPORT
Describe the bug
Lc0 doesn't list "Temperature" as a UCI option as per https://lczero.org/play/configuration/flags/ (please see image below):

This causes the temperature option to be unusable when running with Python-Chess.
Temperature also isn't listed as a command-line flag when running 'lc0 -h' in the command line.
Steps to Reproduce
- Install lc0 0.32.0 for Windows Cuda
- Install Python-chess 1.11.2
- Run (in Python)
- transport, engine = await chess.engine.popen_uci(["../lc0-v0.32.0-windows-gpu-nvidia-cuda11/lc0"])
- board = chess.Board()
- info = await engine.analyse(board, chess.engine.Limit(nodes=1),options={'Temperature': 1})
-
Expected behavior:
'Temperature' UCI option is shown in logs, produced by '-h' flag on command line and passed on to Python-chess. -
Observed behavior:
Error message thrown by Python-chess:
####################################################################################
Traceback (most recent call last):
File "C:\Users\allan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\chess\engine.py", line 1457, in _setoption
value = self.options[name].parse(value)
~~~~~~~~~~~~^^^^^^
File "C:\Users\allan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\chess\engine.py", line 1937, in getitem
return self._store[key.lower()][1]
~~~~~~~~~~~^^^^^^^^^^^^^
KeyError: 'temperature'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\allan\Documents\cutechess\temp_vs_deviation\run_positions.py", line 96, in
asyncio.run(main())
~~~~~~~~~~~^^^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\runners.py", line 195, in run
return runner.run(main)
~~~~~~~~~~^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\runners.py", line 118, in run
return self._loop.run_until_complete(task)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 725, in run_until_complete
return future.result()
~~~~~~~~~~~~~^^
File "C:\Users\allan\Documents\cutechess\temp_vs_deviation\run_positions.py", line 67, in main
info = await engine.analyse(board, chess.engine.Limit(nodes=1),options={'Temperature': temp})
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\allan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\chess\engine.py", line 1127, in analyse
analysis = await self.analysis(board, limit, multipv=multipv, game=game, info=info, root_moves=root_moves, options=options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\allan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\chess\engine.py", line 1774, in analysis
return await self.communicate(UciAnalysisCommand)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\allan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\chess\engine.py", line 1021, in communicate
return await command.result
^^^^^^^^^^^^^^^^^^^^
File "C:\Users\allan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\chess\engine.py", line 1287, in _start
self.start()
~~~~~~~~~~^^
File "C:\Users\allan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\chess\engine.py", line 1722, in start
self.engine._configure(options)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "C:\Users\allan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\chess\engine.py", line 1479, in _configure
self._setoption(name, value)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^
File "C:\Users\allan\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\chess\engine.py", line 1459, in _setoption
raise EngineError("engine does not support option {} (available options: {})".format(name, ", ".join(self.options)))
chess.engine.EngineError: engine does not support option Temperature (available options: LogFile, ConfigFile, Ponder, SyzygyPath, Threads, MinibatchSize, CPuct, CPuctBase, CPuctFactor, TwoFoldDraws, VerboseMoveStats, FpuStrategy, FpuValue, CacheHistoryLength, MaxCollisionEvents, MaxCollisionVisits, MaxCollisionVisitsScalingStart, MaxCollisionVisitsScalingEnd, MaxCollisionVisitsScalingPower, OutOfOrderEval, MaxOutOfOrderEvalsFactor, StickyEndgames, SyzygyFastPlay, MultiPV, PerPVCounters, ScoreType, MovesLeftMaxEffect, MovesLeftThreshold, MovesLeftSlope, MovesLeftConstantFactor, MovesLeftScaledFactor, MovesLeftQuadraticFactor, MaxConcurrentSearchers, DrawScore, ContemptMode, Contempt, WDLCalibrationElo, WDLEvalObjectivity, WDLDrawRateReference, NodesPerSecondLimit, TaskWorkers, MinimumProcessingWork, MinimumPickingWork, MinimumRemainingPickingWork, MinimumPerTaskProcessing, IdlingMinimumWork, ThreadIdlingThreshold, UCI_Opponent, UCI_RatingAdv, SearchSpinBackoff, MaxPrefetch, SolidTreeThreshold, SmartPruningFactor, SmartPruningMinimumBatches, RamLimitMb, MoveOverheadMs, TimeManager, UCI_Chess960, UCI_ShowWDL, UCI_ShowMovesLeft, PolicyTemperature, HistoryFill, WeightsFile, Backend, BackendOptions, NNCacheSize)
Exception ignored in: <function _ProactorBasePipeTransport.del at 0x000001FA6E96C0E0>
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\proactor_events.py", line 116, in del
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\proactor_events.py", line 80, in repr
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\windows_utils.py", line 102, in fileno
ValueError: I/O operation on closed pipe
Exception ignored in: <function _ProactorBasePipeTransport.del at 0x000001FA6E96C0E0>
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\proactor_events.py", line 116, in del
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\proactor_events.py", line 80, in repr
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\windows_utils.py", line 102, in fileno
ValueError: I/O operation on closed pipe
Exception ignored in: <function _ProactorBasePipeTransport.del at 0x000001FA6E96C0E0>
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\proactor_events.py", line 116, in del
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\proactor_events.py", line 80, in repr
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.13_3.13.2032.0_x64__qbz5n2kfra8p0\Lib\asyncio\windows_utils.py", line 102, in fileno
ValueError: I/O operation on closed pipe
#####################################################################################
When running 'lc0 -h', temperature is not included in the listed options. However, lc0 will still accept the temperature command line option.
Lc0 version
lc0-v0.32.0-windows-gpu-nvidia-cuda11
Lc0 parameters
Set through python-chess as follows:
transport, engine = await chess.engine.popen_uci(["../lc0-v0.32.0-windows-gpu-nvidia-cuda11/lc0"])
info = await engine.analyse(board, chess.engine.Limit(nodes=1),options={'Temperature': 1})
Hardware
- Number and model of GPUs that you use.
1 NVIDIA GeForce RTX 4050 Laptop GPU - Amount of RAM in the system
16GB - Other specs (CPU etc) if it may be relevant
Lc0 logs
Please attach Lc0 logs. Here is how to produce them (e.g. for D:\logfile.txt):
**