Skip to content
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

[Bug]: Fabric Dependency Issues with gRPC and Google Cloud Libraries #747

Closed
1 task done
joshuafuller opened this issue Jul 18, 2024 · 11 comments
Closed
1 task done
Labels
bug Something isn't working

Comments

@joshuafuller
Copy link
Contributor

joshuafuller commented Jul 18, 2024

What happened?

What happened?

I was using the fabric package for various commands, such as changing the default model and summarizing YouTube videos. Despite multiple attempts to reinstall fabric and its dependencies, I am still encountering warning messages related to grpcio and other related libraries. The specific warnings are:

  • WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
  • I0000 00:00:1721329796.596775 48349 check_gcp_environment.cc:61] BIOS data file does not exist or cannot be opened.

These warnings appear consistently during different fabric operations, not just when changing the default model.

Environment:

  • Operating System: Windows 11 with WSL2
  • Python Version: 3.10
  • Fabric Version: 1.4.0
  • Latest Commit: d75ea47
  • Git Version: 2.34.1
  • Dependency Versions:
    • grpcio==1.65.1
    • google-cloud-aiplatform==1.59.0
    • google-cloud-storage==2.17.0

Steps Taken to Resolve the Issue:

  1. Full Uninstall and Reinstallation:

    • Uninstalled fabric using pipx: pipx uninstall fabric
    • Deleted the local fabric repository: rm -rf ~/github/fabric
    • Re-cloned the fabric repository from GitHub: git clone https://github.com/danielmiessler/fabric.git
    • Reinstalled fabric using pipx: pipx install fabric
    • Re-setup fabric as a new installation: fabric --setup
    • I performed these steps twice to ensure a clean installation.
  2. Dependency Verification:

    • Checked installed versions of key dependencies using: pipx runpip fabric show grpcio
    • Noted the installed versions:
      • grpcio==1.65.1
      • google-cloud-aiplatform==1.59.0
      • google-cloud-storage==2.17.0
    • Upgraded dependencies: pipx runpip fabric install --upgrade grpcio google-cloud-aiplatform google-cloud-storage
  3. Example Commands Producing Warnings:

    • Changing the default model:

      fabric --changeDefaultModel gpt-4o-mini
      WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
      I0000 00:00:1721329796.587000   48349 config.cc:230] gRPC experiments enabled: call_status_override_on_cancellation, event_engine_dns, event_engine_listener, http2_stats_fix, monitoring_experiment, pick_first_new, trace_record_callops, work_serializer_clears_time_cache
      I0000 00:00:1721329796.596775   48349 check_gcp_environment.cc:61] BIOS data file does not exist or cannot be opened.
      Default model changed to gpt-4o-mini. Please restart your terminal to use it.
    • Summarizing a YouTube video (snipped for brevity):

      yt https://www.youtube.com/watch?v=_CwGUt0CpvU | summarize -s
      WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
      I0000 00:00:1721330542.882595   52151 config.cc:230] gRPC experiments enabled: call_status_override_on_cancellation, event_engine_dns, event_engine_listener, http2_stats_fix, monitoring_experiment, pick_first_new, trace_record_callops, work_serializer_clears_time_cache
      I0000 00:00:1721330542.888972   52151 check_gcp_environment.cc:61] BIOS data file does not exist or cannot be opened.
      [SNIPPED FOR BREVITY - Normal Output]

      The command still provided the expected output after the warning messages.

Version check

  • Yes I was.

Relevant log output

fabric --changeDefaultModel gpt-4o-mini
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1721329796.587000   48349 config.cc:230] gRPC experiments enabled: call_status_override_on_cancellation, event_engine_dns, event_engine_listener, http2_stats_fix, monitoring_experiment, pick_first_new, trace_record_callops, work_serializer_clears_time_cache
I0000 00:00:1721329796.596775   48349 check_gcp_environment.cc:61] BIOS data file does not exist or cannot be opened.
Default model changed to gpt-4o-mini. Please restart your terminal to use it.


yt https://www.youtube.com/watch?v=_CwGUt0CpvU | summarize -s
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1721330542.882595   52151 config.cc:230] gRPC experiments enabled: call_status_override_on_cancellation, event_engine_dns, event_engine_listener, http2_stats_fix, monitoring_experiment, pick_first_new, trace_record_callops, work_serializer_clears_time_cache
I0000 00:00:1721330542.888972   52151 check_gcp_environment.cc:61] BIOS data file does not exist or cannot be opened.

Relevant screenshots (optional)

WindowsTerminal_LJlCqEOP3q

@joshuafuller joshuafuller added the bug Something isn't working label Jul 18, 2024
@manojkollam
Copy link

I am getting the same type of behavior on a fresh install on ubuntu on WSL

WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1721348702.029898 172323 config.cc:230] gRPC experiments enabled: call_status_override_on_cancellation, event_engine_dns, event_engine_listener, http2_stats_fix, monitoring_experiment, pick_first_new, trace_record_callops, work_serializer_clears_time_cache
I0000 00:00:1721348702.035481 172323 check_gcp_environment.cc:61] BIOS data file does not exist or cannot be opened.

@joshuafuller
Copy link
Contributor Author

I found a temporary fix for the issue:

To mitigate the problem, run the following commands:

pipx runpip fabric uninstall grpcio
pipx runpip fabric install grpcio==1.64.0

This resolves the warning messages related to grpcio and other related libraries in my environment.

For more details on the grpc bug, see:

As for @07pepa's comments, they were completely useless and off-topic. They didn't help at all and only added noise to the conversation. If you can't contribute constructively, please refrain from commenting.

I hope this helps others facing the same issue.


@manojkollam
Copy link

I found a temporary fix for the issue:

