vladglinsky commented on issue #27603: [SPARK-30851][ML] Add 'path' field to 
the 'LoadInstanceEnd' ML listener event
URL: https://github.com/apache/spark/pull/27603#issuecomment-587354002
 
 
   This issue can be bypassed by caching loaded instances paths from 
`LoadInstanceStart` events using `reader` instance as a key.
   ```
     private[this] val loadedInstancePaths = new 
mutable.WeakHashMap[MLReader[_], String]()
     ...
     case loadInstanceStart: LoadInstanceStart[_] =>
       loadedInstancePaths.put(loadInstanceStart.reader, loadInstanceStart.path)
   
     case loadInstanceEnd: LoadInstanceEnd[_] =>
       val path = loadedInstancePaths.get(loadInstanceEnd.reader)
     ...
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to