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

feat(synthesizer): Support for MultiTable #81

Merged
merged 11 commits into from
Jan 16, 2024
Merged

feat(synthesizer): Support for MultiTable #81

merged 11 commits into from
Jan 16, 2024

Conversation

portellaa
Copy link
Member

@portellaa portellaa commented Jan 11, 2024

import os

os.environ['LOG_LEVEL'] = 'DEBUG'

os.environ['YDATA_BASE_URL'] = "fabric.dev.azure.ydata.ai"
os.environ["YDATA_TOKEN"] = "<TOKEN>"

from ydata.sdk.connectors import Connector
from ydata.sdk.datasources import DataSource
from ydata.sdk.synthesizers import MultiTableSynthesizer

datasource = DataSource.get('<datasource uid>')
print(datasource)

synthesizer = MultiTableSynthesizer(write_connector="<connector_uid>")
synthesizer.fit(datasource)

print("sample using connector from synthesizer class")
synthesizer.sample(1.5)

print("sample using a pre-fetched connector")
connector = Connector.get("e8e0443d-8cf4-47a6-a889-2ee29f19861e")
synthesizer.sample(2, write_connector=connector) # with optional write_connector

@portellaa portellaa self-assigned this Jan 11, 2024
@portellaa portellaa marked this pull request as ready for review January 12, 2024 15:27
@fabclmnt fabclmnt self-requested a review January 12, 2024 15:55
Copy link
Contributor

@aquemy aquemy left a comment

Choose a reason for hiding this comment

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

The code is OK but I am concerned with the change of the typing from Optional to | None, or Union to | because this was introduced in Python 3.10.
If we want to support from Python 3.8 we cannot use it.

@portellaa
Copy link
Member Author

The code is OK but I am concerned with the change of the typing from Optional to | None, or Union to | because this was introduced in Python 3.10. If we want to support from Python 3.8 we cannot use it.

Ups forgot that. i will revert and test this with python 3.8, totally forgot

@portellaa
Copy link
Member Author

@aquemy already reverted the changes to support python 3.8

@portellaa portellaa requested a review from aquemy January 15, 2024 18:52
Copy link
Member Author

@portellaa portellaa left a comment

Choose a reason for hiding this comment

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

reverted

@portellaa portellaa merged commit 6785ad8 into main Jan 16, 2024
5 checks passed
@portellaa portellaa deleted the feat/PLT-1060 branch January 16, 2024 17:04
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.

3 participants