-
Notifications
You must be signed in to change notification settings - Fork 0
chore: Minimize breaking changes on common import paths and alias names #206
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
Merged
blainekasten
merged 2 commits into
next
from
blaine/dx-129-investigate-if-we-can-minimize-breaking-changes-on-import
Jan 9, 2026
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Manually added to minimize breaking changes from V1 | ||
| from ._constants import ( | ||
| MAX_RETRY_DELAY as MAX_RETRY_DELAY, | ||
| DEFAULT_MAX_RETRIES, | ||
| INITIAL_RETRY_DELAY as INITIAL_RETRY_DELAY, | ||
| ) | ||
| from .lib.constants import ( | ||
| MIN_SAMPLES as MIN_SAMPLES, | ||
| DISABLE_TQDM as DISABLE_TQDM, | ||
| MAX_IMAGE_BYTES as MAX_IMAGE_BYTES, | ||
| NUM_BYTES_IN_GB as NUM_BYTES_IN_GB, | ||
| MAX_FILE_SIZE_GB as MAX_FILE_SIZE_GB, | ||
| MIN_PART_SIZE_MB as MIN_PART_SIZE_MB, | ||
| DOWNLOAD_BLOCK_SIZE as DOWNLOAD_BLOCK_SIZE, | ||
| MAX_MULTIPART_PARTS as MAX_MULTIPART_PARTS, | ||
| TARGET_PART_SIZE_MB as TARGET_PART_SIZE_MB, | ||
| MAX_CONCURRENT_PARTS as MAX_CONCURRENT_PARTS, | ||
| MAX_IMAGES_PER_EXAMPLE as MAX_IMAGES_PER_EXAMPLE, | ||
| MULTIPART_THRESHOLD_GB as MULTIPART_THRESHOLD_GB, | ||
| MAX_BASE64_IMAGE_LENGTH as MAX_BASE64_IMAGE_LENGTH, | ||
| MULTIPART_UPLOAD_TIMEOUT as MULTIPART_UPLOAD_TIMEOUT, | ||
| PARQUET_EXPECTED_COLUMNS as PARQUET_EXPECTED_COLUMNS, | ||
| REQUIRED_COLUMNS_MESSAGE as REQUIRED_COLUMNS_MESSAGE, | ||
| JSONL_REQUIRED_COLUMNS_MAP as JSONL_REQUIRED_COLUMNS_MAP, | ||
| POSSIBLE_ROLES_CONVERSATION as POSSIBLE_ROLES_CONVERSATION, | ||
| DatasetFormat as DatasetFormat, | ||
| ) | ||
|
|
||
| TIMEOUT_SECS = 600 | ||
| MAX_SESSION_LIFETIME_SECS = 180 | ||
| MAX_CONNECTION_RETRIES = 2 | ||
| MAX_RETRIES = DEFAULT_MAX_RETRIES | ||
|
|
||
| BASE_URL = "https://api.together.xyz/v1" | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
|
|
||
| # Manually added to minimize breaking changes from V1 | ||
| from ._exceptions import ( | ||
| APIError as APIError, | ||
| RateLimitError as RateLimitError, | ||
| APITimeoutError, | ||
| BadRequestError, | ||
| APIConnectionError as APIConnectionError, | ||
| AuthenticationError as AuthenticationError, | ||
| APIResponseValidationError, | ||
| ) | ||
|
|
||
| Timeout = APITimeoutError | ||
| InvalidRequestError = BadRequestError | ||
| TogetherException = APIError | ||
| ResponseError = APIResponseValidationError |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Manually added to minimize breaking changes from V1 | ||
| from .tool_choice import ToolChoice | ||
| from .chat.chat_completion import ChatCompletion | ||
| from .chat.chat_completion_chunk import ChatCompletionChunk as ChatCompletionChunk | ||
|
|
||
| ChatCompletionResponse = ChatCompletion | ||
| ToolCalls = ToolChoice |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| # Manually added to minimize breaking changes from V1 | ||
| from together.types import DedicatedEndpoint as DedicatedEndpoint | ||
|
|
||
| ListEndpoint = DedicatedEndpoint |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| # Manually added to minimize breaking changes from V1 | ||
| from . import ( | ||
| FileList as FileList, | ||
| FileType as FileType, | ||
| FilePurpose as FilePurpose, | ||
| FileResponse as FileResponse, | ||
| FileDeleteResponse as FileDeleteResponse, | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,27 @@ | ||
| # Manually added to minimize breaking changes from V1 | ||
| from ..lib.types.fine_tuning import ( | ||
| COMPLETED_STATUSES as COMPLETED_STATUSES, | ||
| TrainingType as TrainingType, | ||
| FinetuneEvent as FinetuneEvent, | ||
| TrainingMethod as TrainingMethod, | ||
| FinetuneRequest as FinetuneRequest, | ||
| EmptyLRScheduler as EmptyLRScheduler, | ||
| FinetuneProgress as FinetuneProgress, | ||
| FinetuneResponse as FinetuneResponse, | ||
| FullTrainingType as FullTrainingType, | ||
| LoRATrainingType as LoRATrainingType, | ||
| CosineLRScheduler as CosineLRScheduler, | ||
| FinetuneEventType as FinetuneEventType, | ||
| FinetuneJobStatus as FinetuneJobStatus, | ||
| LinearLRScheduler as LinearLRScheduler, | ||
| TrainingMethodDPO as TrainingMethodDPO, | ||
| TrainingMethodSFT as TrainingMethodSFT, | ||
| FinetuneEventLevels as FinetuneEventLevels, | ||
| FinetuneLRScheduler as FinetuneLRScheduler, | ||
| CosineLRSchedulerArgs as CosineLRSchedulerArgs, | ||
| LinearLRSchedulerArgs as LinearLRSchedulerArgs, | ||
| FinetuneTrainingLimits as FinetuneTrainingLimits, | ||
| FinetuneMultimodalParams as FinetuneMultimodalParams, | ||
| FinetuneFullTrainingLimits as FinetuneFullTrainingLimits, | ||
| FinetuneLoraTrainingLimits as FinetuneLoraTrainingLimits, | ||
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # Manually added to minimize breaking changes from V1 | ||
| from together.types import ModelObject as ModelObject |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Missing
DEFAULT_TIMEOUTexport from compatibility moduleMedium Severity
The PR description explicitly states that
DEFAULT_TIMEOUTshould be importable fromtogether.constants, but the new compatibility shim file doesn't include it in the imports from._constants. The constant exists insrc/together/_constants.py(as anhttpx.Timeoutobject), but users attemptingfrom together.constants import DEFAULT_TIMEOUTwill get anImportError. This breaks the V1 compatibility that this PR aims to provide.