Skip to content

Commit

Permalink
feat: update run specs to exclude embedded function from schema gener…
Browse files Browse the repository at this point in the history
…ation
  • Loading branch information
matteo-s committed Sep 5, 2024
1 parent c5e1664 commit 69982c3
Show file tree
Hide file tree
Showing 9 changed files with 18 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.fasterxml.jackson.annotation.JsonUnwrapped;
import it.smartcommunitylabdhub.commons.annotations.common.SpecType;
import it.smartcommunitylabdhub.commons.jackson.annotations.JsonSchemaIgnore;
import it.smartcommunitylabdhub.commons.models.entities.run.RunBaseSpec;
import it.smartcommunitylabdhub.commons.models.enums.EntityName;
import it.smartcommunitylabdhub.runtime.container.ContainerRuntime;
Expand Down Expand Up @@ -35,6 +36,7 @@ public class ContainerRunSpec extends RunBaseSpec {
private ContainerBuildTaskSpec taskBuildSpec;

// @JsonProperty("function_spec")
@JsonSchemaIgnore
@JsonUnwrapped
private ContainerFunctionSpec functionSpec;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.fasterxml.jackson.annotation.JsonUnwrapped;
import it.smartcommunitylabdhub.commons.annotations.common.SpecType;
import it.smartcommunitylabdhub.commons.jackson.annotations.JsonSchemaIgnore;
import it.smartcommunitylabdhub.commons.models.entities.run.RunBaseSpec;
import it.smartcommunitylabdhub.commons.models.enums.EntityName;
import it.smartcommunitylabdhub.runtime.dbt.DbtRuntime;
Expand Down Expand Up @@ -29,6 +30,7 @@ public class DbtRunSpec extends RunBaseSpec {
@JsonUnwrapped
private DbtTransformSpec taskSpec;

@JsonSchemaIgnore
@JsonUnwrapped
private DbtFunctionSpec functionSpec;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.fasterxml.jackson.annotation.JsonUnwrapped;
import it.smartcommunitylabdhub.commons.annotations.common.SpecType;
import it.smartcommunitylabdhub.commons.jackson.annotations.JsonSchemaIgnore;
import it.smartcommunitylabdhub.commons.models.entities.run.RunBaseSpec;
import it.smartcommunitylabdhub.commons.models.enums.EntityName;
import it.smartcommunitylabdhub.runtime.kfp.KFPRuntime;
Expand All @@ -27,6 +28,7 @@ public class KFPRunSpec extends RunBaseSpec {
private Map<String, Serializable> parameters = new HashMap<>();

// @JsonProperty("workflow_spec")
@JsonSchemaIgnore
@JsonUnwrapped
private KFPWorkflowSpec workflowSpec;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.fasterxml.jackson.annotation.JsonUnwrapped;
import it.smartcommunitylabdhub.commons.annotations.common.SpecType;
import it.smartcommunitylabdhub.commons.jackson.annotations.JsonSchemaIgnore;
import it.smartcommunitylabdhub.commons.models.entities.run.RunBaseSpec;
import it.smartcommunitylabdhub.commons.models.enums.EntityName;
import it.smartcommunitylabdhub.runtime.mlrun.MlrunRuntime;
Expand Down Expand Up @@ -35,6 +36,7 @@ public class MlrunRunSpec extends RunBaseSpec {
private MlrunBuildTaskSpec buildSpec;

// @JsonProperty("function_spec")
@JsonSchemaIgnore
@JsonUnwrapped
private MlrunFunctionSpec functionSpec;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.fasterxml.jackson.annotation.JsonUnwrapped;
import it.smartcommunitylabdhub.commons.annotations.common.SpecType;
import it.smartcommunitylabdhub.commons.jackson.annotations.JsonSchemaIgnore;
import it.smartcommunitylabdhub.commons.models.entities.run.RunBaseSpec;
import it.smartcommunitylabdhub.commons.models.enums.EntityName;
import it.smartcommunitylabdhub.runtime.huggingface.HuggingfaceServeRuntime;
Expand All @@ -17,6 +18,7 @@
@SpecType(runtime = HuggingfaceServeRuntime.RUNTIME, kind = HuggingfaceServeRunSpec.KIND, entity = EntityName.RUN)
public class HuggingfaceServeRunSpec extends RunBaseSpec {

@JsonSchemaIgnore
@JsonUnwrapped
private HuggingfaceServeFunctionSpec functionSpec;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.fasterxml.jackson.annotation.JsonUnwrapped;
import it.smartcommunitylabdhub.commons.annotations.common.SpecType;
import it.smartcommunitylabdhub.commons.jackson.annotations.JsonSchemaIgnore;
import it.smartcommunitylabdhub.commons.models.entities.run.RunBaseSpec;
import it.smartcommunitylabdhub.commons.models.enums.EntityName;
import it.smartcommunitylabdhub.runtime.mlflow.MlflowServeRuntime;
Expand All @@ -19,6 +20,7 @@ public class MlflowServeRunSpec extends RunBaseSpec {

public static final String KIND = MlflowServeRuntime.RUNTIME + "+run";

@JsonSchemaIgnore
@JsonUnwrapped
private MlflowServeFunctionSpec functionSpec;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.fasterxml.jackson.annotation.JsonUnwrapped;
import it.smartcommunitylabdhub.commons.annotations.common.SpecType;
import it.smartcommunitylabdhub.commons.jackson.annotations.JsonSchemaIgnore;
import it.smartcommunitylabdhub.commons.models.entities.run.RunBaseSpec;
import it.smartcommunitylabdhub.commons.models.enums.EntityName;
import it.smartcommunitylabdhub.runtime.sklearn.SklearnServeRuntime;
Expand All @@ -17,6 +18,7 @@
@SpecType(runtime = SklearnServeRuntime.RUNTIME, kind = SklearnServeRunSpec.KIND, entity = EntityName.RUN)
public class SklearnServeRunSpec extends RunBaseSpec {

@JsonSchemaIgnore
@JsonUnwrapped
private SklearnServeFunctionSpec functionSpec;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.fasterxml.jackson.annotation.JsonUnwrapped;
import it.smartcommunitylabdhub.commons.annotations.common.SpecType;
import it.smartcommunitylabdhub.commons.jackson.annotations.JsonSchemaIgnore;
import it.smartcommunitylabdhub.commons.models.entities.run.RunBaseSpec;
import it.smartcommunitylabdhub.commons.models.enums.EntityName;
import it.smartcommunitylabdhub.runtime.nefertem.NefertemRuntime;
Expand Down Expand Up @@ -38,6 +39,7 @@ public class NefertemRunSpec extends RunBaseSpec {
@JsonUnwrapped
private NefertemValidateTaskSpec taskValidateSpec;

@JsonSchemaIgnore
@JsonUnwrapped
private NefertemFunctionSpec functionSpec;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.fasterxml.jackson.annotation.JsonUnwrapped;
import it.smartcommunitylabdhub.commons.annotations.common.SpecType;
import it.smartcommunitylabdhub.commons.jackson.annotations.JsonSchemaIgnore;
import it.smartcommunitylabdhub.commons.models.entities.run.RunBaseSpec;
import it.smartcommunitylabdhub.commons.models.enums.EntityName;
import it.smartcommunitylabdhub.runtime.python.PythonRuntime;
Expand Down Expand Up @@ -29,6 +30,7 @@ public class PythonRunSpec extends RunBaseSpec {
@JsonUnwrapped
private PythonBuildTaskSpec taskBuildSpec;

@JsonSchemaIgnore
@JsonUnwrapped
private PythonFunctionSpec functionSpec;

Expand Down

0 comments on commit 69982c3

Please sign in to comment.