mirror of
https://github.com/NousResearch/atropos.git
synced 2026-04-30 17:40:36 +00:00
Remove dependency on torch for default installation
This commit is contained in:
parent
706097db21
commit
727c7ba640
5 changed files with 57 additions and 47 deletions
|
|
@ -4,7 +4,17 @@ import logging
|
|||
from typing import Any, List, Optional, Union
|
||||
|
||||
import scipy
|
||||
import torch
|
||||
|
||||
try:
|
||||
import torch
|
||||
except ImportError as e:
|
||||
logger = logging.getLogger(__name__)
|
||||
logger.warning(
|
||||
"torch not installed, please install atroposlib[rewardfns] to use this reward function"
|
||||
)
|
||||
raise e
|
||||
|
||||
|
||||
from transformers import AutoModel, AutoTokenizer
|
||||
|
||||
from .registry import registry
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue