Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Workflow with JSON schema fails to launch console error #1718

Closed
2 tasks done
kumare3 opened this issue Oct 20, 2021 · 0 comments · Fixed by flyteorg/flyteconsole#233
Closed
2 tasks done

[BUG] Workflow with JSON schema fails to launch console error #1718

kumare3 opened this issue Oct 20, 2021 · 0 comments · Fixed by flyteorg/flyteconsole#233
Assignees
Labels
bug Something isn't working ui Admin console user interface
Milestone

Comments

@kumare3
Copy link
Contributor

kumare3 commented Oct 20, 2021

Describe the bug

Screen Shot 2021-10-19 at 9 55 01 PM

Stack trace in console

main-ae1a535b.js:1 SyntaxError: Unexpected end of JSON input
    at JSON.parse (<anonymous>)
    at t.StructInput (main-ae1a535b.js:1)
    at we (react-dom.production.min.js:84)
    at zj (react-dom.production.min.js:226)
    at Th (react-dom.production.min.js:152)
    at tj (react-dom.production.min.js:152)
    at Te (react-dom.production.min.js:146)
    at react-dom.production.min.js:61
    at unstable_runWithPriority (react.production.min.js:25)
    at Da (react-dom.production.min.js:60) 
{componentStack: '\n    in Unknown\n    in div\n    in g\n    in section…v\n    in t\n    in u\n    in Unknown\n    in Unknown'}
componentStack: "\n    in Unknown\n    in div\n    in g\n    in section\n    in ForwardRef\n    in div\n    in ForwardRef\n    in ForwardRef\n    in Unknown\n    in Unknown\n    in div\n    in ForwardRef\n    in ForwardRef\n    in div\n    in t\n    in ForwardRef\n    in Unknown\n    in div\n    in ForwardRef\n    in ForwardRef\n    in ForwardRef\n    in ForwardRef\n    in l\n    in Unknown\n    in Unknown\n    in Unknown\n    in Unknown\n    in l\n    in div\n    in Unknown\n    in Unknown\n    in t\n    in t\n    in Unknown\n    in l\n    in t\n    in div\n    in t\n    in u\n    in Unknown\n    in Unknown"
[[Prototype]]: Object

It seems like the problem stems from the the nested json schema

{
    "type": {
        "simple": "STRUCT",
        "metadata": {
            "$ref": "#/definitions/HyperparametersSchema",
            "$schema": "http://json-schema.org/draft-07/schema#",
            "definitions": {
                "HyperparametersSchema": {
                    "additionalProperties": false,
                    "properties": {
                        "backend": {
                            "default": "gloo",
                            "title": "backend",
                            "type": "string"
                        },
                        "batch_size": {
                            "default": 64,
                            "format": "integer",
                            "title": "batch_size",
                            "type": "number"
                        },
                        "epochs": {
                            "default": 10,
                            "format": "integer",
                            "title": "epochs",
                            "type": "number"
                        },
                        "learning_rate": {
                            "default": 0.01,
                            "format": "float",
                            "title": "learning_rate",
                            "type": "number"
                        },
                        "log_interval": {
                            "default": 10,
                            "format": "integer",
                            "title": "log_interval",
                            "type": "number"
                        },
                        "seed": {
                            "default": 1,
                            "format": "integer",
                            "title": "seed",
                            "type": "number"
                        },
                        "sgd_momentum": {
                            "default": 0.5,
                            "format": "float",
                            "title": "sgd_momentum",
                            "type": "number"
                        },
                        "test_batch_size": {
                            "default": 1000,
                            "format": "integer",
                            "title": "test_batch_size",
                            "type": "number"
                        }
                    },
                    "type": "object"
                }
            }
        }
    },
    "description": "hp"
}

Expected behavior

Launch should work as expected

Additional context to reproduce

This happens for example in flytesnacks.
https://docs.flyte.org/projects/cookbook/en/latest/auto/integrations/kubernetes/kfpytorch/pytorch_mnist.html#training-hyperparameters

Screenshots

No response

Are you sure this issue hasn't been raised already?

  • Yes

Have you read the Code of Conduct?

  • Yes
@kumare3 kumare3 added bug Something isn't working ui Admin console user interface labels Oct 20, 2021
@EngHabu EngHabu added this to the 0.18.1 milestone Oct 20, 2021
@Pianist038801 Pianist038801 self-assigned this Oct 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ui Admin console user interface
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants