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

feat: add ml.model_selection.cross_validate support #1020

Merged
merged 2 commits into from
Sep 26, 2024
Merged

Conversation

GarrettWu
Copy link
Contributor

Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:

  • Make sure to open an issue as a bug/issue before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea
  • Ensure the tests and linter pass
  • Code coverage does not decrease (if any source code was changed)
  • Appropriate docs were updated (if necessary)

Fixes #360015492 🦕

@GarrettWu GarrettWu requested review from a team as code owners September 25, 2024 23:08
@product-auto-label product-auto-label bot added size: m Pull request size is medium. api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. labels Sep 25, 2024
@GarrettWu GarrettWu assigned GarrettWu and unassigned Genesis929 Sep 25, 2024
estimator.fit(X_train, y_train)
fit_time = time.time() - fit_start_time

score_start_time = time.time()
Copy link
Collaborator

@Genesis929 Genesis929 Sep 26, 2024

Choose a reason for hiding this comment

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

Maybe use perf_counter. From chatgpt
time.time(): It is subject to system clock adjustments or skew. The system time can be adjusted backward and forward by the operating system, which can lead to inaccurate or unreliable results when measuring short durations or intervals. This makes it less suitable for performance testing where precise and stable measurements are critical.

time.perf_counter(): It provides a monotonic clock (i.e., always increasing) that is not affected by changes in the system clock. This makes it highly reliable for measuring precise time intervals, essential for benchmarking and profiling applications.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@GarrettWu GarrettWu enabled auto-merge (squash) September 26, 2024 20:33
@GarrettWu GarrettWu merged commit 1a38063 into main Sep 26, 2024
21 of 22 checks passed
@GarrettWu GarrettWu deleted the garrettwu-cv branch September 26, 2024 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: bigquery Issues related to the googleapis/python-bigquery-dataframes API. size: m Pull request size is medium.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants