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

Do not support serializing BenchmarkRunners #2889

Closed
wants to merge 1 commit into from

Conversation

esantorella
Copy link
Contributor

Summary:
Context: As of D64263610, serializing BenchmarkProblems and BenchmarkRunners is not needed, and in the future, we will make changes that are difficult to make work well with SerializationMixin. Therefore, this diff revokes support for serializating BenchmarkProblems and BenchmarkRunners.

But what if we want to serialize these? IMO, we should use the benchmark problem registry to reconstruct these, which will be much more ergonomic. You might worry that it's expensive to reconstruct problems from scratch, but there was never any computational efficiency benefit from serialization rather than rebuilding from scratch, because the most expensive components (surrogates and data) could not be serialized anyway.

This diff:

  • Strips the BenchmarkRunner from an Experiment before saving the experiment -- that probably should not have been saved anyway
  • Makes all BenchmarkRunners throw exceptions if their serialize_int_args or deserialize_init_args methods are used
  • Removes SyntheticProblemRunner's serialization methods
  • Does the same for SurrogateRunner (which only had fake serialization anyway)

Reviewed By: Balandat

Differential Revision: D64272347

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Oct 16, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D64272347

esantorella added a commit to esantorella/Ax that referenced this pull request Oct 16, 2024
Summary:

Context: As of D64263610, serializing `BenchmarkProblem`s and `BenchmarkRunner`s is not needed, and in the future, we will make changes that are difficult to make work well with `SerializationMixin`. Therefore, this diff revokes support for serializating `BenchmarkProblem`s and `BenchmarkRunner`s.

*But what if we want to serialize these?* IMO, we should use the benchmark problem registry to reconstruct these, which will be much more ergonomic. You might worry that it's expensive to reconstruct problems from scratch, but there was never any computational efficiency benefit from serialization rather than rebuilding from scratch, because the most expensive components (surrogates and data) could not be serialized anyway.

This diff:
* Strips the `BenchmarkRunner` from an `Experiment` before saving the experiment -- that probably should not have been saved anyway
* Makes all `BenchmarkRunners` throw exceptions if their `serialize_int_args` or `deserialize_init_args` methods are used
* Removes `SyntheticProblemRunner`'s serialization methods
* Does the same for `SurrogateRunner` (which only had fake serialization anyway)

Reviewed By: Balandat

Differential Revision: D64272347
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D64272347

@codecov-commenter
Copy link

codecov-commenter commented Oct 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.79%. Comparing base (600b4b1) to head (2aac283).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2889   +/-   ##
=======================================
  Coverage   95.78%   95.79%           
=======================================
  Files         504      504           
  Lines       49829    49799   -30     
=======================================
- Hits        47730    47703   -27     
+ Misses       2099     2096    -3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

esantorella added a commit to esantorella/Ax that referenced this pull request Oct 16, 2024
Summary:

Context: As of D64263610, serializing `BenchmarkProblem`s and `BenchmarkRunner`s is not needed, and in the future, we will make changes that are difficult to make work well with `SerializationMixin`. Therefore, this diff revokes support for serializating `BenchmarkProblem`s and `BenchmarkRunner`s.

*But what if we want to serialize these?* IMO, we should use the benchmark problem registry to reconstruct these, which will be much more ergonomic. You might worry that it's expensive to reconstruct problems from scratch, but there was never any computational efficiency benefit from serialization rather than rebuilding from scratch, because the most expensive components (surrogates and data) could not be serialized anyway.

This diff:
* Strips the `BenchmarkRunner` from an `Experiment` before saving the experiment -- that probably should not have been saved anyway
* Makes all `BenchmarkRunners` throw exceptions if their `serialize_int_args` or `deserialize_init_args` methods are used
* Removes `SyntheticProblemRunner`'s serialization methods
* Does the same for `SurrogateRunner` (which only had fake serialization anyway)

Reviewed By: Balandat

Differential Revision: D64272347
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D64272347

esantorella added a commit to esantorella/Ax that referenced this pull request Oct 16, 2024
Summary:

Context: As of D64263610, serializing `BenchmarkProblem`s and `BenchmarkRunner`s is not needed, and in the future, we will make changes that are difficult to make work well with `SerializationMixin`. Therefore, this diff revokes support for serializating `BenchmarkProblem`s and `BenchmarkRunner`s.

*But what if we want to serialize these?* IMO, we should use the benchmark problem registry to reconstruct these, which will be much more ergonomic. You might worry that it's expensive to reconstruct problems from scratch, but there was never any computational efficiency benefit from serialization rather than rebuilding from scratch, because the most expensive components (surrogates and data) could not be serialized anyway.

This diff:
* Strips the `BenchmarkRunner` from an `Experiment` before saving the experiment -- that probably should not have been saved anyway
* Makes all `BenchmarkRunners` throw exceptions if their `serialize_int_args` or `deserialize_init_args` methods are used
* Removes `SyntheticProblemRunner`'s serialization methods
* Does the same for `SurrogateRunner` (which only had fake serialization anyway)

Reviewed By: Balandat

Differential Revision: D64272347
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D64272347

esantorella added a commit to esantorella/Ax that referenced this pull request Oct 16, 2024
Summary:

Context: As of D64263610, serializing `BenchmarkProblem`s and `BenchmarkRunner`s is not needed, and in the future, we will make changes that are difficult to make work well with `SerializationMixin`. Therefore, this diff revokes support for serializating `BenchmarkProblem`s and `BenchmarkRunner`s.

*But what if we want to serialize these?* IMO, we should use the benchmark problem registry to reconstruct these, which will be much more ergonomic. You might worry that it's expensive to reconstruct problems from scratch, but there was never any computational efficiency benefit from serialization rather than rebuilding from scratch, because the most expensive components (surrogates and data) could not be serialized anyway.

This diff:
* Strips the `BenchmarkRunner` from an `Experiment` before saving the experiment -- that probably should not have been saved anyway
* Makes all `BenchmarkRunners` throw exceptions if their `serialize_int_args` or `deserialize_init_args` methods are used
* Removes `SyntheticProblemRunner`'s serialization methods
* Does the same for `SurrogateRunner` (which only had fake serialization anyway)

Reviewed By: Balandat

Differential Revision: D64272347
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D64272347

esantorella added a commit to esantorella/Ax that referenced this pull request Oct 16, 2024
Summary:

Context: As of D64263610, serializing `BenchmarkProblem`s and `BenchmarkRunner`s is not needed, and in the future, we will make changes that are difficult to make work well with `SerializationMixin`. Therefore, this diff revokes support for serializating `BenchmarkProblem`s and `BenchmarkRunner`s.

*But what if we want to serialize these?* IMO, we should use the benchmark problem registry to reconstruct these, which will be much more ergonomic. You might worry that it's expensive to reconstruct problems from scratch, but there was never any computational efficiency benefit from serialization rather than rebuilding from scratch, because the most expensive components (surrogates and data) could not be serialized anyway.

This diff:
* Strips the `BenchmarkRunner` from an `Experiment` before saving the experiment -- that probably should not have been saved anyway
* Makes all `BenchmarkRunners` throw exceptions if their `serialize_int_args` or `deserialize_init_args` methods are used
* Removes `SyntheticProblemRunner`'s serialization methods
* Does the same for `SurrogateRunner` (which only had fake serialization anyway)

Reviewed By: Balandat

Differential Revision: D64272347
esantorella added a commit to esantorella/Ax that referenced this pull request Oct 16, 2024
Summary:

Context: As of D64263610, serializing `BenchmarkProblem`s and `BenchmarkRunner`s is not needed, and in the future, we will make changes that are difficult to make work well with `SerializationMixin`. Therefore, this diff revokes support for serializating `BenchmarkProblem`s and `BenchmarkRunner`s.

*But what if we want to serialize these?* IMO, we should use the benchmark problem registry to reconstruct these, which will be much more ergonomic. You might worry that it's expensive to reconstruct problems from scratch, but there was never any computational efficiency benefit from serialization rather than rebuilding from scratch, because the most expensive components (surrogates and data) could not be serialized anyway.