To mitigate the problem, run the following commands:

pipx runpip fabric uninstall grpcio
pipx runpip fabric install grpcio==1.64.0

This resolves the warning messages related to grpcio and other related libraries in my environment.

For more details on the grpc bug, see:

As for @07pepa's comments, they were completely useless and off-topic. They didn't help at all and only added noise to the conversation. If you can't contribute constructively, please refrain from commenting.

I hope this helps others facing the same issue.

I can confirm that this fix downgrading grpcio to 1.64 is working for me as well

@andeeisaacs
Copy link

Also confirming that the uninstall and reinstall of grpcio worked and resolved the warning messages.

Thanks, @joshuafuller.

@joshuafuller

This comment has been minimized.

@fearby
Copy link

fearby commented Jul 21, 2024

MacOS same problem and fix doesn't work

@ph3ll3r
Copy link

ph3ll3r commented Jul 24, 2024

[[Bug]: Fabric Dependency Issues with gRPC and Google Cloud Libraries] #747 (comment))
#747

I only want to use Google's models/gemini-1.5-pro and ollama models. I want exclude for the time being OpenAI (fabric default) and Claude.ai.

After a reboot, I get this error "Error: Client error '401 Unauthorized' for url 'https://api.openai.com/v1/models'
For more information check: https://developer.mozilla.org/en-US/docs/Web/HTTP/Status/401"

I followed the suggested format a similar way described by Joshua Fuller

Full Uninstall and Reinstallation:

  1. Uninstalled fabric using pipx: pipx uninstall fabric
  2. Deleted the local fabric repository: rm -rf ~/github/fabric
  3. Re-cloned the fabric repository from GitHub: git clone https://github.com/danielmiessler/fabric.git
  4. Reinstalled fabric using pipx: pipx install fabric
  5. Re-setup fabric as a new installation: fabric --setup
  • Bypassed the openai key and claude.ai key
  • Inserted Google generative ai api key and youtube api key
  1. I performed these steps twice to ensure a clean installation.

I tested that fabric was installed properly:

  1. fabric --listmodels and found models/gemini-1.5-pro
  2. fabric --changeDefaultModel models/gemini-1.5-pro
  3. At this point the gRPC error, was still occurring but I was getting answers from fabric

Once, I reboot OpenAI took precedence and returned the error "Error: Client error '401 Unauthorized' for url 'https://api.openai.com/v1/models'". This reminds me of the "Harry Belafonte & Odetta - A Hole in the Bucket: "https://www.youtube.com/watch?v=xVAvMIhvqfk"

There needs to be a way to persist fabric --changeDefaultModel.

Also, add as many keys as you like but have a way to reset a combination of keys which are dynamically persisted but can be changed and restart the shell and happy fabric-ing to handle as an example (Fabric: This OPENSOURCE AI Framework can AUTOMATE YOUR LIFE & ANY TASK (Setup with Ollama & Groq) : "https://www.youtube.com/watch?v=Iup3-Jvkrhg" ) as a permutation of the ability to reset a combination of keys

@joshuafuller
Copy link
Contributor Author

@ph3ll3r, it looks like your issue differs from the one I originally reported. You might want to start a new thread to address your specific problem.

The error I encountered affected all Fabric operations and involved warnings related to grpcio and other libraries, such as:

WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1721329796.596775   48349 check_gcp_environment.cc:61] BIOS data file does not exist or cannot be opened.

These warnings occurred during various commands, including changing the default model and summarizing YouTube videos.

Your error seems to be a 401 Unauthorized error related to OpenAI's API after a reboot, which suggests a different underlying issue.

Please refer to the photo I uploaded to see the differences in our issues.

@th3f001
Copy link

th3f001 commented Jul 27, 2024

I found a temporary fix for the issue:

To mitigate the problem, run the following commands:

pipx runpip fabric uninstall grpcio
pipx runpip fabric install grpcio==1.64.0

This resolves the warning messages related to grpcio and other related libraries in my environment.

For more details on the grpc bug, see:

As for @07pepa's comments, they were completely useless and off-topic. They didn't help at all and only added noise to the conversation. If you can't contribute constructively, please refrain from commenting.

I hope this helps others facing the same issue.

On MacOS Sonoma 14.5.1 the reported fix works. Thanks!

@ph3ll3r
Copy link

ph3ll3r commented Jul 28, 2024

I used this and it did not work.

Dependency Verification:

Checked installed versions of key dependencies using: pipx runpip fabric show grpcio

Noted the installed versions:

  • grpcio==1.65.1 fails but 1.64 works
  • google-cloud-aiplatform==1.59.0
  • google-cloud-storage==2.17.0
  • Upgraded dependencies: pipx runpip fabric install --upgrade grpcio google-cloud-aiplatform google-cloud-storage

th3f001 commented 20 hours ago

To mitigate the problem, run the following commands:

worked perfectly

  • pipx runpip fabric uninstall grpcio
  • pipx runpip fabric install grpcio==1.64.0

@fcalazans
Copy link

Having the same problem with the initial message of the thread:

❯ fabric --listmodels
WARNING: All log messages before absl::InitializeLog() is called are written to STDERR
I0000 00:00:1722717785.434341  880089 check_gcp_environment_no_op.cc:29] ALTS: Platforms other than Linux and Windows are not supported
I0000 00:00:1722717786.424544  880089 check_gcp_environment_no_op.cc:29] ALTS: Platforms other than Linux and Windows are not supported

Device:
MacBook Pro
14-inch, 2023
Chip: Apple M2 Pro
Memory: 16 GB
macOS: 14.6 (23G80)

worked perfectly

  • pipx runpip fabric uninstall grpcio
  • pipx runpip fabric install grpcio==1.64.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

8 participants