Skip to content

Commit

Permalink
Reformat Markdown code blocks (#140)
Browse files Browse the repository at this point in the history
  • Loading branch information
glenn-jocher committed May 18, 2024
1 parent ef59d9d commit e0a5b35
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 21 deletions.
10 changes: 5 additions & 5 deletions docs/dataset.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ credentials = {"api_key": "<YOUR-API-KEY>"}
client = HUBClient(credentials)

# Fetch a dataset by ID
dataset = client.dataset('<Dataset ID>') # Replace with your actual Dataset ID
dataset = client.dataset("<Dataset ID>") # Replace with your actual Dataset ID
print(dataset.data) # This prints the dataset information
```

Expand Down Expand Up @@ -75,7 +75,7 @@ credentials = {"api_key": "<YOUR-API-KEY>"}
client = HUBClient(credentials)

# Select the dataset by its ID
dataset = client.dataset('<Dataset ID>') # Ensure the Dataset ID is specified
dataset = client.dataset("<Dataset ID>") # Ensure the Dataset ID is specified

# Delete the dataset
dataset.delete()
Expand Down Expand Up @@ -115,8 +115,8 @@ from hub_sdk import HUBClient
credentials = {"api_key": "<YOUR-API-KEY>"}
client = HUBClient(credentials)

# Define the dataset ID for which you want a download link
dataset = client.dataset("<Dataset ID>") # Don't forget to replace Dataset ID with the actual dataset ID
# Define the dataset ID for which you want a download link
dataset = client.dataset("<Dataset ID>") # Don't forget to replace Dataset ID with the actual dataset ID

# Retrieve the URL for downloading dataset contents
url = dataset.get_download_link()
Expand All @@ -134,7 +134,7 @@ credentials = {"api_key": "<YOUR-API-KEY>"}
client = HUBClient(credentials)

# Select the dataset
dataset = client.dataset("<Dataset ID>") # Substitute with the real dataset ID
dataset = client.dataset("<Dataset ID>") # Substitute with the real dataset ID

# Upload the dataset file
dataset.upload_dataset(file="<Dataset File>") # Make sure to specify the correct file path
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Now that your credentials are prepared, initiate your `HUBClient`:
```python
from hub_sdk import HUBClient

credentials = {"api_key": "<YOUR-API-KEY>"} # api key
credentials = {"api_key": "<YOUR-API-KEY>"} # api key
client = HUBClient(credentials)
```

Expand Down
14 changes: 7 additions & 7 deletions docs/model.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,16 +48,16 @@ client = HUBClient(credentials)

data = {
"meta": {"name": "sdk model"}, # Give your model a recognizable name
"projectId": project.id, # Associate with an existing project
"datasetId": dataset.id, # Associate with an existing dataset
"config": { # Define hyperparameters and settings
"batchSize": "-1",
"projectId": project.id, # Associate with an existing project
"datasetId": dataset.id, # Associate with an existing dataset
"config": { # Define hyperparameters and settings
"batchSize": "-1",
"cache": "ram",
"device": "name",
"epochs": "5",
"imageSize": "640",
"patience": "5" # Stop training if validation doesn't improve
}
"patience": "5", # Stop training if validation doesn't improve
},
}
model = client.model()
model.create_model(data) # Creates the model with your specified details
Expand Down Expand Up @@ -159,7 +159,7 @@ credentials = {"api_key": "<YOUR-API-KEY>"}
client = HUBClient(credentials)

model = client.model("<Model ID>")
weight_url = model.get_weights_url("best") # Retrieves the URL for the model's optimal checkpoint weights. By default, it returns the URL for the best weights. To obtain the most recent weights, specify 'last.
weight_url = model.get_weights_url("best") # or "last"
print("Weight URL link:", weight_url) # Prints out the weight url link
```

Expand Down
14 changes: 7 additions & 7 deletions docs/project.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ When you already have a project hosted on the Ultralytics platform, you may want
```python
from hub_sdk import HUBClient

credentials = {"api_key": "<YOUR-API-KEY>"} # api key
credentials = {"api_key": "<YOUR-API-KEY>"} # api key
client = HUBClient(credentials)

project = client.project('<Project ID>') # Replace '<Project ID>' with your actual project ID
project = client.project("<Project ID>") # Replace '<Project ID>' with your actual project ID
print(project.data)
```

Expand All @@ -29,7 +29,7 @@ Are you starting a fresh ML project? Fantastic! The following Python code outlin
```python
from hub_sdk import HUBClient

credentials = {"api_key": "<YOUR-API-KEY>"} # api key
credentials = {"api_key": "<YOUR-API-KEY>"} # api key
client = HUBClient(credentials)

data = {"meta": {"name": "my project"}} # Name your project
Expand All @@ -44,10 +44,10 @@ Update your project's metadata with ease by specifying the project ID and the ne
```python
from hub_sdk import HUBClient

credentials = {"api_key": "<YOUR-API-KEY>"} # api key
credentials = {"api_key": "<YOUR-API-KEY>"} # api key
client = HUBClient(credentials)

project = client.project('<Project ID>') # Provide your actual project ID here
project = client.project("<Project ID>") # Provide your actual project ID here
project.update({"meta": {"name": "Project name update"}}) # Update the project's name or other metadata
```

Expand All @@ -58,7 +58,7 @@ If you no longer require a project and wish to delete it from the Ultralytics pl
```python
from hub_sdk import HUBClient

credentials = {"api_key": "<YOUR-API-KEY>"} # api key
credentials = {"api_key": "<YOUR-API-KEY>"} # api key
client = HUBClient(credentials)

project = client.project("<Project ID>") # Input the project ID for the project to delete
Expand All @@ -72,7 +72,7 @@ In some cases, you may want to browse through your projects or even check out pu
```python
from hub_sdk import HUBClient

credentials = {"api_key": "<YOUR-API-KEY>"} # api key
credentials = {"api_key": "<YOUR-API-KEY>"} # api key
client = HUBClient(credentials)

projects = client.project_list(page_size=10) # Fetch a list of projects with specified page size
Expand Down
2 changes: 1 addition & 1 deletion docs/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ Finally, create the HUBClient object with your selected credential method:
```python
from hub_sdk import HUBClient

credentials = {"api_key": "<YOUR-API-KEY>"} # api key
credentials = {"api_key": "<YOUR-API-KEY>"} # api key
client = HUBClient(credentials)
```

Expand Down

0 comments on commit e0a5b35

Please sign in to comment.