Hi @Yomna_Mohamed
Please check the Tensorflow reference. Follow the notebook instruction and add the inputs
of _VOLUME_KEY
and cast it float32
[snippet deleted by mentor]
please check
as it isnt working , tf cast
There is no always_return_num_quantiles
keyword argument in bucketize. This error has nothing to do with tf.cast
.
This is the tail of your stacktrace:
~/work/traffic_transform.py in preprocessing_fn(inputs)
53 # Bucketize the feature
54 for key in _BUCKET_FEATURE_KEYS:
---> 55 outputs[_transformed_name(key)] = tft.bucketize(
56 inputs[key],
57 _FEATURE_BUCKET_COUNT[key],
/opt/conda/lib/python3.8/site-packages/tensorflow_transform/common.py in wrapped_fn(*args, **kwargs)
71 collection.append(collections.Counter())
72 collection[0][fn.__name__] += 1
---> 73 return fn(*args, **kwargs)
74 else:
75 return fn(*args, **kwargs)
TypeError: bucketize() got an unexpected keyword argument 'always_return_num_quantiles'
please where is the error so i can fix it
Based on the trace, the location is in preprocessing_fn(inputs)
where tft.bucketize
is invoked in line 55.
Please get familiar with python before moving forward.
i mean where the error in the syntax
Does this help?
i removed the argumnets
now gives this error
NameError Traceback (most recent call last)
in
10 importlib.reload(traffic_transform)
11
â> 12 raw_data_metadata = dataset_metadata.DatasetMetadata(schema_utils.schema_from_feature_spec(feature_description))
13
14 with tft_beam.Context(temp_dir=tempfile.mkdtemp()):
NameError: name âdataset_metadataâ is not defined
Odds are good that your kernel restarted due to inactivity. Run the cell that contains this import:
from tensorflow_transform.tf_metadata import dataset_metadata, schema_utils
i cant find it where
worked ;))) i re run it again
i got grade 0 even all output matched
There was a problem compiling the code from your notebook. Details:
name âCsvExampleGenâ is not defined
Hello @Yomna_Mohamed to avoid the âCsvExampleGenâ is not defined
error try adding tfx.components
to the CsvExampleGen
Like this:
tfx.components.CsvExampleGen
Let me know if the error will be solved!
where to put this syntax
Where you defined: CsvExampleGen
Or send a screenshot of your error I have a better look
@Yomna_Mohamed Please delete this! You canât share your notebook here,
DM me the notebook instead
@Yomna_Mohamed Delete the post and inbox me the file privately! Click on my display photo and you will get an option Message
TypeError Traceback (most recent call last)
in
4
5 # Use ImportSchemaGen to put the curated schema to ML Metadata
----> 6 user_schema_importer = ImporterNode(
7 instance_name= âimport_user_schemaâ,
8 source_uri= UPDATED_SCHEMA_DIR,
/opt/conda/lib/python3.8/site-packages/tfx/utils/deprecation_utils.py in init(self, *args, **kwargs)
145 fâFrom {call_loc}: The name {deprecated_name} is deprecated. â
146 fâPlease use {name} instead.')
â 147 super().init(*args, **kwargs)
148
149 return _NewDeprecatedClass
TypeError: init() got an unexpected keyword argument âinstance_nameâ
============
error in week 3 c3
@Yomna_Mohamed , the comment specify that you should use ImportSchemaGen, not ImporterNode
in cell 5.
In the future, please create a new topic if the issue is from a different assignment.