QUIZ

ADVANCED

1. When should you use 'replicas'?

  • When you want to run multiple executors in parallel to increase throughput and availability.
  • When you want to partition big indices
  • When you need to segment large texts into smaller chunks
  • When you need to segment large texts into smaller chunks

2. What is a valid signature for a function that uses the  @requests decorator?

  • def foo(self, docs, *args)
  • def foo(docs, **kwargs)
  • def foo(self, docs, parameters, **kwargs)
  • def foo(cls, docs, docs_matrix, **kwargs)

3. How to control mesage overflow at the Executor?

  • Use prefetch>0 with the Client
  • Use prefetch>0 while starting the Flow
  • Use shards>1 with the Executor
  • Use overload=0 environment variable in the Executor

4. How to override the `with` configurations when using an Executor from Jina Hub?

  • Use uses_with argument
  • Use overide_with argument
  • Use with argument
  • Use customized_with argument

5. How to provide custom models to containerized Hub encoders?

  • Use the volumes parameter to specify a disk volume that contains the model files and specify the custom model path in the Executor parameters
  • Upload the custom model to HuggingFace
  • Specify the custom model path in the Executor parameters
  • It is not possible with Jina

6. Which amongst these is not a right syntax to use an already existing Executor from Hub?

  • Executor.from_hub('jinahub://DummyHubExecutor')
  • Flow().add(uses='jinahub+docker://DummyHubExecutor')
  • DocumentArray.load_from('jinahub://DummyHubExecutor')
  • Flow().add(uses='jinahub://DummyHubExecutor')

7. Which is correct about the retention policy for the Flows deployed on JCloud?

  • Flows are kept forever.
  • By default Flows will be removed after 24 hrs, regardless of whether it's in use / has been used or not.
  • You can configure the Flow retention days in Flow YAML.

8. How can I make sure Executors only receive Documents meeting certain conditions?

  • Adding Flow().add(condition=...) with condition beind defined with DocArray query language
  • Adding Flow().add(when=...) with condition being defined with DocArray query language
  • Adding Flow().add(when=...) with condition being defined with your own query language
  • Adding Flow().add(condition=...) with condition beind defined with your own query language

9. What is the way Jina exposes to check the readiness of a Flow from a Client?

  • client.dry_run()
  • client.health_check()
  • client.post()
  • client.index()

10. How can you monitor the Flow?

  • Flow(monitoring=True, port_monitoring=9090) and scrape metrics using Prometheus
  • Send a HTTP request to each Executor
  • Flow(monitoring=True, port_monitoring=9090) and client.monitor(port=9090)
  • Monitoring is available only in JCloud
Submit
Quick access to:
beginner

Beginner Section

intermediate

Intermediate Section

advanced

Advanced Section