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] list_files api signature change in data_ingestion.py and lo… #3601

Conversation

valayDave
Copy link
Contributor

@valayDave valayDave commented Apr 30, 2023

list_files api signature change in data_ingestion.py and fix logging related bugs in data_ingestion.py

Background

Integrating #3595 led to an API change that created an ImportError in data_ingestion.py. Integrating #3056 created a ValueError with the configure_logging function because filemode is an invalid argument:

Traceback (most recent call last):
  File "/home/ubuntu/exploration/Auto-GPT/data_ingestion.py", line 106, in <module>
    main()
  File "/home/ubuntu/exploration/Auto-GPT/data_ingestion.py", line 42, in main
    logger = configure_logging()
  File "/home/ubuntu/exploration/Auto-GPT/data_ingestion.py", line 12, in configure_logging
    logging.basicConfig(
  File "/home/ubuntu/miniconda3/envs/autogpt-project/lib/python3.10/logging/__init__.py", line 2062, in basicConfig
    raise ValueError('Unrecognised argument(s): %s' % keys)
ValueError: Unrecognised argument(s): filemode

The data_ingestion.py file is also not usable when using LocalCache memory since the Config object has no workspace_path set to it. I can send a follow up PR that adds this option. Let me know if that is a direction you wish to support.

Changes

This PR fixes two bugs in the data_ingestion.py that made it un-callable.

  1. Fix import errors created because of the API signature change from rename search_files to list_files #3595
  2. Fix logging-related options changed from replace 50+ occurrences of print() with logger #3056

Documentation

Test Plan

PR Quality Checklist

  • My pull request is atomic and focuses on a single change.
  • I have thoroughly tested my changes with multiple different prompts.
  • I have considered potential risks and mitigations for my changes.
  • I have documented my changes clearly and comprehensively.
  • I have not snuck in any "extra" small tweaks changes

@vercel
Copy link

vercel bot commented Apr 30, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated (UTC)
docs ⬜️ Ignored (Inspect) Apr 30, 2023 11:40pm

@codecov
Copy link

codecov bot commented Apr 30, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (c317cf0) 59.98% compared to head (120f3a0) 59.98%.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #3601   +/-   ##
=======================================
  Coverage   59.98%   59.98%           
=======================================
  Files          69       69           
  Lines        3099     3099           
  Branches      513      513           
=======================================
  Hits         1859     1859           
  Misses       1109     1109           
  Partials      131      131           

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ntindle ntindle self-assigned this May 1, 2023
@richbeales richbeales merged commit 6ae90a3 into Significant-Gravitas:master May 1, 2023
@valayDave valayDave deleted the data-ingestion-logging-bug-fix branch May 2, 2023 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants