Skip to content
This repository has been archived by the owner on Jul 19, 2024. It is now read-only.

Commit

Permalink
post model changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jasonsoti1 committed Jul 15, 2022
1 parent 9233530 commit 88c1a3e
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 9 deletions.
15 changes: 15 additions & 0 deletions nbactions-JaqpotLocal.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,20 @@
<goals>
<goal>package</goal>
</goals>
<properties>
<JAVA_OPTS>"-Xms2048m -Xmx2048m -XX:MetaspaceSize=2048M -XX:MaxMetaspaceSize=2048m -Djava.net.preferIPv4Stack=true -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"</JAVA_OPTS>
</properties>
</action>
<action>
<actionName>debug</actionName>
<packagings>
<packaging>war</packaging>
</packagings>
<properties>
<exec.args>-Xdebug -Xrunjdwp:transport=dt_socket,server=n,address=${jpda.address}</exec.args>
<jpda.listen>true</jpda.listen>
<netbeans.deploy.debugmode>true</netbeans.deploy.debugmode>
<JAVA_OPTS>"-Xms2048m -Xmx2048m -XX:MetaspaceSize=2048M -XX:MaxMetaspaceSize=2048m -Djava.net.preferIPv4Stack=true -agentlib:jdwp=transport=dt_socket,address=8787,server=y,suspend=n -Djboss.modules.system.pkgs=$JBOSS_MODULES_SYSTEM_PKGS -Djava.awt.headless=true"</JAVA_OPTS>
</properties>
</action>
</actions>
12 changes: 6 additions & 6 deletions src/main/java/org/jaqpot/core/properties/PropertyManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,13 @@ public enum PropertyType {
OCPU_LM_BASE("ocpulm.base", "config", "http://test.jaqpot.org:8004/"),
HTTK_BASE("httk.base", "config", "http://jaqpot.org:8011/"),

// OIDC_ISSUER("oidc.issuer", "config", "https://login.jaqpot.org/auth/realms/jaqpot/"),
// OIDC_CLIENT_ID("oidc.client.id", "config", "jaqpot-api"),
// OIDC_CLIENT_PASS("oidc.client.pass", "config", "9dccac19-23c6-49be-83be-8f07859d263f"),

OIDC_ISSUER("oidc.issuer", "config", "https://login.eosc.jaqpot.org/auth/realms/master/"),
OIDC_ISSUER("oidc.issuer", "config", "https://login.jaqpot.org/auth/realms/jaqpot/"),
OIDC_CLIENT_ID("oidc.client.id", "config", "jaqpot-api"),
OIDC_CLIENT_PASS("oidc.client.pass", "config", "b478b3f8-42d7-43bf-afa1-5370516bb97f"),
OIDC_CLIENT_PASS("oidc.client.pass", "config", "9dccac19-23c6-49be-83be-8f07859d263f"),

// OIDC_ISSUER("oidc.issuer", "config", "https://login.eosc.jaqpot.org/auth/realms/master/"),
// OIDC_CLIENT_ID("oidc.client.id", "config", "jaqpot-api"),
// OIDC_CLIENT_PASS("oidc.client.pass", "config", "b478b3f8-42d7-43bf-afa1-5370516bb97f"),

OIDC_PROVIDER_CONF("oidc.provider.conf", "config", ".well-known/openid-configuration"),
ELASTIC_HOST("elastic.host", "config", "192.168.10.100"),
Expand Down
17 changes: 14 additions & 3 deletions src/main/java/org/jaqpot/core/service/resource/ModelResource.java
Original file line number Diff line number Diff line change
Expand Up @@ -159,10 +159,9 @@ public class ModelResource {
@EJB
PredictionService predictionService;


@EJB
JsonPredictionService jsonPredictionService;

@EJB
FeatureHandler featureHandler;

Expand Down Expand Up @@ -846,7 +845,7 @@ public Response portModelPart(
modelHandler.updateField(parts.getModelId(),
"actualModel", actualModel);
} catch (BsonMaximumSizeExceededException | JaqpotDocumentSizeExceededException | EJBTransactionRolledbackException e) {

LOG.log(Level.INFO, "Model will be stored as parts");
// byte[] bytes = s.toString().getBytes(StandardCharsets.UTF_8);

Expand Down Expand Up @@ -920,6 +919,18 @@ public Response storePretrained(
model.setAlgorithm(algo);
}

if (pretrainedModelRequest.getJaqpotpyDockerVersion() != null) {
String constantPart = "jaqpot-docker-";
String algoId = constantPart + pretrainedModelRequest.getJaqpotpyDockerVersion() + "-pretrained";
Algorithm algo = algoHandler.find(algoId);
model.setAlgorithm(algo);
} else {
String constantPart = "jaqpot-docker-";
String algoId = constantPart + "default-pretrained";
Algorithm algo = algoHandler.find(algoId);
model.setAlgorithm(algo);
}

MetaInfo mf = new MetaInfo();
Set<String> titles = new HashSet();
Set<String> descriptions = new HashSet();
Expand Down

0 comments on commit 88c1a3e

Please sign in to comment.