dmitrievanthony commented on a change in pull request #6001: IGNITE-11137:
IgniteModelStorage improvements for IgniteModel and SQL functionality
URL: https://github.com/apache/ignite/pull/6001#discussion_r253055863
##########
File path: modules/ml/src/main/java/org/apache/ignite/ml/sql/SQLFunctions.java
##########
@@ -17,18 +17,29 @@
package org.apache.ignite.ml.sql;
-import java.util.Arrays;
+import java.util.Collections;
+import java.util.Map;
import org.apache.ignite.cache.query.annotations.QuerySqlFunction;
import org.apache.ignite.ml.inference.IgniteModelStorageUtil;
import org.apache.ignite.ml.inference.Model;
import org.apache.ignite.ml.math.primitives.vector.Vector;
import org.apache.ignite.ml.math.primitives.vector.VectorUtils;
+import org.apache.ignite.ml.util.LRUCache;
/**
* SQL functions that should be defined and passed into cache configuration to
extend list of functions available
* in SQL interface.
*/
public class SQLFunctions {
+ /** Default LRU model cache size. */
+ private static final int LRU_CACHE_SIZE = 10;
+
+ /** Default LRU model cache. */
+ // TODO: IGNITE-11163: Add hart beat tracker to DistributedInfModel.
+ private static final Map<String, Model<Vector, Double>> cache =
Collections.synchronizedMap(
Review comment:
Added thread that clears the cache.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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