Program Listing for File add_scores.hpp

Return to documentation for file (morpheus/_lib/include/morpheus/stages/add_scores.hpp)

Copy
Copied!
            

#pragma once #include "morpheus/messages/multi_response_probs.hpp" #include <mrc/channel/status.hpp>// for Status #include <mrc/node/sink_properties.hpp>// for SinkProperties<>::sink_type_t #include <mrc/node/source_properties.hpp>// for SourceProperties<>::source_type_t #include <mrc/segment/builder.hpp> #include <mrc/segment/object.hpp>// for Object #include <pymrc/node.hpp> #include <rxcpp/rx.hpp>// for apply, make_subscriber, observable_member, is_on_error<>::not_void, is_on_next_of<>::not_void, trace_activity #include <cstddef>// for size_t #include <map> #include <memory> #include <string> #include <vector> namespace morpheus { /****** Component public implementations *******************/ /****** AddScoresStage********************************/ #pragma GCC visibility push(default) class AddScoresStage : public mrc::pymrc::PythonNode<std::shared_ptr<MultiResponseProbsMessage>, std::shared_ptr<MultiResponseProbsMessage>> { public: using base_t = mrc::pymrc::PythonNode<std::shared_ptr<MultiResponseProbsMessage>, std::shared_ptr<MultiResponseProbsMessage>>; using typename base_t::sink_type_t; using typename base_t::source_type_t; using typename base_t::subscribe_fn_t; AddScoresStage(std::size_t num_class_labels, std::map<std::size_t, std::string> idx2label); subscribe_fn_t build_operator(); std::size_t m_num_class_labels; std::map<std::size_t, std::string> m_idx2label; }; /****** AddScoresStageInterfaceProxy******************/ struct AddScoresStageInterfaceProxy { static std::shared_ptr<mrc::segment::Object<AddScoresStage>> init(mrc::segment::Builder& builder, const std::string& name, std::size_t num_class_labels, std::map<std::size_t, std::string> idx2label); }; #pragma GCC visibility pop// end of group } // namespace morpheus

© Copyright 2023, NVIDIA. Last updated on Feb 3, 2023.