MCPcopy Create free account
hub / github.com/feast-dev/feast / __init__

Method __init__

sdk/python/tests/unit/test_rag_retriever.py:68–80  ·  view source on GitHub ↗
(self, config=None)

Source from the content-addressed store, hash-verified

66 """Mock model for testing."""
67
68 def __init__(self, config=None):
69 if config is None:
70 from transformers import PretrainedConfig
71
72 config = PretrainedConfig()
73 config.hidden_size = 768
74 super().__init__(config)
75 self.config = config
76 import torch
77
78 self.dummy_param = torch.nn.Parameter(torch.zeros(1))
79 self._modules = {} # Required for nn.Module
80 self._device = torch.device("cpu") # Internal device storage
81
82 @property
83 def device(self):

Callers 1

__init__Method · 0.45

Calls 1

deviceMethod · 0.80

Tested by

no test coverage detected