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

Plotting fails when no variable params #169

Closed
chanhosuh opened this issue Jul 22, 2023 · 0 comments · Fixed by #181
Closed

Plotting fails when no variable params #169

chanhosuh opened this issue Jul 22, 2023 · 0 comments · Fixed by #181
Assignees
Labels
bug Something isn't working priority: high

Comments

@chanhosuh
Copy link
Member

When there is only one iteration from ParametrizedPoolIterator, the following error occurs:

Traceback (most recent call last):
  File "/home/runner/work/curvesim/curvesim/.github/workflows/run_sim_request.py", line 33, in <module>
    sim_results.plot(save_as="./results/plots.html")
  File "/home/runner/work/curvesim/curvesim/./curvesim/metrics/results/sim_results.py", line 120, in plot
    return self.plotter.plot(self, summary, data, save_as)
  File "/home/runner/work/curvesim/curvesim/./curvesim/plot/result_plotter.py", line 54, in plot
    chart = self.plot_results(results)
  File "/home/runner/work/curvesim/curvesim/./curvesim/plot/altair/results/result_plotter.py", line 15, in plot_results
    summary = plot_summary(results)
  File "/home/runner/work/curvesim/curvesim/./curvesim/plot/altair/results/result_plotter.py", line 29, in plot_summary
    page = make_page_from_results(results, data_key, axes)
  File "/home/runner/work/curvesim/curvesim/./curvesim/plot/altair/results/make_page.py", line 46, in make_page_from_results
    return make_page(data_dict, config, factor_keys, axes["metric"], selectors)
  File "/home/runner/work/curvesim/curvesim/./curvesim/plot/altair/results/make_page.py", line 103, in make_page
    subplot = make_subplot(cfg, metrics, factors, metric_axis, kwargs)
  File "/home/runner/work/curvesim/curvesim/./curvesim/plot/altair/results/make_page.py", line 1[70](https://github.com/curveresearch/curvesim/actions/runs/5632213294/job/15259937175#step:6:71), in make_subplot
    return make(config, metrics, metric_axis, factors, **kwargs)
  File "/home/runner/work/curvesim/curvesim/./curvesim/plot/altair/results/make_page.py", line 197, in make_single_chart
    tooltip = make_tooltip(chart["encoding"], metric_axis, factors)
  File "/home/runner/work/curvesim/curvesim/./curvesim/plot/altair/results/tooltip.py", line 7, in make_tooltip
    if "timestamp" in encoding["x"]["shorthand"]:
TypeError: argument of type 'UndefinedType' is not iterable

It may be some of the changes I made to fix the failure when there are no variable params and only fixed params are interfering, but they shouldn't(!) since the fix was to just return the pool configured by the fixed params.

@chanhosuh chanhosuh added this to the Cryptopool Sims milestone Jul 22, 2023
@chanhosuh chanhosuh added bug Something isn't working priority: high labels Jul 22, 2023
@chanhosuh chanhosuh mentioned this issue Jul 27, 2023
14 tasks
@nagakingg nagakingg mentioned this issue Jul 28, 2023
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working priority: high
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants