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

Upgrade Tensorflow version to v2.13.0 #2201

Merged

Conversation

tenzen-y
Copy link
Member

What this PR does / why we need it:
I upgraded the Tensorflow version to v2.13.0.

Which issue(s) this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close the issue(s) when PR gets merged):
Fixes #

Checklist:

  • Docs included if any changes are user facing

@johnugeorge
Copy link
Member

@tenzen-y Did you try locally? The tests are failing with latest tensorflow

@tenzen-y
Copy link
Member Author

@tenzen-y Did you try locally? The tests are failing with latest tensorflow

Related failure is only https://github.com/kubeflow/katib/actions/runs/5842762636/job/15844213888?pr=2201#step:4:635

self = <test_tfevent_metricscollector.TestTFEventMetricsCollector testMethod=test_parse_file>

    def test_parse_file(self):
    
        current_dir = os.path.dirname(os.path.abspath(__file__))
        logs_dir = os.path.join(current_dir, "testdata/tfevent-metricscollector/logs")
    
        # Metric format is "{{dirname}}/{{metrics name}}"
        metric_names = ["train/accuracy", "train/loss", "test/loss", "test/accuracy"]
        metric_logs = utils.get_metric_logs(logs_dir, metric_names)
>       self.assertEqual(20, len(metric_logs))
E       AssertionError: 20 != 1

test/unit/v1beta1/metricscollector/test_tfevent_metricscollector.py:29: AssertionError

I will fix this error.

@tenzen-y tenzen-y marked this pull request as draft August 13, 2023 13:18
@google-oss-prow google-oss-prow bot added size/M and removed size/S labels Aug 13, 2023
@tenzen-y tenzen-y force-pushed the upgrade-tensorflow-version branch 3 times, most recently from 17af2d8 to 9769db8 Compare August 13, 2023 22:39
@@ -1,4 +1,5 @@
grpcio>=1.41.1
googleapis-common-protos==1.6.0
cython>=0.29.24
tensorflow==2.11.0
tensorflow==2.13.0
protobuf<=3.20.3
Copy link
Member Author

Choose a reason for hiding this comment

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

This requirement is for the reason the same as #2140 (comment).

@@ -2,4 +2,5 @@ psutil==5.9.4
rfc3339>=6.2
grpcio>=1.41.1
googleapis-common-protos==1.6.0
tensorflow==2.11.0
tensorflow==2.13.0
protobuf<=3.20.3
Copy link
Member Author

Choose a reason for hiding this comment

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

This requirement is for the reason the same as #2140 (comment).

@tenzen-y tenzen-y force-pushed the upgrade-tensorflow-version branch 3 times, most recently from 9a84472 to 489ee6b Compare August 13, 2023 23:47
@google-oss-prow google-oss-prow bot added size/S and removed size/M labels Aug 13, 2023
Comment on lines +57 to +62
for tensor in event_accumulator.Tensors(tag):
ml = api_pb2.MetricLog(
time_stamp=rfc3339.rfc3339(datetime.fromtimestamp(wall_time)),
time_stamp=rfc3339.rfc3339(datetime.fromtimestamp(tensor.wall_time)),
metric=api_pb2.Metric(
name=m,
value=str(tf.make_ndarray(tensor))
value=str(tf.make_ndarray(tensor.tensor_proto))
Copy link
Member Author

@tenzen-y tenzen-y Aug 13, 2023

Choose a reason for hiding this comment

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

Since Tensorboard v2.12.0, the 'TensorEvent' typed was changed from the namedtuple to the dataclass.

ref: tensorflow/tensorboard@1975529

Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
@tenzen-y tenzen-y marked this pull request as ready for review August 14, 2023 04:03
@tenzen-y
Copy link
Member Author

@johnugeorge I fixed the errors.

Copy link
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

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

Thank you @tenzen-y!
/lgtm
/approve

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andreyvelich, tenzen-y

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:
  • OWNERS [andreyvelich,tenzen-y]

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit 29887c1 into kubeflow:master Aug 15, 2023
58 checks passed
tenzen-y added a commit to tenzen-y/katib that referenced this pull request Aug 16, 2023
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
@tenzen-y tenzen-y deleted the upgrade-tensorflow-version branch August 16, 2023 08:16
google-oss-prow bot pushed a commit that referenced this pull request Aug 16, 2023
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.

3 participants