Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 203 for yield4x (0.17 sec)

  1. docs/ru/docs/tutorial/dependencies/dependencies-with-yield.md

       **FastAPI** использует их "под капотом" с этой целью.
    
    ## Зависимости с `yield` и `HTTPException`
    
    Вы видели, что можно использовать зависимости с `yield` совместно с блоком `try`, отлавливающие исключения.
    
    Таким же образом вы можете поднять исключение `HTTPException` или что-то подобное в завершающем коде, после `yield`.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Tue Apr 02 04:21:06 UTC 2024
    - 19.6K bytes
    - Viewed (0)
  2. docs/em/docs/tutorial/dependencies/dependencies-with-yield.md

    ⚫️ 5️⃣📆 😋 🤚 `HTTPException` ⚖️ 🎏 🚪 📟, ⏮️ `yield`. ✋️ **⚫️ 🏆 🚫 👷**.
    
    🚪 📟 🔗 ⏮️ `yield` 🛠️ *⏮️* 📨 📨, [⚠ 🐕‍🦺](../handling-errors.md#_4){.internal-link target=_blank} 🔜 ✔️ ⏪ 🏃. 📤 🕳 😽 ⚠ 🚮 👆 🔗 🚪 📟 (⏮️ `yield`).
    
    , 🚥 👆 🤚 `HTTPException` ⏮️ `yield`, 🔢 (⚖️ 🙆 🛃) ⚠ 🐕‍🦺 👈 ✊ `HTTPException`Ⓜ & 📨 🇺🇸🔍 4️⃣0️⃣0️⃣ 📨 🏆 🚫 📤 ✊ 👈 ⚠ 🚫🔜.
    
    👉 ⚫️❔ ✔ 🕳 ⚒ 🔗 (✅ 💽 🎉), 🖼, ⚙️ 🖥 📋.
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 8.6K bytes
    - Viewed (0)
  3. docs/zh/docs/tutorial/dependencies/dependencies-with-yield.md

    在 `yield` 后抛出 `HTTPException` 或类似的异常是很诱人的,但是**这不起作用**。
    
    带有`yield`的依赖中的退出代码在响应发送之后执行,因此[异常处理程序](../handling-errors.md#install-custom-exception-handlers){.internal-link target=_blank}已经运行过。没有任何东西可以捕获退出代码(在`yield`之后)中的依赖抛出的异常。
    
    所以,如果在`yield`之后抛出`HTTPException`,默认(或任何自定义)异常处理程序捕获`HTTPException`并返回HTTP 400响应的机制将不再能够捕获该异常。
    
    这就是允许在依赖中设置的任何东西(例如数据库会话(DB session))可以被后台任务使用的原因。
    
    后台任务在响应发送之后运行。因此,无法触发`HTTPException`,因为甚至没有办法更改*已发送*的响应。
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 10.3K bytes
    - Viewed (0)
  4. docs/ja/docs/tutorial/dependencies/dependencies-with-yield.md

        **FastAPI** はこれを実現するために内部的に使用しています。
    
    ## `yield`と`HTTPException`を持つ依存関係
    
    `yield`と例外をキャッチする`try`ブロックを持つことができる依存関係を使用することができることがわかりました。
    
    `yield`の後の終了コードで`HTTPException`などを発生させたくなるかもしれません。しかし**それはうまくいきません**
    
    `yield`を持つ依存関係の終了コードは[例外ハンドラ](../handling-errors.md#_4){.internal-link target=_blank}の*後に*実行されます。依存関係によって投げられた例外を終了コード(`yield`の後)でキャッチするものはなにもありません。
    
    Registered: Mon Jun 17 08:32:26 UTC 2024
    - Last Modified: Thu Apr 18 19:53:19 UTC 2024
    - 12.5K bytes
    - Viewed (0)
  5. tensorflow/compiler/mlir/tensorflow/ir/tf_executor.cc

      Operation &yield = island.GetBody().back();
      if (!isa<YieldOp>(yield))
        return yield.emitOpError()
               << "invalid tf_executor.island terminator, yield expected";
    
      // Ensure that the yield terminator operands matches the island results type.
      int result_count = island.getNumResults() - 1;  // -1 for the control token
      const int num_operands = yield.getNumOperands();
      if (num_operands != result_count)
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  6. tensorflow/compiler/mlir/tensorflow/transforms/executor_island_coarsening.cc

        // Add associated inner op result to operands of the YieldOp.
        yield_operands.push_back(old_result.inner_op_result);
      }
    
      // Create YieldOp for the new island.
      OpBuilder builder(&new_island.GetBody(), new_island.GetBody().end());
      return builder.create<YieldOp>(new_island.getLoc(), yield_operands);
    }
    
    // Moves inner ops (excluding last op/YieldOp) from islands being merged into
    // the new merged island.
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 19.7K bytes
    - Viewed (0)
  7. tensorflow/compiler/mlir/tensorflow/transforms/region_control_flow_to_functional.cc

      //   r0, r1, ..., rN = func.call @foo(arg0, arg1, ..., argN)
      //   "tf.yield"(r0, r1, ..., rN)
      if (!region.hasOneBlock()) return std::nullopt;
      Block& block = region.front();
      if (std::distance(block.begin(), block.end()) != 2) return std::nullopt;
      TF::YieldOp yield =
          llvm::dyn_cast_or_null<TF::YieldOp>(block.getTerminator());
      if (!yield) return std::nullopt;
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 28.7K bytes
    - Viewed (0)
  8. tensorflow/compiler/mlir/tensorflow/transforms/executor_tpuv1_outline_tpu_island.cc

        outlined_func.setNested();
    
        // We will "steal" the body of the island and replace it with a call to the
        // new function later.
        {
          YieldOp yield_op = island_op.GetYield();
          outlined_func.getBody().takeBody(island_op.getBody());
    
          // Replace the yield with a return
          OpBuilder replacer(yield_op);
          island_op.getBody().push_back(new Block);
          replacer.create<mlir::func::ReturnOp>(yield_op.getLoc(),
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 8.7K bytes
    - Viewed (0)
  9. tensorflow/compiler/mlir/lite/transforms/while_loop_outline.cc

    // to functions).
    bool IsAlreadyOutlined(WhileOp while_op) {
      auto just_call = [](Region& region) {
        auto it = region.front().begin();
        if (!isa<func::CallOp>(*it)) return false;
        ++it;
        if (!isa<YieldOp>(*it)) return false;
        return true;
      };
      return just_call(while_op.getBody()) && just_call(while_op.getCond());
    }
    
    bool IsCompatibleTypeWithTFLCastOp(Type type) {
      auto elemType = getElementTypeOrSelf(type);
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  10. tensorflow/compiler/mlir/tensorflow/transforms/functional_control_flow_to_regions.cc

    // the call arguments, and terminate the region with a yield. The arguments are
    // cast to the required type before the call. `use_region_args` control whether
    // the input arguments are used as is (for IfOp) or block arguments of the same
    // type as the input arguments are created and then used as call arguments (for
    // While).
    YieldOp CreateCall(Operation* op, func::FuncOp func, Region& caller_region,
    Registered: Sun Jun 16 05:45:23 UTC 2024
    - Last Modified: Thu Apr 25 16:01:03 UTC 2024
    - 11K bytes
    - Viewed (0)
Back to top