Skip to content
This repository was archived by the owner on Mar 9, 2026. It is now read-only.

Techdebt refatorar modulo de adminclient do codex neodv 2150#99

Open
henrique-lh wants to merge 48 commits into
devfrom
techdebt-refatorar-modulo-de-adminclient-do-codex-neodv-2150
Open

Techdebt refatorar modulo de adminclient do codex neodv 2150#99
henrique-lh wants to merge 48 commits into
devfrom
techdebt-refatorar-modulo-de-adminclient-do-codex-neodv-2150

Conversation

@henrique-lh

@henrique-lh henrique-lh commented Oct 20, 2025

Copy link
Copy Markdown
Contributor

Description

With this pr:

  • Add new admin module
  • Improve code style
  • Refactor python client to be the same entry point for all operations

Related issues

How to test it

  • Set the API locally and change the BASE_URL in src/mlops_codex/constants.py
  • Setup the codex locally
uv build
uv pip install -e .

Run the following script:

from mlops_codex.administrator import DatariskMLops
from mlops_codex.train import CustomTrain

client = DatariskMLops(
    email="<email>",
    password="<password>",
    tenant="<tenant>"
)

client.list_groups()

group_token = client.create_group(name="codexGroup", description="Codex Group")

print("refresh group token")

new_group_token = client.refresh_group_token(name="codexGroup", force=True)

print('refresh ok')

e = client.train.setup_project_experiment(
    experiment_name='test',
    model_type='Classification',
    group='codexGroup',
)

print(e)

PATH = '<path_to_sample>/'

train_type = CustomTrain(
    training_reference='train_model',
    run_name='more test',
    python_version='3.10',
    input_data=PATH + 'dados.csv',
    source=PATH + 'app.py',
    requirements=PATH + 'requirements.txt',
)

print(train_type)

exe = client.train.run(
    experiment=e,
    train_type=train_type,
    wait_ready=True
)

print(exe)

print(exe.status)

- fix: warning: The `tool.uv.dev-dependencies` field (used in `pyproject.toml`) is deprecated and will be removed in a future release; use `dependency-groups.dev` instead
@henrique-lh henrique-lh self-assigned this Oct 20, 2025
@henrique-lh henrique-lh marked this pull request as ready for review October 21, 2025 11:49
Comment thread src/mlops_codex/constants.py Outdated
@@ -0,0 +1 @@
BASE_URL = 'https://neomaril.datarisk.net/api'

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is the codex only used outside of production in development? Just to confirm that the standard is being maintained.

Comment thread src/mlops_codex/administrator/proxy.py Outdated


@define(slots=True)
class ServiceProxy:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The idea is to refactor the rest of the modules to use this?

- add pydantic
@henrique-lh henrique-lh marked this pull request as draft October 23, 2025 11:47
@henrique-lh henrique-lh marked this pull request as ready for review October 31, 2025 13:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants