-
Notifications
You must be signed in to change notification settings - Fork 5
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
hw7 #2
base: main
Are you sure you want to change the base?
hw7 #2
Conversation
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.
Отлично.
http://localhost:8000/seldon/default/$(MODEL_NAME)/api/v1.0/predictions | ||
|
||
# Display help for available Makefile commands | ||
help: |
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.
Рекомендую help писать рядом с командой, а затем выводить автоматом. Отдельный хелп через какое-то время становится неактуальным. Пример https://github.com/ajbosco/dag-factory/blob/master/Makefile (показывал в прошлом семетре).
|
||
# Attempt to remove the existing settings file if it exists | ||
try: | ||
os.remove(settings_path) |
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.
В pathlib можно делать файлу unlink с параметром ок, если не существует. Получается чуть удобнее.
with open(settings_path, "w") as file: | ||
json.dump(configuration, file, indent=4) | ||
print(f"Model settings updated successfully in {settings_path}.") | ||
|
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.
Между функциями два пробела. Подключай форматирование с помощью black.
] | ||
} | ||
|
||
@pytest.mark.parametrize("endpoint", ["http://localhost:9000/v2/models/uplift-predictor/infer"]) |
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.
parametrize стоит использовать, если параметров больше одного.
[dataset_bundle.data["train"], dataset_bundle.treatment, dataset_bundle.target], axis=1 | ||
).set_index("client_id") | ||
|
||
client_features = client_info.copy() |
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.
Зачем копируешь датафрейм? Кажется, что дальше не используется client_info.
cat_params = {'iterations': 20, 'random_state': 42} | ||
if config_type == 'solo': | ||
return SoloModel(estimator=CatBoostClassifier(**cat_params)) | ||
else: |
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.
Я бы написал тут без else.
No description provided.