This diff:
* Strips the `BenchmarkRunner` from an `Experiment` before saving the experiment -- that probably should not have been saved anyway
* Makes all `BenchmarkRunners` throw exceptions if their `serialize_int_args` or `deserialize_init_args` methods are used
* Removes `SyntheticProblemRunner`'s serialization methods
* Does the same for `SurrogateRunner` (which only had fake serialization anyway)

Reviewed By: Balandat

Differential Revision: D64272347
Summary:

Context: As of D64263610, serializing `BenchmarkProblem`s and `BenchmarkRunner`s is not needed, and in the future, we will make changes that are difficult to make work well with `SerializationMixin`. Therefore, this diff revokes support for serializating `BenchmarkProblem`s and `BenchmarkRunner`s.

*But what if we want to serialize these?* IMO, we should use the benchmark problem registry to reconstruct these, which will be much more ergonomic. You might worry that it's expensive to reconstruct problems from scratch, but there was never any computational efficiency benefit from serialization rather than rebuilding from scratch, because the most expensive components (surrogates and data) could not be serialized anyway.

This diff:
* Strips the `BenchmarkRunner` from an `Experiment` before saving the experiment -- that probably should not have been saved anyway
* Makes all `BenchmarkRunners` throw exceptions if their `serialize_int_args` or `deserialize_init_args` methods are used
* Removes `SyntheticProblemRunner`'s serialization methods
* Does the same for `SurrogateRunner` (which only had fake serialization anyway)

Reviewed By: Balandat

Differential Revision: D64272347
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D64272347

esantorella added a commit to esantorella/Ax that referenced this pull request Oct 17, 2024
Summary:

Context: As of D64263610, serializing `BenchmarkProblem`s and `BenchmarkRunner`s is not needed, and in the future, we will make changes that are difficult to make work well with `SerializationMixin`. Therefore, this diff revokes support for serializating `BenchmarkProblem`s and `BenchmarkRunner`s.

*But what if we want to serialize these?* IMO, we should use the benchmark problem registry to reconstruct these, which will be much more ergonomic. You might worry that it's expensive to reconstruct problems from scratch, but there was never any computational efficiency benefit from serialization rather than rebuilding from scratch, because the most expensive components (surrogates and data) could not be serialized anyway.

This diff:
* Strips the `BenchmarkRunner` from an `Experiment` before saving the experiment -- that probably should not have been saved anyway
* Makes all `BenchmarkRunners` throw exceptions if their `serialize_int_args` or `deserialize_init_args` methods are used
* Removes `SyntheticProblemRunner`'s serialization methods
* Does the same for `SurrogateRunner` (which only had fake serialization anyway)

Reviewed By: Balandat

Differential Revision: D64272347
esantorella added a commit to esantorella/Ax that referenced this pull request Oct 17, 2024
Summary:

Context: As of D64263610, serializing `BenchmarkProblem`s and `BenchmarkRunner`s is not needed, and in the future, we will make changes that are difficult to make work well with `SerializationMixin`. Therefore, this diff revokes support for serializating `BenchmarkProblem`s and `BenchmarkRunner`s.

*But what if we want to serialize these?* IMO, we should use the benchmark problem registry to reconstruct these, which will be much more ergonomic. You might worry that it's expensive to reconstruct problems from scratch, but there was never any computational efficiency benefit from serialization rather than rebuilding from scratch, because the most expensive components (surrogates and data) could not be serialized anyway.

This diff:
* Strips the `BenchmarkRunner` from an `Experiment` before saving the experiment -- that probably should not have been saved anyway
* Makes all `BenchmarkRunners` throw exceptions if their `serialize_int_args` or `deserialize_init_args` methods are used
* Removes `SyntheticProblemRunner`'s serialization methods
* Does the same for `SurrogateRunner` (which only had fake serialization anyway)

Reviewed By: Balandat

Differential Revision: D64272347
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 37e6f54.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants