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

multimethod.DispatchError occurs with multimethod 2.0 #209

Open
2 tasks done
iwatake2222 opened this issue Dec 31, 2024 · 0 comments
Open
2 tasks done

multimethod.DispatchError occurs with multimethod 2.0 #209

iwatake2222 opened this issue Dec 31, 2024 · 0 comments
Assignees
Labels
bug Something isn't working

Comments

@iwatake2222
Copy link

iwatake2222 commented Dec 31, 2024

Checklist

Issue type

Bug

Step where the issue is related to

Visualization

Environments

  • OS: Ubuntu 22.04.1 LTS
  • Kernel version: 6.5.0-41-generic
  • ROS 2: Humble
  • CPU: Intel(R) Core(TM) i7-10750H CPU @ 2.60GHz x 12
  • Memory: 32.0 GiB

CARET version

v0.5.13

Target application

No response

Description

After updating multimethod 2.0, which has been released on 2024/12/27, the attached error happens when analyzing path.
Also, daily test fails in caret_report

workaround:
pip3 install -U "multimethod<2.0"

Steps to reproduce

  • pip3 install -U multimethod
  • Create a report using caret_report

Commands

No response

Logs

  File "/caret_report/report/report_analysis/../report_analysis/analyze_all.py", line 123, in main
    analyze_path.analyze(args, lttng, arch_path, app, args.dest_dir + '/analyze_path')
  File "/caret_report/report/report_analysis/../analyze_path/analyze_path.py", line 290, in analyze
    stats = analyze_path(args, dest_dir, arch, app, target_path_name, include_first_last_callback, xaxis_type)
  File "/caret_report/report/report_analysis/../analyze_path/analyze_path.py", line 229, in analyze_path
    plot_stacked_bar.save(xaxis_type=xaxis_type, export_path=f'{dest_dir}/{target_path_name}_stacked_bar_{case_str}.html', full_legends=True)
  File "/ros2_caret_ws/build/caret_analyze/caret_analyze/plot/plot_base.py", line 141, in save
    p = self.figure(xaxis_type, ywheel_zoom, full_legends)
  File "/ros2_caret_ws/build/caret_analyze/caret_analyze/plot/stacked_bar/stacked_bar_plot.py", line 51, in figure
    return self._visualize_lib.stacked_bar(
  File "/ros2_caret_ws/build/caret_analyze/caret_analyze/plot/visualize_lib/bokeh/bokeh.py", line 76, in stacked_bar
    return stacked_bar.create_figure()
  File "/ros2_caret_ws/build/caret_analyze/caret_analyze/plot/visualize_lib/bokeh/stacked_bar.py", line 66, in create_figure
    data, y_labels = self._metrics.to_stacked_bar_data(self._xaxis_type)
  File "/ros2_caret_ws/build/caret_analyze/caret_analyze/plot/stacked_bar/latency_stacked_bar.py", line 90, in to_stacked_bar_data
    self._get_response_time_record(self._target_objects)
  File "/ros2_caret_ws/build/caret_analyze/caret_analyze/plot/stacked_bar/latency_stacked_bar.py", line 118, in _get_response_time_record
    record_if = response_time.to_best_case_stacked_bar()
  File "/ros2_caret_ws/build/caret_analyze/caret_analyze/record/records_service/response_time.py", line 746, in to_best_case_stacked_bar
    return self._records.to_range_records('best')
  File "/ros2_caret_ws/build/caret_analyze/caret_analyze/record/records_service/response_time.py", line 847, in to_range_records
    self._create_response_records_core(add_records)
  File "/ros2_caret_ws/build/caret_analyze/caret_analyze/record/records_service/response_time.py", line 992, in _create_response_records_core
    callback(input_min_time, input_time_range.record)
  File "/ros2_caret_ws/build/caret_analyze/caret_analyze/record/records_service/response_time.py", line 845, in add_records
    records.append(record)
  File "/usr/local/lib/python3.10/dist-packages/multimethod/__init__.py", line 348, in __call__
    func = self.dispatch(*args)
  File "/usr/local/lib/python3.10/dist-packages/multimethod/__init__.py", line 340, in dispatch
    return self[types]
  File "/usr/local/lib/python3.10/dist-packages/multimethod/__init__.py", line 335, in __missing__
    return self.setdefault(types, self.select(types, self.parents(types)))
  File "/usr/local/lib/python3.10/dist-packages/multimethod/__init__.py", line 327, in select
    raise DispatchError(f"{self.__name__}: {len(keys)} methods found", types, keys)
multimethod.DispatchError: ('append: 2 methods found', (<class 'caret_analyze.record.record_cpp_impl.RecordsCppImpl'>, <class 'caret_analyze.record.record_cpp_impl.RecordCppImpl'>), {(<class 'object'>, <class 'record_cpp_impl.RecordBase'>), (<class 'object'>, <class 'caret_analyze.record.interface.RecordInterface'>)})

LTTng trace log file

No response

Screenshots

No response

@iwatake2222 iwatake2222 added the bug Something isn't working label Dec 31, 2024
@ymski ymski self-assigned this Jan 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants