Skip to content

Commit

Permalink
Upgrade Tensorflow version to v2.13.0
Browse files Browse the repository at this point in the history
Signed-off-by: Yuki Iwai <yuki.iwai.tz@gmail.com>
  • Loading branch information
tenzen-y committed Aug 13, 2023
1 parent 888bec3 commit 489ee6b
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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
3 changes: 2 additions & 1 deletion cmd/suggestion/nas/enas/v1beta1/requirements.txt
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
scipy>=1.7.2
tensorflow==2.11.0
tensorflow==2.13.0
Original file line number Diff line number Diff line change
@@ -1 +1 @@
tensorflow==2.11.0
tensorflow==2.13.0
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,11 @@
# https://github.com/kubeflow/katib/blob/master/examples/v1beta1/kubeflow-training-operator/tfjob-mnist-with-summaries.yaml#L16-L22

import tensorflow as tf
from tensorboard.backend.event_processing.event_accumulator import EventAccumulator
from tensorboard.backend.event_processing.event_accumulator import EventAccumulator, TensorEvent
from tensorboard.backend.event_processing.tag_types import TENSORS
import os
from datetime import datetime
import rfc3339
from datetime import datetime
import api_pb2
from logging import getLogger, StreamHandler, INFO
from pkg.metricscollector.v1beta1.common import const
Expand All @@ -43,22 +44,22 @@ def find_all_files(directory):

def parse_summary(self, tfefile):
metric_logs = []
event_accumulator = EventAccumulator(tfefile, size_guidance={'tensors': 0})
event_accumulator = EventAccumulator(tfefile, size_guidance={TENSORS: 0})
event_accumulator.Reload()
for tag in event_accumulator.Tags()['tensors']:
for tag in event_accumulator.Tags()[TENSORS]:
for m in self.metric_names:

tfefile_parent_dir = os.path.dirname(m) if len(m.split("/")) >= 2 else os.path.dirname(tfefile)
basedir_name = os.path.dirname(tfefile)
if not tag.startswith(m.split("/")[-1]) or not basedir_name.endswith(tfefile_parent_dir):
continue

for wall_time, step, tensor in event_accumulator.Tensors(tag):
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))
)
)
metric_logs.append(ml)
Expand Down
4 changes: 2 additions & 2 deletions sdk/python/v1beta1/kubeflow/katib/constants/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@

# Supported base images for the Katib Trials.
# TODO (andreyvelich): Implement list_base_images function to get each image description.
BASE_IMAGE_TENSORFLOW = "docker.io/tensorflow/tensorflow:2.11.0"
BASE_IMAGE_TENSORFLOW_GPU = "docker.io/tensorflow/tensorflow:2.11.0-gpu"
BASE_IMAGE_TENSORFLOW = "docker.io/tensorflow/tensorflow:2.13.0"
BASE_IMAGE_TENSORFLOW_GPU = "docker.io/tensorflow/tensorflow:2.13.0-gpu"
BASE_IMAGE_PYTORCH = "docker.io/pytorch/pytorch:1.12.1-cuda11.3-cudnn8-runtime"
BASE_IMAGE_MXNET = "docker.io/mxnet/python:1.9.1_native_py3"

Expand Down

0 comments on commit 489ee6b

Please sign in to comment.