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

tag-register all raw arrays #4116

Merged
merged 1 commit into from Jan 25, 2018
Merged

tag-register all raw arrays #4116

merged 1 commit into from Jan 25, 2018

Conversation

ghost
Copy link

@ghost ghost commented Jan 24, 2018

Made changes as suggested in #4101

All tests pass.

@vigsterkr
Copy link
Member

@Guruhegde thanks for the patch. i skid through the patch looks good... i've restarted the failed travis jobs, lets see the output and based on that we can merge it 👍

@vigsterkr
Copy link
Member

@Guruhegde as you can see there some formatting issues in the patch:
https://travis-ci.org/shogun-toolbox/shogun/jobs/332627900#L740

you can use clang-format locally and check all the errors before sending in a fix.
see https://github.com/shogun-toolbox/shogun/wiki/Code-style for more details

@ghost
Copy link
Author

ghost commented Jan 24, 2018

@vigsterkr sorry about the error. I will fix.

this->m_parameters->add(&m_num_classes, "m_num_classes",
"Number of classes.");

this->m_parameters->add_vector(&m_labels, &m_num_labels, "labels_array",
Copy link
Member

Choose a reason for hiding this comment

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

I think you don't need to change anything here.

Copy link
Author

Choose a reason for hiding this comment

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

I will undo the changes.

p->add_vector((float64_t**)param->m_parameter, type.m_length_y,
param->m_name);
watch_param(
Copy link
Member

Choose a reason for hiding this comment

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

remove this for now

Copy link
Member

Choose a reason for hiding this comment

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

(the class will be rewritten soon)

Copy link
Author

Choose a reason for hiding this comment

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

Ok

m_parameters->add_vector((SGString<float64_t>**)&distance_matrix, &num_tasksqr, "distance_matrix", "distance between tasks");
watch_param(
"distance_matrix", (SGString<float64_t>**)&distance_matrix,
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this can work, these static casts don't make any sense
Could you remove you added watch_param statements here?

Then, in another PR, could you even comment out the add_vector calls?

Copy link
Author

@ghost ghost Jan 24, 2018

Choose a reason for hiding this comment

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

@karlnapf

Questions:
Would you like me to comment out the add_matrix call having static_cast in parameter, i found one in ParameterCombination.cpp?
If so, shall i send single PR to address both(comment add_vector + add_matrix)?

While commenting the code, should i leave a remark with any issue no.?

I made necessary changes for #4110. will send PR soon.
Thanks.

Copy link
Member

@karlnapf karlnapf left a comment

Choose a reason for hiding this comment

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

Some minor changes needed (not your fault, but old obscure Shogun code's fault)

@karlnapf
Copy link
Member

karlnapf commented Jan 25, 2018

Pls rebase against develop, the 4114 merge should not appear in here

@@ -75,7 +75,7 @@ void shogun::delete_object(CSGObject* object)
delete object;
}

std::set<std::string> available_objects()
std::set<std::string> shogun::available_objects()
Copy link
Member

Choose a reason for hiding this comment

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

there are changes from another PR, you need to rebase.
Always check the diff !

@karlnapf
Copy link
Member

Sorry, something else was merged that partially addressed these changes. You will need to rebase and resolve. Otherwise this is good to merge soon

this->m_parameters->add(&m_num_classes, "m_num_classes",
"Number of classes.");

this->m_parameters->add_vector(&m_labels, &m_num_labels, "labels_array",
Copy link
Author

Choose a reason for hiding this comment

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

I removed tag register here, by mistake i didn't remove new line. hope it's ok.

@ghost
Copy link
Author

ghost commented Jan 25, 2018

Addressed issues in the last commit. Tests pass. I hope this goes well.
Travis job may complain about style check in one of the files(as mentioned in IRC).

@karlnapf karlnapf merged commit b24546c into shogun-toolbox:develop Jan 25, 2018
@karlnapf
Copy link
Member

tada! :)
Nice one, thanks so much for the patch

@ghost
Copy link
Author

ghost commented Jan 25, 2018

Happy to see this! Thanks for the guidance :)

Questions:
Would you like me to comment out the add_matrix call having static_cast in parameter, i found one in ParameterCombination.cpp?
If so, shall i send single PR to address both(comment add_vector + add_matrix)?

While commenting the code, should i leave a remark with any issue no.?

@ghost ghost mentioned this pull request Jan 26, 2018
@karlnapf
Copy link
Member

Don’t worry about Parameter combination, we will take care of that

@ghost ghost deleted the feature/tag-register-raw_array branch January 27, 2018 22:32
vinx13 pushed a commit to vinx13/shogun that referenced this pull request Jan 28, 2018
karlnapf pushed a commit to karlnapf/shogun that referenced this pull request Feb 4, 2018
ktiefe pushed a commit to ktiefe/shogun that referenced this pull request Jul 30, 2019
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

2 participants