This is not a big problem, I just wanted to check: am I right in finding some of the code examples used in the TensorFlow lectures are deprecated in Python 3.11? I tried running the classification example and got
AttributeError: module ‘inspect’ has no attribute ‘getargspec’
When I ran the lambda function:
classifier.train(input_fn=lambda: input_fn(train, train_y, training=True),
steps=5000)
Have I made a mistake, or is the code deprecated? As I say, it’s not a problem if it is, I just wanted to check and make sure I hadn’t done something incredibly stupid!
This might sound trite, but the reason I didn’t consider it a big issue and the solution for the problem as I see it is that the Machine Learning course is teaching concepts, not syntax. If you go to the Tensorflow website, it has instructions on migrating from deprecated libraries, of which the course uses at least one. But the concepts remain valid, and once you can grasp them, you can look up the current syntax. I’m still learning the concepts myself, so I’ll be watching more of the tutorials before attempting that.
If you want to use the materials as-is, then the above suggestion of using an older version of Python is a good idea