-
Notifications
You must be signed in to change notification settings - Fork 0
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
Added part of data from Alfalfa catalog to the test server #5
base: master
Are you sure you want to change the base?
Conversation
|
||
offset = 0 | ||
batch = 500 | ||
test_limit = 1000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тут же вроде не надо, строк-то не оч много?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
если сразу всю табличку закидывать, мне все равно будет банить с request entity too large
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
я максимум ~3к объектов за раз могу грузить
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тут речь не про батч, а про test_limit)
import numpy as np | ||
|
||
|
||
df = pd.read_csv("./alfalfa/tables/raw_info.csv", sep=" ", engine="python") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
давай сделаем это параметром из командной строки? чтобы если путь поменялся можно было бы легко поменять а не по коду искать
хорошая и простая библиотека для таких штук click
https://click.palletsprojects.com/en/8.1.x/quickstart/#basic-concepts-creating-a-command
https://click.palletsprojects.com/en/8.1.x/quickstart/#adding-parameters
return np.nan | ||
return row["Name"] | ||
|
||
data = pd.read_csv("./alfalfa/tables/main_data.csv") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
и это тоже давай аргументом командной строки
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
и тут тоже давай пути сделаем click-ом сразу
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Кстати параметры базы данных тоже можно туда утащить через переменные окружения: https://click.palletsprojects.com/en/8.1.x/arguments/#environment-variables
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
а их кликом доставать или как было: host=os.getenv("HYPERLEDA_DB_HOST") и тд?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
клик умеет в переменные окружения, так что как будто можно сразу кликом и просто в переменную положить
Loaded columns info
NO ucd was found in tables
Вероятно реально его докрутить и просто попарсить немного, вопрос, нужно ли это