MCPcopy Index your code
hub / github.com/feast-dev/feast / start_phase

Method start_phase

sdk/python/feast/diff/apply_progress.py:93–125  ·  view source on GitHub ↗

Start tracking a new phase. Args: phase_name: Human-readable name of the phase operations_count: Number of operations in this phase (0 for unknown)

(self, phase_name: str, operations_count: int = 0)

Source from the content-addressed store, hash-verified

91 self.overall_progress = None
92
93 def start_phase(self, phase_name: str, operations_count: int = 0):
94 """
95 Start tracking a new phase.
96
97 Args:
98 phase_name: Human-readable name of the phase
99 operations_count: Number of operations in this phase (0 for unknown)
100 """
101 if not self.tty_available:
102 return
103
104 self.current_phase = phase_name
105
106 # Close previous phase progress if exists
107 if self.phase_progress:
108 try:
109 self.phase_progress.close()
110 except (AttributeError, TypeError):
111 pass
112 self.phase_progress = None
113
114 # Create new phase progress bar if operations are known
115 if operations_count > 0:
116 try:
117 self.phase_progress = create_positioned_tqdm(
118 position=self.PHASE_POSITION,
119 description=phase_name,
120 total=operations_count,
121 color=get_color_for_phase(phase_name.lower()),
122 )
123 except (TypeError, AttributeError):
124 # Handle case where fallback functions don't work as expected
125 self.phase_progress = None
126
127 def update_phase_progress(self, description: Optional[str] = None):
128 """

Callers 1

_apply_diffsMethod · 0.80

Calls 3

create_positioned_tqdmFunction · 0.85
get_color_for_phaseFunction · 0.85
closeMethod · 0.45

Tested by

no test coverage detected