Move the model to the specified device. Args: device (str): The device to move the model to. Returns: None
(device)
| 429 | |
| 430 | |
| 431 | def move_to(device): |
| 432 | """ |
| 433 | Move the model to the specified device. |
| 434 | |
| 435 | Args: |
| 436 | device (str): The device to move the model to. |
| 437 | |
| 438 | Returns: |
| 439 | None |
| 440 | """ |
| 441 | global _llm,_tokenizer |
| 442 | if _llm is None: |
| 443 | raise ValueError("Error, LLM is not initialized.") |
| 444 | _llm = _llm.to(device) |
| 445 | if _processor is None: |
| 446 | raise ValueError("Error, Processor is not initialized.") |
| 447 | if _tokenizer is None: |
| 448 | raise ValueError("Error, Tokenizer is not initialized.") |
| 449 | return f"Moved to {device}" |
| 450 | |
| 451 | |
| 452 | def process_data(episode:Dict, |
nothing calls this directly
no outgoing calls
no test coverage detected