From 5d387b884954d863826cd810ccf9840f5ef03964 Mon Sep 17 00:00:00 2001 From: Florian Verdonck Date: Tue, 1 Oct 2024 09:42:01 +0200 Subject: [PATCH] Fix Test log inputs with large inputs limit check https://github.com/jgiannuzzi/mlflow-go/pull/47 Signed-off-by: nojaf --- .github/workflows/test.yml | 2 +- pkg/entities/dataset.go | 18 +++++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 7f910dda..0becdece 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -56,4 +56,4 @@ jobs: - name: Run integration tests run: mage test:python # Temporary workaround for failing tests - continue-on-error: true + continue-on-error: ${{ matrix.runner != 'ubuntu-latest' }} diff --git a/pkg/entities/dataset.go b/pkg/entities/dataset.go index e12ffb94..c0fe7e23 100644 --- a/pkg/entities/dataset.go +++ b/pkg/entities/dataset.go @@ -1,6 +1,8 @@ package entities -import "github.com/mlflow/mlflow-go/pkg/protos" +import ( + "github.com/mlflow/mlflow-go/pkg/protos" +) type Dataset struct { Name string @@ -12,12 +14,22 @@ type Dataset struct { } func (d *Dataset) ToProto() *protos.Dataset { + var schema *string + if d.Schema != "" { + schema = &d.Schema + } + + var profile *string + if d.Profile != "" { + profile = &d.Profile + } + return &protos.Dataset{ Name: &d.Name, Digest: &d.Digest, SourceType: &d.SourceType, Source: &d.Source, - Schema: &d.Schema, - Profile: &d.Profile, + Schema: schema, + Profile: profile, } }