Which step most directly verifies that a dataset's in-memory size matches your estimate after loading it into cuDF?
- Exam domain
- MLOps19% of the exam
- Difficulty
- Medium
- In this mock
- 10 questions on this domainPractise this domain
Why the exam asks this
Objective in the exam guide: Assessing and verifying the memory size of a dataset
Verifying memory size is named.
Why D is the answer
Call memory_usage on the loaded DataFrame and check nvidia-smi
memory_usage reports the DataFrame's size, and nvidia-smi shows total device memory in use, which confirms the estimate.
Remember: Verify memory with memory_usage and nvidia-smi.
How it works
Dataset memory is verified after loading with DataFrame memory reports and device tools.
In detail
- Verify after loading.
- Watch device memory with nvidia-smi.
Every option, checked
Knowing why each wrong option fails is how you rule it out on exam day.
A. Count the files in the source folder and multiply by an average file sizeWrongMost tempting
File counts estimate disk, not memory.
Why it tempts: Disk numbers are easy to get.
B. Check the CSV headerWrong
Headers do not show size.
C. Read the dataset's READMEWrong
READMEs may be outdated.
D. Call memory_usage on the loaded DataFrame and check nvidia-smiRight
Verify memory with memory_usage and nvidia-smi.
Use case
An illustrative scenario, not a real incident.
Illustrative: memory_usage shows 28 GB, close to the 30 GB estimate.
See it in different ways
flowchart LR S0["Load data"] --> S1["memory_usage"] --> S2["nvidia-smi"] --> S3["Compare with estimate"]
How to read this chart
- Read it in order: Load data, then memory_usage, then nvidia-smi, then Compare with estimate.
flowchart TD
Q{"Within 10%?"}
Q -->|"Yes"| A0["Proceed"]
Q -->|"No"| A1["Check dtypes and strings"]How to read this chart
- At "Within 10%?": if "Yes", go to "Proceed"; if "No", go to "Check dtypes and strings".