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

Machine ref to itself #5145

Closed
wants to merge 3 commits into from
Closed

Machine ref to itself #5145

wants to merge 3 commits into from

Conversation

jonpsy
Copy link
Contributor

@jonpsy jonpsy commented Dec 30, 2020

#5139

Eren YEAGEEER!

@gf712 Some unit tests are failing still, submitting as early report.

@shogun-toolbox shogun-toolbox deleted a comment from jonpsy Jan 4, 2021
@shogun-toolbox shogun-toolbox deleted a comment from jonpsy Jan 4, 2021
@jonpsy
Copy link
Contributor Author

jonpsy commented Jan 4, 2021

It seems the failing tests haven't to do with my PR in particular, here's a report of failing test cases on develop branch and my branch

** develop **

	 54 - generated_cpp-evaluation-cross_validation_support_vector_machine (SEGFAULT)
	159 - generated_cpp-regression-random_forest_regression (SEGFAULT)
	253 - unit-MeanSquaredTest (Failed)
	565 - integration_meta_cpp-binary-domainadaptationsvm (Failed)
	575 - integration_meta_cpp-binary-svmlight (Failed)
	576 - integration_meta_cpp-binary-svmlight_batch_linadd (Failed)
	690 - integration_meta_cpp-pipeline-pipeline (Failed)
	695 - integration_meta_cpp-preprocessor-pca (Failed)

** machine branch **

	 159 - generated_cpp-regression-random_forest_regression (SEGFAULT)
        253 - unit-MeanSquaredTest (Failed)
        565 - integration_meta_cpp-binary-domainadaptationsvm (Failed)
        575 - integration_meta_cpp-binary-svmlight (Failed)
        576 - integration_meta_cpp-binary-svmlight_batch_linadd (Failed)
        690 - integration_meta_cpp-pipeline-pipeline (Failed)
        695 - integration_meta_cpp-preprocessor-pca (Failed)

This is true atleast in my local machine. This PR should be good to go, I'll let the members make the final call

@LiuYuHui
Copy link
Contributor

LiuYuHui commented Jan 5, 2021

I guess maybe there is some data race in cross_validation_support_vector_machine.

@jonpsy
Copy link
Contributor Author

jonpsy commented Jan 5, 2021

I guess maybe there is some data race in cross_validation_support_vector_machine.

#5121

@@ -145,7 +145,7 @@ bool OnlineSVMSGD::train(std::shared_ptr<Features> data)
float64_t wnorm = linalg::dot(m_w, m_w);
io::info("Norm: {:.6f}, Bias: {:.6f}", wnorm, bias);

return true;
return shared_from_this()->as<Machine>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this could be std::static_pointer_cast, since we know that this is a derived from Machine


/* predict */
auto predicted_labels =
svm->apply(features_test)->as<RegressionLabels>();
svm->train()->as<LibSVR>()->apply(features_test)->as<RegressionLabels>();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could this just be svm->train()->apply(features_test)->as<RegressionLabels>();?

@jonpsy
Copy link
Contributor Author

jonpsy commented May 18, 2021

Re-open when devs are back.

@jonpsy jonpsy closed this May 18, 2021
@jonpsy jonpsy deleted the machine branch May 18, 2021 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants