Comments (7)
Can you provide example outputs for the labels and predictions.
from model-analysis.
model = tf.saved_model.load(export_dir='/tmp/tfx-interactive-model/6/serving_model_dir/')
predict_fn = model.signatures["serving_default"]
text = "some random text"
example = tf.train.Example(features = tf.train.Features(feature ={
"Headline":_string_feature('headline'),
"InternalId":_int64_feature(1111),
"Text":_string_feature(text),
"content_id":_string_feature("2222"),
}))
serialized_example = example.SerializeToString()
predict_fn(tf.constant([serialized_example]))
{'outputs': <tf.Tensor: shape=(1, 10), dtype=float32, numpy=
array([[0.6034294 , 0.40879828, 0.4462878 , 0.3196895 , 0.31108657,
0.30687535, 0.27371922, 0.29507416, 0.2872882 , 0.26999897]],
dtype=float32)>}
This is because I have 10 classes, so probability for all the 10 classes.
from model-analysis.
The categories labels you mentioned above only has 5 classes. These need to align.
from model-analysis.
@mdreves No, that's was an earlier iteration, I have 10 classes. The format remains the same, but now I have 10 classes.
{
'Text': array([b'Football fans looking forward to seeing the renewal of the rivalry between Cristiano Ronaldo and Lionel Messi were made to wait a while longer after the Portuguese forward was forced to miss Juventus' Champions League tie against Barcelona on Wednesday.'],dtype=object),
'Headline': array([b"Lionel Messi scores as Cristiano Ronaldo misses Barcelona's victory over Juventus."], dtype=object),
'categories': array([1., 0., 0., 0., 0., 0., 0., 0., 0.,0.], dtype=object),
}
{
'Text_xf': array([b'COVID-19 has changed fan behavior and accelerated three to five years of technology adoption into six months'],dtype=object),
'Headline_xf': array([b"How Technology Is Improving Fan Transactions at Sports Venues"], dtype=object),
'categories_xf': array([1., 1., 0., 0., 0., 0., 0., 0., 0.,0.'], dtype=object),
}
from model-analysis.
Sorry for late reply. This error is caused when the label output after processing is empty. I'm having trouble reproducing this issue with the information provided. Can you try with the latest release and let me know if you still see this.
from model-analysis.
@albertnanda , please reply on the above comment.Thanks.
from model-analysis.
Closing as this issue is in "awaiting response" status for more than 1 month. Please take a look into the answers provided above and post your comments(if you still have queries on this). Thank you!
from model-analysis.
Related Issues (20)
- Unable to use custom Keras metrics with TFX evaluator component HOT 4
- AttributeError: partially initialized module error, test.py HOT 2
- Incorrect Documentation for MetricConfig
- Custom multilabel Keras metrics: dynamically initialize weight shape HOT 1
- Fairness indicator metrics do not show up HOT 5
- Validation bug when using feature values as slicing specs HOT 2
- No longer compatible with Dataflow runner v1 after v0.29
- Renaming Custom Layer breaks TFMA Evaluator HOT 6
- Error in merge_accumulators when using keras metrics on dataflow HOT 3
- TFMA analyze_raw_data function support with MultiClassConfusionMatrixPlot HOT 3
- Analytics HOT 1
- Breaking changes: tfma.metrics.MetricComputation `preprocessor` argument changed from accepting beam DoFn to `preprocessors` accepting a list of `Preprocessor` HOT 1
- Move to numpy >=1.20 because <1.20 is difficult to build on Apple Silicon HOT 4
- TFMA on Flink does not seems to be parallelizing work. HOT 5
- only integer values should be passed to num_instances metric. HOT 3
- Render_plot is failing HOT 2
- Feat: Have ability to return the HTML rather than creating the plots HOT 1
- CVE in Pyarrow dependency HOT 1
- CNN HOT 2
- pip install tensorflow-model-analysis fails on WSL2 on Windows 11 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from model-analysis.