Skip to content
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

Disk Letter description Changed and Ubuntu disk appeared in Task Manager When Using a File Outside of WSL #11711

Closed
1 of 2 tasks
goodevile opened this issue Jun 19, 2024 · 3 comments

Comments

@goodevile
Copy link

goodevile commented Jun 19, 2024

Windows Version

Microsoft Windows [Version 10.0.22631.3737]

WSL Version

2.2.4.0

Are you using WSL 1 or WSL 2?

  • WSL 2
  • WSL 1

Kernel Version

5.15.153.1-microsoft-standard-WSL2

Distro Version

22.04

Other Software

list_env_packages.txt
conda 24.5.0 (miniconda)
Python 3.12.3 (in WSL)

Repro Steps

after miniconda & packages installed:

sudo mkdir /mnt/ramdisk
sudo mount -t tmpfs -o size=16G tmpfs /mnt/ramdisk

Run code:

import sqlite3
import json
from ultralytics import YOLO

# Load the model
model = YOLO("yolov8n-pose.pt")

# Source file
source = "/mnt/ramdisk/output.mp4"

# Predict with the model
results = model.track(
    source,
    save_txt=True,
    verbose=False,
    save_frames=True,
    show_labels=False,
    show_conf=False,
    show_boxes=False,
    save_crop=True,
    conf=0.6,
    tracker="bytetrack.yaml",
    stream=True
)

# Initialize the database
def init_db():
    conn = sqlite3.connect('results.db')
    cursor = conn.cursor()
    cursor.execute('''
        CREATE TABLE IF NOT EXISTS results (
            id INTEGER PRIMARY KEY AUTOINCREMENT,
            name TEXT,
            class INTEGER,
            confidence REAL,
            x1 REAL,
            y1 REAL,
            x2 REAL,
            y2 REAL,
            track_id INTEGER,
            keypoints_x TEXT,
            keypoints_y TEXT,
            keypoints_visible TEXT
        )
    ''')
    conn.commit()
    conn.close()

# Save result to database
def save_result_to_db(result):
    conn = sqlite3.connect('results.db')
    cursor = conn.cursor()
    cursor.execute('''
        INSERT INTO results (
            name, class, confidence, x1, y1, x2, y2, track_id, keypoints_x, keypoints_y, keypoints_visible
        ) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
    ''', (
        result['name'],
        result['class'],
        result['confidence'],
        result['box']['x1'],
        result['box']['y1'],
        result['box']['x2'],
        result['box']['y2'],
        result.get('track_id', None),
        ','.join(map(str, result['keypoints']['x'])),
        ','.join(map(str, result['keypoints']['y'])),
        ','.join(map(str, result['keypoints']['visible']))
    ))
    conn.commit()
    conn.close()

# Initialize the database
init_db()

# Iterate over results and save to database
for result in results:
    if len(result) > 0:
        for r in result:
            res_json = r.tojson(normalize=False, decimals=0)
            res_list = json.loads(res_json)
            
            # Iterate over the list and save each dictionary to the database
            for res_dict in res_list:
                # Debug print statement
                print(json.dumps(res_dict, indent=4))
                
                save_result_to_db(res_dict)

Expected Behavior

The disk letter description in Task Manager should remain consistent with the actual disk where the file is stored (e.g., Disk H).
The Ubuntu OS disk should not appear in my W11 Task Manager.

Actual Behavior

  • The disk letter description in Task Manager changes to a different letter when performing inference on a file stored on RAM and saving a file outside of WSL (e.g., from Disk H to Disk C).

  • The Ubuntu OS disk appeared in my W11 Task Manager.
    (Ubuntu OS, and it's files, are installed in this separated drive called "Disk 5" in Task Manager, IDK why 5, no W11 files are stored here)

image

Diagnostic Logs

No response

Copy link

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'.
Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.

How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging
If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

@goodevile
Copy link
Author

goodevile commented Jun 19, 2024

Logs are required for review from WSL team

If this a feature request, please reply with '/feature'. If this is a question, reply with '/question'. Otherwise please attach logs by following the instructions below, your issue will not be reviewed unless they are added. These logs will help us understand what is going on in your machine.
How to collect WSL logs

Download and execute collect-wsl-logs.ps1 in an administrative powershell prompt:

Invoke-WebRequest -UseBasicParsing "https://raw.githubusercontent.com/microsoft/WSL/master/diagnostics/collect-wsl-logs.ps1" -OutFile collect-wsl-logs.ps1
Set-ExecutionPolicy Bypass -Scope Process -Force
.\collect-wsl-logs.ps1

The scipt will output the path of the log file once done.

Once completed please upload the output files to this Github issue.

Click here for more info on logging If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'.

Will do this ASAP, can't stop code running right now.

Copy link
Contributor

This issue has been automatically closed since it has not had any author activity for the past 7 days. If you're still experiencing this issue please re-file it as a new issue.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants