-
Notifications
You must be signed in to change notification settings - Fork 718
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
Dataflow workers not able to install tfx from requirements file due to no-binary
option from beam stager
#649
Comments
Thanks @andrewsmartin. I think we can consider this to mainly be a bug in Beam. We currently do not upload the source package to PyPI and it is currently not trivial to set up the correct environment to build the package from source. @angoenka: is there a particular reason we use --no-binary at the line here (https://github.com/apache/beam/blob/v2.15.0/sdks/python/apache_beam/runners/portability/stager.py#L483)? Should we remove this? As a workaround, you can try downloading the wheel file from PyPI (https://pypi.org/project/tfx/#files) and specify it as an --extra_package to Beam. CC: @zhitaoli |
Hi @charlesccychen, thanks for the response! Agreed that this seems more of an issue in Beam itself. I raised here just because the default behaviour in TFX does not work. I was able to work around this by providing a minimal setup file with |
The corresponding issue similar to this is tracked at https://jira.apache.org/jira/browse/BEAM-4032 We can look into it but at the moment its not prioritized. |
Hi @andrewsmartin and @charlesccychen I was not able to use both of your workarounds. I am still trying to play around with Chicago Beam pipeline - on spark. I tried using --extra_package argument and point it to wheel file like this-
I got this error: I feel that the wheel file was ignored. I then used the second suggestion, with
and setup.py contains-
It thows below error Please help me with the correct way of inserting tfx package on beam executors |
Hi @tejaslodaya, for the second case (trying with a provided setup.py file), do you have a more detailed stacktrace? Can you also share the full contents of your setup.py? |
Hi @andrewsmartin and @charlesccychen I managed to solve this issue by doing these steps:
In my case, I had created conda environment and changed this file: This solves the issue. |
@andrewsmartin please close this issue |
Hi @tejaslodaya - glad you found a workaround, but it is just that - a workaround. That said I'm going to keep this open. |
@andrewsmartin I believe I ran into this issue running a TFX pipeline on Kubeflow (based on the Taxi template). Could not tell exactly what was happening from what logs I could find - for one thing I could not find this worker-startup log. Yes, eventually found the worker-startup log in Stackdriver by filtering logs (there's a googleapis worker-startup choice). The error was "Failed to install packages: failed to install workflow". Job still failed but I made it a lot further once I applied the change @tejaslodaya described above. Ran into this error when running a similar pipeline this time from my mac. Not sure if commenting out the no-binary option is appropriate in this case given the differences between my laptop and dataflow workers. |
I hit the same issue when trying to run DataflowRunner from locally running BeamDagRunner. (error from BigQueryExampleGen on DataflowRunner)
|
I'm hitting the same issues with tfx==0.21.2 and tfx==0.21.4. |
Here is the log I'm getting:
|
I have the same issue here with Runner: Dataflow Error message:
|
Could you please confirm is this still an issue, otherwise move this to closed status. Thanks |
This is no longer an issue for us but only because we are using a different workaround. Unfortunately I cannot confirm whether it is in fact still an issue. That said, it my be less relevant going forward as there is now better support for custom containers on Dataflow workers. I'd be OK with this being closed personally but other users still may be hitting this. |
Closing this issue, Please feel free to reopen if this still exist. Thanks |
This still happens with tensorflow 2.8.0. I have tensorflow as a requirement and I still get this error. Is there any reason to keep the I've had many issues with that, including that it takes a really long time to recompile every single direct and indirect requirement. I've had timeouts at startup on Flex Templates as well because most Google client libraries depend on pyarrow which takes a very long time to compile from source. I think removing |
When no Beam packaging arguments are provided by the user, TFX generates a requirements file with the
tfx
package inside.This ends up failing on Dataflow, because the Beam stager uses pip's
--no-binary
flag: https://github.com/apache/beam/blob/v2.15.0/sdks/python/apache_beam/runners/portability/stager.py#L483.Indeed, in a fresh virtualenv (Python 3.6.3):
Whereas if I remove the
--no-binary
flag, it works just fine.I'm not all that knowledgable about Python packaging, but is this because TFX is built as a wheel? Is there some Beam option I can pass to make this work?
The text was updated successfully, but these errors were encountered: