Fix three import errors that break modules on a fresh checkout - #6
Open
egeboy35 wants to merge 1 commit into
Open
Fix three import errors that break modules on a fresh checkout#6egeboy35 wants to merge 1 commit into
egeboy35 wants to merge 1 commit into
Conversation
- sdradi/myofdm.py imported tfmodules at module level. That module lives in sdradi/pluto_test/ and requires TensorFlow, so "import myofdm" failed from sdradi/ even though only MyDemapper uses those names. The import is now optional, and MyDemapper raises an ImportError explaining how to enable it. - WebApp/FastAPIbackend/radar/waveform.py ran "pip install plotly" as a side effect of a failed import; it now raises a clear ImportError instead. It also adds a __file__-based sys.path entry so its AIRadar.AIRadarLib imports resolve when the backend is run from WebApp/FastAPIbackend/ as documented. - AIRadar/AIradar_model_comparison.py imported RadarTransformerNet from AIradar_transformer, which is not in the repository. It now imports from AIRadarLib.modeling_transformer, matching the sibling script AIradar_transformer_train.py; the constructor arguments already line up. Verified in a clean venv without TensorFlow: "import myofdm" from sdradi/ succeeds and MyDemapper raises the new message; "import radar.waveform" from WebApp/FastAPIbackend/ succeeds and resolves the AIRadar imports. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three modules currently fail to import on a fresh checkout. Each fix is small and verifiable without SDR hardware.
Problem and fix
sdradi/myofdm.pyimportstfmodulesat module level. That file lives insdradi/pluto_test/and requires TensorFlow, soimport myofdmfails fromsdradi/even though onlyMyDemapperuses those names. → The import is now optional;MyDemapperraises anImportErrorexplaining how to enable it.WebApp/FastAPIbackend/radar/waveform.pyrunspip install plotlyas a side effect of a failed import. → It now raises a clearImportErrorwith the install command instead. It also adds a__file__-basedsys.pathentry so itsAIRadar.AIRadarLibimports resolve when the backend is run fromWebApp/FastAPIbackend/as the README describes.AIRadar/AIradar_model_comparison.pyimportsRadarTransformerNetfromAIradar_transformer, which is not in the repository. → It now imports fromAIRadarLib.modeling_transformer, matching the sibling scriptAIradar_transformer_train.py; the constructor arguments already line up.Verification
In a clean venv without TensorFlow:
MyDemappernow raises the new explanatory error whentfmodulesis unavailable, andRadarTransformerNetresolves fromAIRadarLib.Not included
While tracing these I noticed a few more import problems I did not want to guess at:
PacketFrameris imported fromsdr_video_commby four scripts but does not appear to be defined anywhere in the repository,AIradar_fmcw_datasetis missing, andAIradar_model_comparison.pyalso importsRadarNet/RadarTimeToFreqNetfromAImodels_joint, where those names are not defined. I left all of those alone — happy to follow up if you can point me at the intended sources. TheWebApp/FastAPIbackend/main.pystartup path also needs work, but part of it only runs with an SDR attached, so I have left it for when it can actually be exercised.🤖 Generated with Claude Code