Skip to content

Commit

Permalink
Merge pull request #646 from zinggAI/featureOrder
Browse files Browse the repository at this point in the history
ensuring order of features
  • Loading branch information
sonalgoyal committed Aug 17, 2023
2 parents 52c7b4d + 3fe732f commit 272a8fe
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions common/core/src/main/java/zingg/common/core/util/ModelUtil.java
@@ -1,4 +1,10 @@
package zingg.common.core.util;
import java.util.LinkedHashMap;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;

import zingg.common.client.Arguments;
import zingg.common.client.FieldDefinition;
import zingg.common.client.MatchType;
Expand All @@ -10,12 +16,6 @@
import zingg.common.core.feature.FeatureFactory;
import zingg.common.core.model.Model;

import java.util.HashMap;
import java.util.Map;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;


public abstract class ModelUtil<S,T, D,R,C> {

Expand All @@ -29,7 +29,7 @@ public void loadFeatures(Arguments args) throws ZinggClientException {
try{
LOG.info("Start reading internal configurations and functions");
if (args.getFieldDefinition() != null) {
featurers = new HashMap<FieldDefinition, Feature<T>>();
featurers = new LinkedHashMap<FieldDefinition, Feature<T>>();
for (FieldDefinition def : args.getFieldDefinition()) {
if (! (def.getMatchType() == null || def.getMatchType().contains(MatchType.DONT_USE))) {
Feature fea = (Feature) getFeatureFactory().get(def.getDataType());
Expand Down

0 comments on commit 272a8fe

Please sign in to comment.