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

Remove the batch suffix from examples #1364

Merged

Conversation

razdoburdin
Copy link
Contributor

Description

In continue of discussion started by @samir-nasibli in #1320 (comment) and #1360.

I prepared an update for tests/run_examples.py:

  • Now example names without suffix are supported.
  • The processing of examples without suffix equivalent to the examples with _batch suffix in the priv version.
  • List of skipping files is introduced.

Issue:
I found, that log_reg_model_builder.py return error. This file wasn't launching before. I have temporarily added it to the skipping list. We should fix this example or remove it.

skiped_files = ['__init__.py',
'spmd_utils.py',
'log_reg_model_builder.py',
'n_jobs.py',
Copy link
Contributor

Choose a reason for hiding this comment

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

but we would like to run those examples to validate that they are work

Copy link
Contributor Author

Choose a reason for hiding this comment

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

but we would like to run those examples to validate that they are work

Most of these files are not the examples, but some helper functions. For this reason we shouldn't run it as examples. The only exception is log_reg_model_builder.py. For some unknown reason this file didn't have any suffix, for this reason, it wasn't launching before at all. So we have two independent tasks here:

  1. Remove _batch suffix for more clear naming (this PR).
  2. Investigate the problem with log_reg_model_builder.py and prepare a fix for this problem (some other PR). After the problem will be fixed, we can remove this file from the list of skipping examples.

This plan looks reasonable from my point of view, what is your opinion?

Copy link
Contributor

Choose a reason for hiding this comment

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

@razdoburdin I think as an option you can move non-example, helpers scripts into utils module examples/utils.

@razdoburdin
Copy link
Contributor Author

/intelci: run

@razdoburdin razdoburdin marked this pull request as draft July 27, 2023 10:58
@razdoburdin
Copy link
Contributor Author

/intelci: run

@razdoburdin
Copy link
Contributor Author

/intelci: run

@razdoburdin
Copy link
Contributor Author

/intelci: run

@razdoburdin
Copy link
Contributor Author

/intelci: run

@razdoburdin razdoburdin marked this pull request as ready for review August 8, 2023 11:08
@razdoburdin
Copy link
Contributor Author

razdoburdin commented Aug 8, 2023

GPU CI job run is here.

@ethanglaser
Copy link
Contributor

Should examples in daal4py/sycl also have the batch suffix removed?

@razdoburdin
Copy link
Contributor Author

Should examples in daal4py/sycl also have the batch suffix removed?

I think yes, I suggest removing it in a separate PR.

@ethanglaser
Copy link
Contributor

Should examples in daal4py/sycl also have the batch suffix removed?

I think yes, I suggest removing it in a separate PR.

I think it could be added to this one if we are already doing both daal4py and sklearnex examples in this one

@ethanglaser
Copy link
Contributor

ethanglaser commented Aug 14, 2023

GPU CI job run is here.

For reference, these are the examples that run in this job that did not run previously:

daal4py/log_reg_model_builder.py
daal4py/model_builders_lightgbm.py
daal4py/model_builders_catboost.py
daal4py/model_builders_xgboost.py
daal4py/spmd_utils.py
daal4py/sycl/sklearn_sycl.py
sklearnex/patch_sklearn.py
sklearnex/verbose_mode.py
sklearnex/n_jobs.py

Of these, it seems like the model builders should be ran. We have a separate step in recipe testing for daal4py/sycl/sklearn_sycl.py so this should be excluded from run_examples file, as well as spmd_utils since its just helper functions. Are sklearnex/ njobs, patch_sklearn, and verbose_mode intended to be ran with run_examples.py (@samir-nasibli)?

@samir-nasibli
Copy link
Contributor

/intelci: run

@samir-nasibli
Copy link
Contributor

GPU CI job run is here.

@samir-nasibli
Copy link
Contributor

GPU CI job run is here.

For reference, these are the examples that run in this job that did not run previously:

daal4py/log_reg_model_builder.py daal4py/model_builders_lightgbm.py daal4py/model_builders_catboost.py daal4py/model_builders_xgboost.py daal4py/spmd_utils.py daal4py/sycl/sklearn_sycl.py sklearnex/patch_sklearn.py sklearnex/verbose_mode.py sklearnex/n_jobs.py

Of these, it seems like the model builders should be ran. We have a separate step in recipe testing for daal4py/sycl/sklearn_sycl.py so this should be excluded from run_examples file, as well as spmd_utils since its just helper functions. Are sklearnex/ njobs, patch_sklearn, and verbose_mode intended to be ran with run_examples.py (@samir-nasibli)?

spmd_utils.py should be renamed or restructured. since this is not helper module.

@napetrov
Copy link
Contributor

daal4py/log_reg_model_builder.py - we can technically drop this if there are problems there.

meanwhile lot of failures with - TypeError: create_pytest_switches() missing 1 required positional argument: 'preview'

@ethanglaser
Copy link
Contributor

meanwhile lot of failures with - TypeError: create_pytest_switches() missing 1 required positional argument: 'preview'

This should be fixed by rebase (#1418)

@napetrov
Copy link
Contributor

@mergify rebase

@mergify
Copy link

mergify bot commented Aug 29, 2023

rebase

❌ Base branch update has failed

Git reported the following error:

Rebasing (1/17)
Auto-merging doc/daal4py/algorithms.rst
Auto-merging doc/daal4py/examples.rst
Auto-merging examples/daal4py/decision_tree_regression_traverse.py
Auto-merging tests/run_examples.py
CONFLICT (content): Merge conflict in tests/run_examples.py
error: could not apply 532dbf0... initial
hint: Resolve all conflicts manually, mark them as resolved with
hint: "git add/rm <conflicted_files>", then run "git rebase --continue".
hint: You can instead skip this commit: run "git rebase --skip".
hint: To abort and get back to the state before "git rebase", run "git rebase --abort".
Could not apply 532dbf0... initial

err-code: 0B313

@samir-nasibli
Copy link
Contributor

/intelci: run

@samir-nasibli
Copy link
Contributor

GPU CI job run is here.

@ethanglaser
Copy link
Contributor

ethanglaser commented Aug 29, 2023

GPU CI job run is here.

For reference, these are the examples that run in this job that did not run previously:

daal4py/log_reg_model_builder.py daal4py/model_builders_lightgbm.py daal4py/model_builders_catboost.py daal4py/model_builders_xgboost.py daal4py/spmd_utils.py daal4py/sycl/sklearn_sycl.py sklearnex/patch_sklearn.py sklearnex/verbose_mode.py sklearnex/n_jobs.py

Of these, it seems like the model builders should be ran. We have a separate step in recipe testing for daal4py/sycl/sklearn_sycl.py so this should be excluded from run_examples file, as well as spmd_utils since its just helper functions. Are sklearnex/ njobs, patch_sklearn, and verbose_mode intended to be ran with run_examples.py (@samir-nasibli)?

daal4py/sycl/sklearn_sycl.py
sklearnex/patch_sklearn.py
sklearnex/verbose_mode.py
sklearnex/n_jobs.py
are all still running during run_examples step - I don't think this is desired behavior (at least these did not run previously)

@razdoburdin
Copy link
Contributor Author

done

@razdoburdin
Copy link
Contributor Author

GPU CI job run is here.

For reference, these are the examples that run in this job that did not run previously:
daal4py/log_reg_model_builder.py daal4py/model_builders_lightgbm.py daal4py/model_builders_catboost.py daal4py/model_builders_xgboost.py daal4py/spmd_utils.py daal4py/sycl/sklearn_sycl.py sklearnex/patch_sklearn.py sklearnex/verbose_mode.py sklearnex/n_jobs.py
Of these, it seems like the model builders should be ran. We have a separate step in recipe testing for daal4py/sycl/sklearn_sycl.py so this should be excluded from run_examples file, as well as spmd_utils since its just helper functions. Are sklearnex/ njobs, patch_sklearn, and verbose_mode intended to be ran with run_examples.py (@samir-nasibli)?

daal4py/sycl/sklearn_sycl.py sklearnex/patch_sklearn.py sklearnex/verbose_mode.py sklearnex/n_jobs.py are all still running during run_examples step - I don't think this is desired behavior (at least these did not run previously)

In the best of my understanding, they should be launched. Multiple examples weren't launching before, due to the improper naming.

@napetrov
Copy link
Contributor

/intelci: run
set infra_branch=razdoburdin-patch-1

Copy link
Contributor

@napetrov napetrov left a comment

Choose a reason for hiding this comment

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

ok with changes - assuming CI would be green

@razdoburdin razdoburdin merged commit 37ada42 into intel:master Aug 30, 2023
16 of 17 checks passed
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.

4 participants