Thread
#prefect-ui
    Atsushi Saito

    Atsushi Saito

    5 months ago
    Hi, folks, a work flow finished correctly but UI does not show anything.
    Kevin Kho

    Kevin Kho

    5 months ago
    Hey @Atsushi Saito, could you move the log to this thread to keep the main channel cleaner? I think you just did
    flow.run()
    .
    flow.run()
    is for local testing and does not appear on Cloud/Server. You need to register it and run it with an agent. Check this tutorial onwards
    Atsushi Saito

    Atsushi Saito

    5 months ago
    > python pref.py
    [2022-04-08 02:20:16+0900] INFO - prefect.FlowRunner | Beginning Flow run for 'dvc-exam'
    [2022-04-08 02:20:16+0900] INFO - prefect.TaskRunner | Task 'raw_data_path': Starting task run...
    [2022-04-08 02:20:16+0900] INFO - prefect.TaskRunner | Task 'raw_data_path': Finished task run for task with final state: 'Success'
    [2022-04-08 02:20:16+0900] INFO - prefect.TaskRunner | Task 's3_url': Starting task run...
    [2022-04-08 02:20:16+0900] INFO - prefect.TaskRunner | Task 's3_url': Finished task run for task with final state: 'Success'
    [2022-04-08 02:20:16+0900] INFO - prefect.TaskRunner | Task 'prepare': Starting task run...
    [2022-04-08 02:20:18+0900] INFO - prefect.TaskRunner | Task 'prepare': Finished task run for task with final state: 'Success'
    [2022-04-08 02:20:18+0900] INFO - prefect.TaskRunner | Task 'aws_profile': Starting task run...
    [2022-04-08 02:20:18+0900] INFO - prefect.TaskRunner | Task 'aws_profile': Finished task run for task with final state: 'Success'
    [2022-04-08 02:20:18+0900] INFO - prefect.TaskRunner | Task 'format_command': Starting task run...
    [2022-04-08 02:20:18+0900] INFO - prefect.TaskRunner | Task 'format_command': Finished task run for task with final state: 'Success'
    [2022-04-08 02:20:18+0900] INFO - prefect.TaskRunner | Task 'ShellTask': Starting task run...
    [2022-04-08 02:20:20+0900] INFO - prefect.TaskRunner | Task 'ShellTask': Finished task run for task with final state: 'Success'
    [2022-04-08 02:20:20+0900] INFO - prefect.TaskRunner | Task 'featurize': Starting task run...
    The input data frame ./data/prepared/train.tsv size is (20017, 3)
    The output matrix data/features/train.pkl size is (20017, 3002) and data type is float64
    The input data frame ./data/prepared/test.tsv size is (4983, 3)
    The output matrix data/features/test.pkl size is (4983, 3002) and data type is float64
    [2022-04-08 02:20:36+0900] INFO - prefect.TaskRunner | Task 'featurize': Finished task run for task with final state: 'Success'
    [2022-04-08 02:20:36+0900] INFO - prefect.TaskRunner | Task 'train': Starting task run...
    Input matrix size (20017, 3002)
    X matrix size (20017, 3000)
    Y matrix size (20017,)
    [2022-04-08 02:20:40+0900] INFO - prefect.TaskRunner | Task 'train': Finished task run for task with final state: 'Success'
    [2022-04-08 02:20:40+0900] INFO - prefect.TaskRunner | Task 'evaluate': Starting task run...
    [2022-04-08 02:20:41+0900] INFO - prefect.TaskRunner | Task 'evaluate': Finished task run for task with final state: 'Success'
    [2022-04-08 02:20:41+0900] INFO - prefect.TaskRunner | Task 'evaluate[1]': Starting task run...
    [2022-04-08 02:20:41+0900] INFO - prefect.TaskRunner | Task 'evaluate[1]': Finished task run for task with final state: 'Success'
    [2022-04-08 02:20:41+0900] INFO - prefect.TaskRunner | Task 'evaluate[2]': Starting task run...
    [2022-04-08 02:20:41+0900] INFO - prefect.TaskRunner | Task 'evaluate[2]': Finished task run for task with final state: 'Success'
    [2022-04-08 02:20:41+0900] INFO - prefect.TaskRunner | Task 'evaluate[0]': Starting task run...
    [2022-04-08 02:20:41+0900] INFO - prefect.TaskRunner | Task 'evaluate[0]': Finished task run for task with final state: 'Success'
    [2022-04-08 02:20:41+0900] INFO - prefect.FlowRunner | Flow run SUCCESS: all reference tasks succeeded
    Kevin Kho

    Kevin Kho

    5 months ago
    Thank you!
    Atsushi Saito

    Atsushi Saito

    5 months ago
    @Kevin Kho Thank you for you comments. I’ve found that ui-port might be a cause. Commands what I’ve done on the terminals are follows. OS: ubuntu 18.04 python: 3.8.13 After creating a project named
    tutorial
    , Terminal 1:
    prefect server start --ui-port 2222
    Termnal 2:
    prefect agent local start
    Terminal 3:
    python flow.py
    for the following source.
    import prefect
    from prefect import task, Flow
    
    @task
    def say_hello():
        logger = prefect.context.get("logger")
        <http://logger.info|logger.info>("Hello, Cloud!")
    
    with Flow("hello-flow") as flow:
        say_hello()
    
    # Register the flow under the "tutorial" project
    flow.register(project_name="tutorial")
    terminal 3 shows the port 8080 which is default but is different from --ui-port
    Flow URL: <http://localhost:8080/default/flow/ebf8a573-403a-4928-96ea-098dd1d5ca93>
     └── ID: 42af3ef7-918e-4f03-ae5b-57a881fc87ec
     └── Project: tutorial
    The wget for the port 2222 outputs some html files, but
    <http://localhost:2222>
    shows nothing.
    wget <http://localhost:2222/default/flow/ebf8a573-403a-4928-96ea-098dd1d5ca93>
    Kevin Kho

    Kevin Kho

    5 months ago
    Ok so the terminal 3 message pulls the UI URL in this line, which pulls it from the config.toml so you should need to change this to match the 2222. What does your config.toml look like? I think you should still be able to access the UI though
    I expect at least one of
    <http://localhost:8080>
    or
    <http://localhost:2222>
    to work
    I also didn’t know you were on server when you first posted. Just want to make sure you know Prefect Cloud is a lot easier to get started with because we host all the services and the free tier has 20k task runs per month.