llm_engineering icon indicating copy to clipboard operation
llm_engineering copied to clipboard

Week 5 Fix for nasty tsne warning on Windows

Open rossobianero opened this issue 8 months ago • 1 comments

The slides that use tsne can produce a nasty looking warning on Windows. This makes that warning go away.

[C:\Users\xxx\Dev\llm\llm_engineering\venv\Lib\site-packages\joblib\externals\loky\backend\context.py:136](file:///C:/Users/xxx/Dev/llm/llm_engineering/venv/Lib/site-packages/joblib/externals/loky/backend/context.py#line=135): UserWarning: Could not find the number of physical cores for the following reason:
[WinError 2] The system cannot find the file specified
Returning the number of logical cores instead. You can silence this warning by setting LOKY_MAX_CPU_COUNT to the number of cores you want to use.
  warnings.warn(
  File "[C:\Users\xxx\Dev\llm\llm_engineering\venv\Lib\site-packages\joblib\externals\loky\backend\context.py", line 257](file:///C:/Users/xxx/Dev/llm/llm_engineering/venv/Lib/site-packages/joblib/externals/loky/backend/context.py#line=256), in _count_physical_cores
    cpu_info = subprocess.run(
               ^^^^^^^^^^^^^^^
  File "[C:\Python311\Lib\subprocess.py", line 548](file:///C:/Python311/Lib/subprocess.py#line=547), in run
    with Popen(*popenargs, **kwargs) as process:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "[C:\Python311\Lib\subprocess.py", line 1026](file:///C:/Python311/Lib/subprocess.py#line=1025), in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "[C:\Python311\Lib\subprocess.py", line 1538](file:///C:/Python311/Lib/subprocess.py#line=1537), in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,

Credit to: https://stackoverflow.com/a/78302947/738190

rossobianero avatar May 12 '25 19:05 rossobianero

Hey @rossobianero it looks like you might have saved some of these notebooks with outputs? Thanks so much Ed

ed-donner avatar May 24 '25 14:05 ed-donner