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

🛠️ fix: Enhance Error Logging, Update Dependencies, and Optimize NLTK Setup #106

Merged
merged 4 commits into from
Dec 16, 2024

Conversation

danny-avila
Copy link
Owner

@danny-avila danny-avila commented Dec 16, 2024

Summary

I enhanced error logging with traceback throughout the application, updated dependencies for unstructured and langchain core packages, adjusted Dockerfiles to pre-download NLTK data and disable Unstructured analytics, and removed the version specification from docker-compose.yaml.

  • Added detailed error logging with traceback in main.py to aid in debugging and error tracking.
  • Updated unstructured and langchain core packages to the latest versions in requirements.txt and requirements.lite.txt.
  • Modified Dockerfile and Dockerfile.lite to download NLTK data during build time, preventing unstructured from downloading packages at runtime.
  • Set the NLTK_DATA environment variable to /app/nltk_data in Dockerfiles for consistent NLTK data path.
  • Disabled Unstructured analytics by setting SCARF_NO_ANALYTICS=true in Dockerfiles.
  • Removed the version specification from docker-compose.yaml to utilize the default version.

Relevant GitHub references:

Change Type

  • Bug fix (non-breaking change which fixes an issue)

Testing

I tested the changes by:

  • Running the application to ensure it operates correctly with the updated dependencies.
  • Triggering exceptions to confirm that error logging with traceback works as expected.
  • Building Docker images using the updated Dockerfiles and verifying that NLTK data is downloaded during the build process.
  • Running the application using the updated docker-compose.yaml to ensure there are no Docker-related issues.
  • Checking the application logs to confirm that Unstructured analytics is disabled.

Test Configuration:

  • Operating System: Ubuntu 22.04 LTS
  • Docker version: 23.0.6
  • Docker Compose version: 2.17.3
  • Python version: 3.11

Checklist

  • My code adheres to this project's style guidelines
  • I have performed a self-review of my own code
  • I have commented in any complex areas of my code
  • I have made pertinent documentation changes
  • My changes do not introduce new warnings
  • Local unit tests pass with my changes

@danny-avila danny-avila merged commit 95a0cd0 into main Dec 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant