-
Notifications
You must be signed in to change notification settings - Fork 313
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
RetinaNet TPU Compatibility [looking for a long term fix instead of #1021] #1018
Comments
Don't we want to use this ticket to investigate more #1021 (comment)? |
Sure, we can further investigate. |
@ianstenbit if you can share your |
@bhack sorry for the delay on this. Also -- extraction on GCS hangs (see tensorflow/datasets#4115), so make sure to pass |
predict()
does not use graph mode.
@ianstenbit Thanks |
I don't think that the public url is |
When I pull the public URL of e.g the dataset info, I am seeing this: https://storage.googleapis.com/keras-cv/datasets/voc/2007/4.0.0/dataset_info.json So I suppose you could try |
What is the value of:
|
It is not working:
Can you navigate it in a incognito browser tab? |
Yes, I am able to reach it when I don't have an auth token (e.g. incognito mode) Are you not able to reach those files in incognito mode? |
One other thing you can do is load+extract the VOC dataset locally and then upload the resulting tfds folder to a bucket that you have control over. (That's how I got these records in GCS in the first place, since extraction fails on TFDS.load for gcs) |
Yes I know but it is faster if I can reuse your own. https://storage.googleapis.com/keras-cv/datasets/voc/ in incognito mode: <Error>
<Code>AccessDenied</Code>
<Message>Access denied.</Message>
<Details>
Anonymous caller does not have storage.objects.get access to the Google Cloud Storage object. Permission 'storage.objects.get' denied on resource (or it may not exist).
</Details>
</Error> |
Interesting. That works from my work device as well as my personal device. I'm thinking that tfds.load probably requires object list permission in addition to access to the underlying files. I don't have the power to give that permission on any of these GCS buckets, so I'm not sure if there's anything else I can do. FWIW you shouldn't need VOC specifically to repro the issue. If you'd like I can update the repro colab to use that instead of VOC |
Thank you but I cannot find a free TPU anymore now.. |
Also on tf-nightly I still see: (0) INVALID_ARGUMENT: {{function_node __inference_train_function_133447}} TF to XLA legalization failed: <unknown>:0: error: loc(fused["SigmoidGrad:", "gradient_tape/FocalLoss/Sigmoid/SigmoidGrad"]): 'mhlo.constant' op result #0 must be statically shaped tensor of floating-point or pred (AKA boolean or 1-bit integer) or 8/16/32/64-bit signless integer or 8/16/32/64-bit unsigned integer or complex type with 32-bit float or 64-bit float elements values, but got 'tensor<?x?x20xf32>'
<unknown>:0: note: loc(fused["SigmoidGrad:", "gradient_tape/FocalLoss/Sigmoid/SigmoidGrad"]): see current operation: %5996 = "mhlo.constant"() {value = dense<1.000000e+00> : tensor<?x?x20xf32>} : () -> tensor<?x?x20xf32> I cannot dump on the local filesystem or GCS: os.environ["TF_DUMP_GRAPH_PREFIX"]= "gs://keras_cv/dataset/" # or /tmp/
os.environ["TF_XLA_FLAGS"]="--tf_xla_clustering_debug --tf_xla_auto_jit=2"
os.environ["XLA_FLAGS"]="--xla_dump_hlo_as_text --xla_dump_to=/tmp/generated" @smit-hinsu How we could dump on Colab TPU (I still see tensorflow/tensorflow#49702)? |
Sorry, I don't have an idea on that. |
@smit-hinsu Do you know someone who could help on this failed legalization? |
We have a problem with: But in our case we have keras-cv/keras_cv/losses/focal.py Lines 81 to 82 in d2d56d6
|
Tracking this upstream at tensorflow/tensorflow#58645 |
Done through recent series of refactoring |
We can enable this in
predict()
.This might be a big performance delta, but is much lower priority than TPU compatibility.
The text was updated successfully, but these errors were encountered: