MCPcopy Create free account
hub / github.com/OpenDCAI/DataFlow-MM / _get_cache_file_path

Method _get_cache_file_path

dataflow/utils/storage.py:88–96  ·  view source on GitHub ↗
(self, step)

Source from the content-addressed store, hash-verified

86 self.logger = get_logger()
87
88 def _get_cache_file_path(self, step) -> str:
89 if step == -1:
90 self.logger.error("You must call storage.step() before reading or writing data. Please call storage.step() first for each operator step.")
91 raise ValueError("You must call storage.step() before reading or writing data. Please call storage.step() first for each operator step.")
92 if step == 0:
93 # If it's the first step, use the first entry file name
94 return os.path.join(self.first_entry_file_name)
95 else:
96 return os.path.join(self.cache_path, f"{self.file_name_prefix}_step{step}.{self.cache_type}")
97
98 def step(self):
99 self.operator_step += 1

Callers 2

readMethod · 0.95
writeMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected