Skip to content

Commit

Permalink
Created Advanced Quiz Answers.md file
Browse files Browse the repository at this point in the history
  • Loading branch information
AaronVincent6411 committed Aug 24, 2022
1 parent 8d516a8 commit 668d4f7
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions Advanced Quiz Answers.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Advanced Quiz Answers

**1. When should you use 'replicas'?**

- [:heavy_check_mark:] 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)
- [:heavy_check_mark:] 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
- [:heavy_check_mark:] 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?**

- [:heavy_check_mark:] 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?**

- [:heavy_check_mark:] 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')
- [:heavy_check_mark:] 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.
- [:heavy_check_mark:] 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
- [:heavy_check_mark:] 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?**

- [:heavy_check_mark:] client.dry_run()
- ☐ client.health_check()
- ☐ client.post()
- ☐ client.index()

**10. How can you monitor the Flow?**

- [:heavy_check_mark:] 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

0 comments on commit 668d4f7

Please sign in to comment.