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

Update deprecated functions in RF and GBT Examples #2878

Merged

Conversation

md-shafiul-alam
Copy link
Contributor

@md-shafiul-alam md-shafiul-alam commented Aug 22, 2024

Description

There are a few functions in Random Forest and Gradient Boosted tree in DAAL that have been deprecated and replaced by newer definitions which expects one or two parameters more. Because of the deprecation flags CI throws warnings on windows. The deprecated functions are being used from examples and some tests on ci. This PR modifies the examples to use newer definitions. Public CI failure will be addressed on #2891

@md-shafiul-alam
Copy link
Contributor Author

/intelci: run

@md-shafiul-alam
Copy link
Contributor Author

/intelci: run

@ethanglaser
Copy link
Contributor

I am not sure what the plan for removal of the deprecated interfaces is but I would leave these in the repo for now. Would it be possible just to update the examples so that they are using the existing non-deprecated replacement interfaces?

@md-shafiul-alam
Copy link
Contributor Author

I am not sure what the plan for removal of the deprecated interfaces is but I would leave these in the repo for now. Would it be possible just to update the examples so that they are using the existing non-deprecated replacement interfaces?

It was an interesting decision to deprecate functions which would have been just fine to add the new parameters with default values. The deprecated functions do exactly that. It doesn't seem to me that the deprecation was necessary. For the matter of removing the deprecated functions, there is actually no functional difference. If anyone calls with previous definitions, they will still work. However, I am open to go either way.

@ethanglaser
Copy link
Contributor

@Alexsandruss thoughts?

@md-shafiul-alam
Copy link
Contributor Author

md-shafiul-alam commented Aug 22, 2024

@Alexsandruss thoughts?

+ @Alexandr-Solovev 

@Alexsandruss
Copy link
Contributor

/intelci: run

Comment on lines -124 to -127
DAAL_DEPRECATED NodeId addLeafNode(const TreeId treeId, const NodeId parentId, const size_t position, const size_t classLabel)
{
return addLeafNode(treeId, parentId, position, classLabel, 0);
}
Copy link
Contributor

Choose a reason for hiding this comment

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

Major binary version of library should be increased since ABI would change and I'm unsure if it's feasible for next major release as some additional work related to versioned shared libraries is needed.
I'm OK with other non-deletion changes, but you should verify binary backward compatibility on both of Linux and Windows.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Do you suggest not deleting for now?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, postpone PR merge until next major release and then bump major binary version.

@md-shafiul-alam md-shafiul-alam changed the title Remove deprecated functions from RF and GBT Update deprecated functions in RF and GBT Examples Sep 4, 2024
@md-shafiul-alam
Copy link
Contributor Author

@Alexsandruss Ignored any API changes for this PR. Would you please review again?

@md-shafiul-alam
Copy link
Contributor Author

/intelci: run

@Alexandr-Solovev
Copy link
Contributor

Should we remove deprecated functions in the same time as update examples?

@Alexandr-Solovev
Copy link
Contributor

and we increased major binary version, so I guess now it makes sense to return function deletions

@ethanglaser
Copy link
Contributor

Should we remove deprecated functions in the same time as update examples?

I think yes - this generally looks good to me but I don't think optional args should be added. We have opportunity to update the API and this usage is already deprecated.

@ethanglaser
Copy link
Contributor

/intelci: run

@md-shafiul-alam
Copy link
Contributor Author

md-shafiul-alam commented Sep 5, 2024

Private CI is supposed to fail at build step because of API break. Here is the job with updated infra branch: https://intel-ci.intel.com/ef6b44cb-fdf0-f1fb-b313-a4bf010d0e2e

@md-shafiul-alam
Copy link
Contributor Author

/intelci: run

@md-shafiul-alam
Copy link
Contributor Author

md-shafiul-alam commented Sep 6, 2024

The private CI timeout and warning are unrelated to the PR.

@homksei homksei dismissed Alexsandruss’s stale review September 6, 2024 15:38

Requested change has been met

@md-shafiul-alam md-shafiul-alam merged commit 8c4ba82 into oneapi-src:main Sep 6, 2024
17 of 18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants