1616 nvmlShutdown ,
1717)
1818from .runtime import get_execution_context
19- from .state import get_property , set_property
2019
2120
2221def _uuid4 () -> str :
@@ -256,50 +255,6 @@ def _get_runtime_environment() -> Optional[str]:
256255 return exec_context .environment
257256
258257
259- @lru_cache (maxsize = 1 )
260- def _get_install_id () -> str :
261- """Get or create the install ID. If not set in disk-cached
262- state, generate a new one and store it in the state.
263-
264- Returns:
265- str: The install ID.
266- """
267- install_id = get_property ("install_id" )
268-
269- # Fallback to new install ID
270- if install_id is None :
271- install_id = _uuid4 ()
272- set_property ("install_id" , install_id )
273-
274- return install_id
275-
276-
277- @lru_cache (maxsize = 1 )
278- def _get_install_date () -> str :
279- """Return the install date as YYYY-MM-DD.
280-
281- In case the user was using TabPFN before this change was made,
282- the install date will not correspond to the actual install date,
283- but rather when the user upgraded the page and made a first call.
284-
285- Returns:
286- str: The install date as YYYY-MM-DD.
287- """
288- value = get_property ("install_date" )
289-
290- if isinstance (value , str ):
291- try :
292- dt = datetime .fromisoformat (value .replace ("Z" , "+00:00" ))
293- return dt .date ().isoformat ()
294- except ValueError :
295- pass
296-
297- # Fallback to current date
298- value = _utc_now_date ()
299- set_property ("install_date" , value )
300- return value
301-
302-
303258@dataclass
304259class BaseTelemetryEvent :
305260 """
@@ -355,12 +310,6 @@ class SessionEvent(BaseTelemetryEvent):
355310 is a single init call to TabPFNClassifier or TabPFNRegressor.
356311 """
357312
358- # Install ID of the user
359- install_id : str = field (default_factory = _get_install_id , init = False )
360-
361- # Install date of the user
362- install_date : str = field (default_factory = _get_install_date , init = False )
363-
364313 @property
365314 def name (self ) -> str :
366315 return "session"
@@ -375,9 +324,6 @@ class ModelLoadEvent(BaseTelemetryEvent):
375324 # Status of the model download attempt
376325 status : Literal ["success" , "failed" ]
377326
378- # Install ID of the user
379- install_id : str = field (default_factory = _get_install_id , init = False )
380-
381327 # Name of the model, may be a HuggingFace repo ID
382328 model_name : Optional [str ] = field (default = None )
383329
@@ -439,9 +385,6 @@ class ModelCallEvent(BaseTelemetryEvent):
439385 # Task associated with the model call
440386 task : Literal ["classification" , "regression" ]
441387
442- # Install ID of the user
443- install_id : str = field (default_factory = _get_install_id , init = False )
444-
445388 # Version of the PyTorch
446389 torch_version : str = field (default_factory = _get_torch_version , init = False )
447390
0 commit comments