Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
Hi! Ever Since There Was A Huge Frontend Upgrade (A Few Weeks Ago?), We’Ve Been Having Problems With Plotly 3D Scatter Plots For Which

Hi! Ever since there was a huge frontend upgrade (a few weeks ago?), we’ve been having problems with plotly 3D scatter plots for which aspectmode="data" is no longer respected (not the same aspect ratio for x/y/z axes). Anyone experiencing a similar issue?

  
  
Posted 5 days ago
Votes Newest

Answers 7


None issue created on GH

  
  
Posted 3 days ago

In the notebook, we can see that aspectmode="data" is properly respected, but the frontend seems to be discarding the scene layout

  
  
Posted 5 days ago

Hi NonchalantWhale65 , can you provide a short code snippet that reproduces the problematic behaviour?

  
  
Posted 5 days ago

Hi CostlyOstrich36 , sure I’ll do that ASAP

  
  
Posted 5 days ago

The repro code:

import uuid

import numpy as np
from clearml import Task
from plotly import graph_objects as go

def start_clearml():
    task_name = f"debug_plotsR{uuid.uuid1().hex}"
    _clearml_init = dict(
        project_name="debug_clearml_plots",
        task_name=task_name,
        tags=["debug"],
        reuse_last_task_id=False,
    )
    task = Task.init(**_clearml_init)
    return task

def repro_code(n: int = 1000):
    task = start_clearml()
    logger = task.get_logger()

    # Dummy point cloud
    xyz = np.zeros((n, 3), dtype=float)
    xyz[:, 0] = np.random.uniform(-100, 100, n)
    xyz[:, 1] = np.random.uniform(-30, 60, n)
    xyz[:, 2] = np.random.uniform(0, 20, n)

    color = np.zeros((n, 3), dtype=np.uint8)
    color[:, 0] = np.random.randint(0, 255, size=n, dtype=np.uint8)
    color[:, 1] = np.random.randint(0, 255, size=n, dtype=np.uint8)
    color[:, 2] = np.random.randint(0, 255, size=n, dtype=np.uint8)

    data = [go.Scatter3d(
        x=xyz[:, 0],
        y=xyz[:, 1],
        z=xyz[:, 2],
        mode="markers",
        name="random_points",
        marker=dict(color=color, size=1),
    )]

    fig = go.Figure(data=data)
    fig.update_layout(
        scene=dict(
            aspectmode="data",
        )
    )

    logger.report_plotly(
        title="Example",
        series="xyzrgb",
        iteration=0,
        figure=fig,
    )
    
    task.flush(wait_for_uploads=True)
    task.close()

    return fig

fig = repro_code()

What we get displaying fig in a notebook:
image

  
  
Posted 5 days ago

But what we can in the ClearML frontend:
image

  
  
Posted 5 days ago

It used to work a few weeks ago, before the huge frontend change

  
  
Posted 5 days ago
44 Views
7 Answers
5 days ago
2 days ago
Tags