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

hw7 #2

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

hw7 #2

wants to merge 4 commits into from

Conversation

dkopylov1337
Copy link

No description provided.

Copy link

@belou5ov belou5ov left a 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:

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)

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}.")

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"])

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()

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:

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Я бы написал тут без else.

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.

2 participants