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

[MRG] quickfix: missing imports and some bugs #256

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions mle/integration/kaggle.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,13 +62,17 @@ def fetch_competition_overview(self, competition: str):
:param competition: The URL or name of the Kaggle competition.
:return: A dictionary containing competition overview information, or None if not found.
"""
overview = None
for _ in range(3): # Retry 3 times if the request fails
try:
reader_url = f"https://r.jina.ai/{competition}/{overview}"
response = requests.get(reader_url)
reader_url = f"https://r.jina.ai/{competition}/overview/description"
response = requests.get(
reader_url,
timeout=30,
headers={"X-Return-Format": "markdown"},
)
response.raise_for_status()
overview = response.text
break
except requests.exceptions.HTTPError:
continue
return overview.encode('utf-8', 'ignore').decode('utf-8')
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
rich
click
py7zr~=0.22.0
openai~=1.34.0
pyyaml
kaggle
Expand Down
Loading