Skip to content

Week 5 Fix for nasty tsne warning on Windows #379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rossobianero
Copy link

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

"UserWarning: Could not find the number of physical cores for the following reason"

See: https://stackoverflow.com/a/78302947/738190
@ed-donner
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants