Ikibazo gihuza ibibazo · Hagati Urwego

Gukorera Model hamwe na Quiz ya FastAPI

Shushanya iherezo ryihuta rya FastAPI kandi utandukanye ubushobozi bwa API nuburyo bwo gupakira ibintu, guhuriza hamwe no kugenzura umusaruro.

Inzira zijyanye no kuyoboraGukorera Model hamwe na Fastapi
Ikibazo 1 Bya 8

What can typed request models provide in FastAPI?

Reba buri kibazo8 ibibazo

Ibisubizo nibisobanuro bigaragara mugihe ufata ikibazo.

  1. What can typed request models provide in FastAPI?
    • Input validation and a documented API schema
    • Guaranteed correct model predictions
    • GPU driver installation
    • Automatic model retraining
  2. When should a large model artifact usually be loaded?
    • Inside every request handler call
    • During application startup and reused across requests
    • After sending the HTTP response
    • Only when the process shuts down
  3. Why can synchronous CPU inference inside an async endpoint be problematic?
    • It disables input validation
    • It converts JSON into GPU memory automatically
    • It can block the event loop and delay other requests
    • It makes predictions deterministic
  4. What risk can multiple worker processes create for a GPU model?
    • They disable model versioning
    • They combine all copies into one automatically
    • They remove GPU memory limits
    • Each process may load another copy of model weights into memory
  5. What should readiness indicate for a model API?
    • Whether the training set is alphabetized
    • Whether the model and required dependencies are ready to serve
    • Whether every prediction is correct
    • Whether the server source code has comments
  6. Why add timeouts and concurrency limits?
    • To make all requests asynchronous
    • To increase the model's accuracy
    • To bound resource use and prevent overload from unbounded requests
    • To remove authentication requirements
  7. What does OpenAPI documentation not provide by itself?
    • A list of API operations
    • A description of request fields
    • A schema for responses
    • Authentication or authorization enforcement
  8. When might a dedicated model server be preferable?
    • Measured throughput, batching or model-management needs exceed a simple API process
    • Whenever the model has one input
    • Before measuring request load
    • When input validation is required